diff options
author | Matthias Bolte <matthias.bolte@googlemail.com> | 2010-04-27 09:43:55 +0200 |
---|---|---|
committer | Matthias Bolte <matthias.bolte@googlemail.com> | 2010-04-28 23:49:00 +0200 |
commit | 98fb83ce25f46e0236706fa6e0943032d921935f (patch) | |
tree | 8208385a7840354f8daed5597110a64ff41a3302 | |
parent | build: fix autogen rule for VPATH build (diff) | |
download | libvirt-98fb83ce25f46e0236706fa6e0943032d921935f.tar.gz libvirt-98fb83ce25f46e0236706fa6e0943032d921935f.tar.bz2 libvirt-98fb83ce25f46e0236706fa6e0943032d921935f.zip |
cygwin/mingw: Fix version script handling
Let configure detect ld instead of hardcoding /usr/bin/ld, because
MinGW may have ld in /bin.
Only use a .def file to export symbols on MinGW. Cygwin's ld supports
the normal .syms file used on Linux.
-rw-r--r-- | configure.ac | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index e8c71cf7c..f883ef75a 100644 --- a/configure.ac +++ b/configure.ac @@ -73,9 +73,10 @@ AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL AM_PROG_CC_C_O +AM_PROG_LD VERSION_SCRIPT_FLAGS=-Wl,--version-script= -`/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null` || \ +`$LD --help 2>&1 | grep -- --version-script >/dev/null` || \ VERSION_SCRIPT_FLAGS="-Wl,-M -Wl," AC_SUBST(VERSION_SCRIPT_FLAGS) @@ -1816,9 +1817,17 @@ case "$host" in if test "x$enable_shared" = "xno"; then WIN32_EXTRA_CFLAGS="-DLIBVIRT_STATIC" fi +esac +case "$host" in + *-*-mingw* | *-*-msvc* ) # Also set the symbol file to .def, so src/Makefile generates libvirt.def # from libvirt.syms and passes libvirt.def instead of libvirt.syms to the linker LIBVIRT_SYMBOL_FILE=libvirt.def + # mingw's ld has the --version-script parameter, but it requires a .def file + # instead to work properly, therefore clear --version-script here + # cygwin's ld has the --version-script parameter too, but for some reason + # it's working there as expected + VERSION_SCRIPT_FLAGS= ;; esac AC_SUBST([CYGWIN_EXTRA_LDFLAGS]) |