This is the mail archive of the gcc-patches@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]

toplevel foo_for_target


Does anyone know why toplevel makefile computes AS_FOR_TARGET
and LD_FOR_TARGET?  AFAICT, all it does it screw up the more
proper detection that libtool would do.

For instance, on Solaris, if /some/path/{gcc,ld,as} full of
gnu tools is in my path, but gcc is configured with prefix of
/some/otherpath/ that does not contain gnu binutils, then gcc
will prefer to use /usr/ccs/bin/{as,ld}.  Which is fine.

But then the toplevel makefile will set LD=ld when configuring
libstdc++-v3, causing configure to ignore the output from
xgcc --print-file-name=ld, causing libtool to be configured
for the wrong linker, causing the build to fail when we go to
link libstdc++.so.

Anyone see anything wrong with the following patch?


r~



Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/Makefile.in,v
retrieving revision 1.75
diff -c -p -d -r1.75 Makefile.in
*** Makefile.in	2001/03/16 18:34:03	1.75
--- Makefile.in	2001/03/18 21:15:24
*************** X11_FLAGS_TO_PASS = \
*** 424,436 ****
  # If any variables are added here, they must be added to do-*, below.
  EXTRA_TARGET_FLAGS = \
  	'AR=$$(AR_FOR_TARGET)' \
- 	'AS=$$(AS_FOR_TARGET)' \
  	'CC=$$(CC_FOR_TARGET)' \
  	'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
  	'CXX=$$(CXX_FOR_TARGET)' \
  	'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
  	'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
- 	'LD=$$(LD_FOR_TARGET)' \
  	'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
  	'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
  	'NM=$$(NM_FOR_TARGET)' \
--- 424,434 ----
*************** $(DO_X):
*** 984,991 ****
  	    done; \
  	    export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
  	    if (cd $(TARGET_SUBDIR)/$$i; \
! 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
! 			"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
  	                "`echo "RANLIB=$${RANLIB}" | sed -e s/.*=$$/XFOO=/`" \
  			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
  			$${target}); \
--- 982,989 ----
  	    done; \
  	    export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
  	    if (cd $(TARGET_SUBDIR)/$$i; \
! 	        $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" \
! 			"CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
  	                "`echo "RANLIB=$${RANLIB}" | sed -e s/.*=$$/XFOO=/`" \
  			"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
  			$${target}); \
*************** $(CONFIGURE_TARGET_MODULES):
*** 1264,1277 ****
  	    s=`cd $(srcdir); pwd`; export s; \
  	    $(SET_LIB_PATH) \
  	    AR="$(AR_FOR_TARGET)"; export AR; \
- 	    AS="$(AS_FOR_TARGET)"; export AS; \
  	    CC="$(CC_FOR_TARGET)"; export CC; \
  	    CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
  	    CXX="$(CXX_FOR_TARGET)"; export CXX; \
  	    CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
  	    GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
  	    DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- 	    LD="$(LD_FOR_TARGET)"; export LD; \
              LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
  	    NM="$(NM_FOR_TARGET)"; export NM; \
  	    RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
--- 1262,1273 ----


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