This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

other/9031: Cygnus configure versus libtool AC_PROG_LD macro


>Number:         9031
>Category:       other
>Synopsis:       Cygnus configure versus libtool AC_PROG_LD macro
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 20 12:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Dave Anglin
>Release:        gcc-3.3, gcc-3.4, and probably earlier
>Organization:
>Environment:
hppa64-hp-hpux11*, 
>Description:
# gcc -v -print-prog-name=ld
Reading specs from /opt/gnu64/lib/gcc-lib/hppa64-hp-hpux11.11/3.3/specs
/usr/ccs/bin/ld

In the configuration of zlib, you see:
checking for ld used by GCC... ld
checking if the linker (ld) is GNU ld... yes

The ld actually used by gcc is /usr/ccs/bin/ld.

In a native build, Cygnus configure sets LD to "ld".
This default can't be changed by the user except by
editing the configure script.  If LD is not defined
and we are using GCC, the macro AC_PROG_LD will set
LD to the linker used by gcc.  The linker used by gcc
is the linker that libtool needs to use.  If the linker
used by gcc and ld are not the same (i.e., a linker
for gcc was specified with --with-ld), then the wrong
linker is used by libtool.  This results in the wrong
linker being used to build zlib, binutils/bfd, ...

In the case of binutils/bfd with gcc configured with
HP ld, it causes the wrong options to be used linking
libbfd.

The AC_PROG_LD script only works correctly when LD is
not defined, or is defined to the linker used by gcc
when gcc is being used.

I don't think Cygnus configure should unilaterally define
LD, especially without providing a way to override the
default.  However, removing the define would appear to
have ramifications for almost all packages using Cygnus
configure.  I think libtool really wants the ld used
by gcc, not any old linker.

Robert Boehne, one the libtool maintainers, states that
LD is incorrectly set.

 
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]