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]
Other format: [Raw text]

[gcc-in-cxx] Pick up previous -lstdc++ in later bootstrap stages


This patch adds support for picking up the -lstdc++ built in the
previous stage when doing a bootstrap.  This is done in $(CXX), in
$(CXX_FOR_BUILD), and by adding it to $(RPATH_ENVVAR) (normally
LD_LIBRARY_PATH).  Committed to gcc-in-cxx branch.

Ian


2009-03-04  Ian Lance Taylor  <iant@google.com>

	* Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Add -L option to CXX and
	CXX_FOR_BUILD to pick up previous libstdc++.  Set RPATH_ENVVAR to
	point to previous libstdc++.
	* Makefile.in: Rebuild.


Index: Makefile.tpl
===================================================================
--- Makefile.tpl	(revision 144568)
+++ Makefile.tpl	(working copy)
@@ -222,7 +222,8 @@ POSTSTAGE1_HOST_EXPORTS = \
 	  -nostdinc++ \
 	  -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
 	  -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
-	  -I$$r/$(srcdir)/libstdc++-v3/libsupc++"; export CXX; \
+	  -I$$r/$(srcdir)/libstdc++-v3/libsupc++ \
+	  -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; export CXX; \
 	CXX_FOR_BUILD="$(STAGE_CC_WRAPPER) \
 	  $$r/$(HOST_SUBDIR)/prev-gcc/g++$(exeext) \
 	  -B$$r/$(HOST_SUBDIR)/prev-gcc/ \
@@ -230,8 +231,12 @@ POSTSTAGE1_HOST_EXPORTS = \
 	  -nostdinc++ \
 	  -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
 	  -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
-	  -I$$r/$(srcdir)/libstdc++-v3/libsupc++"; export CXX_FOR_BUILD; \
-	LDFLAGS="$(BOOT_LDFLAGS)"; export LDFLAGS;
+	  -I$$r/$(srcdir)/libstdc++-v3/libsupc++ \
+	  -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; \
+	  export CXX_FOR_BUILD; \
+	LDFLAGS="$(BOOT_LDFLAGS)"; export LDFLAGS; \
+	$(RPATH_ENVVAR)=`echo "$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:$$$(RPATH_ENVVAR)"| sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \
+	export $(RPATH_ENVVAR);
 
 # Target libraries are put under this directory:
 TARGET_SUBDIR = @target_subdir@

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