From: Peter Rosin Date: Sun, 15 May 1983 19:30:00 +0000 (+0200) Subject: patch skip-on-no-reload.patch X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fbc144008bd66848111fb8ef2d7293b33957ea1a;p=thirdparty%2Flibtool.git patch skip-on-no-reload.patch --- diff --git a/doc/libtool.texi b/doc/libtool.texi index d304f28ca..e6acfb6cc 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -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 diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index ca2bffef5..f88176874 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -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' diff --git a/tests/duplicate_conv.at b/tests/duplicate_conv.at index 83d514479..77496d0eb 100644 --- a/tests/duplicate_conv.at +++ b/tests/duplicate_conv.at @@ -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])