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-3-3~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc72b57b03cc002e23130e4de256bab7c3e4bf4d;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 53dd4f97f..3442e6c9f 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 1938cd579..5f977b52c 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,7 @@ NEWS - list of user-visible changes between releases of GNU Libtool 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 10233c6ce..2cf4149e2 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 c639d7d44..e232472e4 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -1144,7 +1144,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 @@ -1186,7 +1186,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 $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 @@ -1208,7 +1208,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 @@ -1224,7 +1224,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 $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 @@ -2472,7 +2472,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 @@ -2545,7 +2545,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