]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
patch skip-on-no-reload.patch
authorPeter Rosin <peda@lysator.liu.se>
Sun, 15 May 1983 19:30:00 +0000 (21:30 +0200)
committerPeter Rosin <peda@lysator.liu.se>
Tue, 13 Jan 2009 09:27:20 +0000 (10:27 +0100)
doc/libtool.texi
libltdl/m4/libtool.m4
tests/duplicate_conv.at

index d304f28ca32563aed1125db7415dddf54337a7c2..e6acfb6cc2e69ad29de40cc78b37e8af8961f549 100644 (file)
@@ -5960,7 +5960,8 @@ Commands run after uninstalling a shared or static library, respectively.
 
 @defvar reload_cmds
 @defvarx reload_flag
-Commands to create a reloadable object.
+Commands to create a reloadable object. Set @var{reload_cmds} to
+@samp{false} on systems that cannot create reloadable objects.
 @end defvar
 
 @defvar runpath_var
index ca2bffef5dfbb2cc2ceaa0e825b84f0373f446a4..f8817687457f7107fa23f401de7304a8f0b04444 100644 (file)
@@ -2962,6 +2962,11 @@ case $reload_flag in
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
   darwin*)
     if test "$GCC" = yes; then
       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
index 83d5144790a4279bc880be1dc36473efa86499f6..77496d0ebd866ecce328739dec71ee75a31f8c9b 100644 (file)
@@ -25,6 +25,8 @@
 AT_SETUP([duplicate convenience archive names])
 AT_KEYWORDS([libtool])
 
+eval `$LIBTOOL --config | sed -n '/^reload_cmds=/,/^$/p'`
+
 # We create two convenience archives with the same name, and _also_
 # containing an object with the same name.  This is necessary to detect
 # the failure with both 1.5.22 and HEAD, since the latter does not (did
@@ -75,6 +77,8 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT
 LT_AT_EXEC_CHECK([./main],[0],[ignore],[ignore])
 $LIBTOOL --mode=clean rm -f libcee.la
 
+AT_CHECK([test "x$reload_cmds" = xfalse && exit 77], [1])
+
 # Test whether this works with reloadable objects as well.
 AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la],
         [0], [ignore], [ignore])