* libtool.m4 (AC_PROG_LD): Use $CC instead of GCC.

(_LT_AC_LANG_CXX_CONFIG): Preserve variables used by AC_PROG_LD,
and reset them for a C++ environment.  Use the with_gnu_ld setting
from AC_PROG_LD.
This commit is contained in:
Alexandre Oliva 2003-03-02 10:13:46 +00:00
parent 859d6cacc0
commit ba8c5e6f00
2 changed files with 43 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2003-03-02 Alexandre Oliva <aoliva@redhat.com>
* libtool.m4 (AC_PROG_LD): Use $CC instead of GCC.
(_LT_AC_LANG_CXX_CONFIG): Preserve variables used by AC_PROG_LD,
and reset them for a C++ environment. Use the with_gnu_ld setting
from AC_PROG_LD.
2003-02-28 Ralph Schleicher <rs@nunatak.allgaeu.org>
* ltmain.in: Only append a dot to the wrapper script when
@ -53,6 +60,11 @@
2003-02-19 Alexandre Oliva <aoliva@redhat.com>
* libtool.m4 (AC_PROG_LD): Use $CC instead of GCC.
(_LT_AC_LANG_CXX_CONFIG): Preserve variables used by AC_PROG_LD,
and reset them for a C++ environment. Use the with_gnu_ld setting
from AC_PROG_LD.
* libtool.m4: Replace $linker_flags with $compiler_flags wherever
it is used as argument to $CC.

38
libtool.m4 vendored
View File

@ -1904,7 +1904,7 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by GCC])
AC_MSG_CHECKING([for ld used by $CC])
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@ -2590,7 +2590,23 @@ lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
_LT_AC_SYS_COMPILER
# Allow CC to be a program name with arguments.
lt_save_CC="$CC"
lt_save_CC=$CC
lt_save_LD=$LD
lt_save_GCC=$GCC
GCC=$GXX
lt_save_with_gnu_ld=$with_gnu_ld
lt_save_path_LD=$lt_cv_path_LD
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
else
unset lt_cv_prog_gnu_ld
fi
if test -n "${lt_cv_path_LDCXX+set}"; then
lt_cv_path_LD=$lt_cv_path_LDCXX
else
unset lt_cv_path_LD
fi
test -z "${LDCXX+set}" || LD=$LDCXX
CC=${CXX-"c++"}
compiler=$CC
_LT_AC_TAGVAR(compiler, $1)=$CC
@ -2607,12 +2623,11 @@ fi
if test "$GXX" = yes; then
# Set up default GNU C++ configuration
AC_PROG_LD
# Check if GNU C++ uses GNU ld as the underlying linker, since the
# archiving commands below assume that GNU ld is being used.
if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
grep 'GNU ld' > /dev/null; then
with_gnu_ld=yes
if test "$with_gnu_ld" = yes; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
@ -3381,7 +3396,16 @@ AC_LIBTOOL_DLOPEN_SELF($1)
AC_LIBTOOL_CONFIG($1)
AC_LANG_POP
CC="$lt_save_CC"
CC=$lt_save_CC
LDCXX=$LD
LD=$lt_save_LD
GCC=$lt_save_GCC
with_gnu_ldcxx=$with_gnu_ld
with_gnu_ld=$lt_save_with_gnu_ld
lt_cv_path_LDCXX=$lt_cv_path_LD
lt_cv_path_LD=$lt_save_path_LD
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
])# AC_LIBTOOL_LANG_CXX_CONFIG
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])