[llvm-commits] [PATCH] GNU ld win32 should not accept version script

NAKAMURA Takumi geek4civic at gmail.com
Mon Sep 6 07:03:32 PDT 2010


Good evening.

GNU ld win32 accepts
RPATH(-Wl,-R),
RDYNAMIC(-Wl,-export-dynamic)
and HAVE_LINK_VERSION_SCRIPT(-Wl,--version-script)
but they are simply ignored.
Autoconf detects them above.

At first, I made a patch to suppress detecting
HAVE_LINK_VERSION_SCRIPT on cygwin and mingw.
Confirmed on Cygwin, mingw, mingw-cross-f12 and ppc-f12.
It works better with Dan's patch r112976.

I will make patches for RPATH and RDYNAMIC soon.

Although I can commit configure.ac, I don't have proper version of autotools.
Would anyone please like to generate and commit them for me?

...Takumi
-------------- next part --------------
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index e8020e4..bd97961 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -1020,20 +1020,22 @@ AC_PATH_PROGS(GAS, [gas as])
 dnl Get the version of the linker in use.
 AC_LINK_GET_VERSION
 
+dnl Check for libtool and the library that has dlopen function (which must come
+dnl before the AC_PROG_LIBTOOL check in order to enable dlopening libraries with
+dnl libtool).
+AC_LIBTOOL_DLOPEN
+AC_LIB_LTDL
+
 dnl Determine whether the linker supports the -R option.
 AC_LINK_USE_R
 
 dnl Determine whether the linker supports the -export-dynamic option.
 AC_LINK_EXPORT_DYNAMIC
 
-dnl Determine whether the linker supports the --version-script option.
-AC_LINK_VERSION_SCRIPT
-
-dnl Check for libtool and the library that has dlopen function (which must come
-dnl before the AC_PROG_LIBTOOL check in order to enable dlopening libraries with
-dnl libtool).
-AC_LIBTOOL_DLOPEN
-AC_LIB_LTDL
+if test "$dynamic_linker" != "Win32 ld.exe" ; then
+  dnl Determine whether the linker supports the --version-script option.
+  AC_LINK_VERSION_SCRIPT
+fi
 
 if test "$WITH_LLVMGCCDIR" = "default" ; then
   LLVMGCC="llvm-gcc${EXEEXT}"


More information about the llvm-commits mailing list