From: Andrey Slepuhin Date: Wed, 20 Jan 1999 20:35:54 +0000 (+0000) Subject: 1999-01-20 Andrey Slepuhin X-Git-Tag: ild-branchpoint~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf5399d0593f03f6939b2929342227f65863ea8c;p=thirdparty%2Flibtool.git 1999-01-20 Andrey Slepuhin * ltconfig.in (aix4*): check for reworked collect2, always pass -bnoentry option to linker when building a shared library --- diff --git a/ChangeLog b/ChangeLog index 8e729b1f1..671bdecff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-01-20 Andrey Slepuhin + + * ltconfig.in (aix4*): check for reworked collect2, always pass + -bnoentry option to linker when building a shared library + 1999-01-20 Alexandre Oliva * ltmain.in (file_magic): follow soft-links before running `file' diff --git a/ltconfig.in b/ltconfig.in index 8cf128693..f0c557fe1 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -600,7 +600,7 @@ if test "$with_gcc" = yes; then # list by gcc. This cause undefined symbols with -static flags. # This hack allows C programs to be linked with "-static -ldl", but # we not sure about C++ programs. - link_static_flag="$link_static_flag -Wl,-lC" + link_static_flag="$link_static_flag ${wl}-lC" ;; cygwin32* | mingw32* | os2*) # We can build DLLs from non-PIC. @@ -1134,15 +1134,22 @@ else aix4*) allow_undefined_flag= if test "$with_gcc" = yes; then - # collect2 in egcs and probably latest gcc has full support for - # -shared flag, so we feel much better. - archive_cmds='$CC -shared -o $objdir/$soname $libobjs $deplibs' + if strings `${CC} -print-prog-name=collect2` | \ + grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + fi + archive_cmds='$CC -shared -o ${wl}-bnoentry $objdir/$soname $libobjs $deplibs' else archive_cmds='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq' > $lib.exp else cat $export_symbols > $lib.exp~ $CC -o $objdir/$soname $libobjs $deplibs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry' archive_sym_cmds='$CC -o $objdir/$soname $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bM:SRE ${wl}-bnoentry' + hardcode_direct=yes fi - hardcode_direct=yes hardcode_minus_L=yes # Though LIBPATH variable hardcodes shlibpath into executable, # it doesn't affect searching for -l* libraries; this confuses