From: Alexandre Oliva Date: Thu, 10 Jun 1999 14:42:34 +0000 (+0000) Subject: * ltconfig.in: Reverted June 6's patch for new GNU ld output, it X-Git-Tag: release-1-3b~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2d508de39ef13167a5a9e6a603f9aaf2ca94ec21;p=thirdparty%2Flibtool.git * ltconfig.in: Reverted June 6's patch for new GNU ld output, it is no longer needed, as ld reverted to the original format. * NEWS: Likewise. * ltconfig.in: When testing self-dlopening, test whether dlclose crashes. On FreeBSD 3.1, it does. :-( * libltdl/configure.in: Likewise. * NEWS: Note work-around. Reported by Pavel Roskin --- diff --git a/ChangeLog b/ChangeLog index d57d59af8..a4b29ed51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +1999-06-10 Alexandre Oliva + + * ltconfig.in: Reverted June 6's patch for new GNU ld output, it + is no longer needed, as ld reverted to the original format. + * NEWS: Likewise. + + * ltconfig.in: When testing self-dlopening, test whether dlclose + crashes. On FreeBSD 3.1, it does. :-( + * libltdl/configure.in: Likewise. + * NEWS: Note work-around. + Reported by Pavel Roskin + 1999-06-09 Gary V. Vaughan * ltconfig.in (exeext): autoconf's AC_EXEEXT uses "no" to indicate diff --git a/NEWS b/NEWS index e0959b602..d1aedbd7f 100644 --- a/NEWS +++ b/NEWS @@ -17,7 +17,7 @@ New in 1.3b: 1999-??-??; CVS version 1.3a, Libtool team: * Various bugfixes New in CVS version 1.3.2a, Libtool team: -* Support new GNU ld (ELF support detection). +* Work around self-dlclose bug in FreeBSD 3.1. * Expand convenience libraries when creating reloadable objects. * Do not pass -whole-archive or equivalent to symbol extractor. * Create directory to expand convenience libraries only when needed. diff --git a/libltdl/configure.in b/libltdl/configure.in index d6d7b116f..839fc00e8 100644 --- a/libltdl/configure.in +++ b/libltdl/configure.in @@ -352,7 +352,7 @@ if test x"$ac_cv_sys_symbol_underscore" = xyes; then fnord() { int i=42;} main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 && !ptr2) exit(0); } exit(1); } + if(ptr1 && !ptr2) { dlclose(self); exit(0); } } exit(1); } ], libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes, libltdl_cv_need_uscore=cross )]) diff --git a/ltconfig.in b/ltconfig.in index 1f3239f96..c8b45a527 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -1418,7 +1418,7 @@ EOF ;; beos*) - if $LD --help 2>&1 | sed -n '/: supported targets:/,/:/p' | grep 'elf' > /dev/null; then + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME @@ -1465,7 +1465,7 @@ EOF ;; netbsd*) - if $LD --help 2>&1 | sed -n '/: supported targets:/,/:/p' | grep 'elf' > /dev/null; then + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else @@ -1487,7 +1487,7 @@ EOF *** used, and then restart. EOF - elif $LD --help 2>&1 | sed -n '/: supported targets:/,/:/p' | grep 'elf' > /dev/null; then + elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else @@ -1503,7 +1503,7 @@ EOF ;; *) - if $LD --help 2>&1 | sed -n '/: supported targets:/,/:/p' | grep 'elf' > /dev/null; then + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else @@ -2543,7 +2543,7 @@ else fnord() { int i=42;} main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) exit(0); } exit(1); } + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null @@ -2616,7 +2616,7 @@ else fnord() { int i=42;} main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); - if(ptr1 || ptr2) exit(0); } exit(1); } + if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } EOF if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null