This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
A patch for toplevel Makefile.in
- To: binutils at sourceware dot cygnus dot com
- Subject: A patch for toplevel Makefile.in
- From: "H . J . Lu" <hjl at valinux dot com>
- Date: Fri, 10 Mar 2000 12:55:42 -0800
- Cc: egcs-patches at egcs dot cygnus dot com, wilson at cygnus dot com
Hi,
I checked in the patch enclosed here into binutils. The detailed
discussions can be found at
http://sourceware.cygnus.com/ml/binutils/2000-03/msg00116.html
http://sourceware.cygnus.com/ml/binutils/2000-03/msg00133.html
and their followups. I suggest gcc should also consider this patch.
Thanks.
H.J.
---
2000-03-10 H.J. Lu <hjl@gnu.org>
* Makefile.in (all-gcc): Run ld/ld-new if necessary.
--- Makefile.in.orig Wed Mar 8 16:18:17 2000
+++ Makefile.in Fri Mar 10 10:47:05 2000
@@ -1457,6 +1457,17 @@ $(INSTALL_X11_MODULES): installdirs
# gcc is the only module which uses GCC_FLAGS_TO_PASS.
.PHONY: all-gcc
all-gcc:
+ # When configured with --enable-shared, libtool creates a
+ # script in the build directory which automatically relinks
+ # the program to search for shared libraries in the build
+ # directory. However, when ld/ld-new is called the first time
+ # from the new gcc, all the compiler environment variables are
+ # set to use the new gcc. ld/ld-new will use the new gcc to
+ # relink the new linker. It is incorrect. We cannot run
+ # ld/ld-new the first time from the new gcc. It is a very
+ # special case. We deal with it here.
+ -if test -f gcc/Makefile -a -x ld/ld-new -a -x ld/.libs/ld-new; then \
+ ld/ld-new -v >/dev/null 2>&1; fi
@if [ -f ./gcc/Makefile ] ; then \
r=`pwd`; export r; \
s=`cd $(srcdir); pwd`; export s; \