libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_PROG_LD


From: John David Anglin
Subject: AC_PROG_LD
Date: Tue, 17 Dec 2002 14:17:48 -0500 (EST)

The toplevel configure scripts in binutils and gcc define LD=ld in native
(non-canadian cross) builds.  This causes the AC_PROG_LD to select the
default value of ld.  As result, packages are misconfigured if the linker
used by GCC is not ld.  In the case of binutils, this causes a build
error linking libbfd due to incorrect linker options being selected by
libtool.

The enclosed patch changes the behavior of AC_PROG_LD to choose the GCC
linker when it encounters the default value of "ld".  The other possible
fix is to not define LD in the toplevel configure script.  However, as
this is used for many different packages, I think there are circumstances
when libtool is not being used that require a default value for LD.

Dave
-- 
J. David Anglin                                  address@hidden
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2002-12-17  John David Anglin  <address@hidden>

        * libtool.m4 (AC_PROG_LD): Use ld used by GCC when LD is set to "ld".

Index: libtool.m4
===================================================================
RCS file: /home/cvs/libtool/libtool.m4,v
retrieving revision 1.280
diff -u -3 -p -r1.280 libtool.m4
--- libtool.m4  11 Dec 2002 19:44:59 -0000      1.280
+++ libtool.m4  17 Dec 2002 18:56:42 -0000
@@ -1875,7 +1875,9 @@ if test "$GCC" = yes; then
       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
       done
-      test -z "$LD" && LD="$ac_prog"
+      if test -z "$LD" || test "$LD" = ld; then
+       LD="$ac_prog"
+      fi
       ;;
   "")
     # If it fails, then pretend we aren't using GCC.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]