libtool: Drop $LDFLAGS when invoking the toolchain

m4/libtool.m4 (_LT_LANG_CXX_CONFIG) [Solaris] <archive_cmds>: Drop
$LDFLAGS as it is a user variable that is usually used when invoking
libtool. As such, it should not be used by libtool when it invokes the
toolchain as it contains options intended for libtool, not the
toolchain. Fixes export.at and other tests that add -no-undefined to
LDFLAGS.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Tested-by: Richard Palo <richard.palo@baou.fr>
This commit is contained in:
Peter Rosin 2012-12-19 11:20:28 +01:00
parent 204b946050
commit 109bc05e0d

4
m4/libtool.m4 vendored
View File

@ -6755,7 +6755,7 @@ if test yes != "$_lt_caught_CXX_error"; then
if test yes,no = "$GXX,$with_gnu_ld"; then
_LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
$CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
@ -6766,7 +6766,7 @@ if test yes != "$_lt_caught_CXX_error"; then
else
# g++ 2.7 appears to require '-G' NOT '-shared' on this
# platform.
_LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
_LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
$CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'