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

Re: 3.1 Bootstrap failure on Solaris 2.8


On Mar 30, 2001, "Zack Weinberg" <zackw@stanford.edu> wrote:

> Looks like the code embedded in CXX_FOR_TARGET gets evaluated here, in
> completely the wrong context.

Doh!  Yep, you hit it on the nail!  Thanks a lot for the
investigation.

Here's a candidate fix I'm testing right now.  Please let me know
whether it fixes the problem for you, and I'll check it in (or feel
free to beat me to it, I'll go off-line in a couple of minutes, and
will be off-line until late in the evening tomorrow).

There are some unrelated whitespace changes in here too.  I'd like to
check them in together (just because this is what I'm testing, and I
hadn't noticed these changes were still in), but I could easily be
convinced to re-test without them, or just take them out.

Index: ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* Makefile.in (RECURSE_UNCHANGED_FLAGS): New macro.
	(bootstrap, cross): Use it.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/Makefile.in,v
retrieving revision 1.79
diff -u -p -r1.79 Makefile.in
--- Makefile.in 2001/03/23 23:59:17 1.79
+++ Makefile.in 2001/03/30 21:33:05
@@ -390,6 +390,14 @@ BASE_FLAGS_TO_PASS = \
 	"gcc_version_trigger=$(gcc_version_trigger)" \
 	"target_alias=$(target_alias)" 
 
+# For any flags above that may contain shell code that varies from one
+# target library to another.  When doing recursive invocations of the
+# top-level Makefile, we don't want the outer make to evaluate them,
+# so we pass these variables down unchanged.  They must not contain
+# single nor double quotes.
+RECURSE_UNCHANGED_FLAGS = \
+	"CXX_FOR_TARGET='$(CXX_FOR_TARGET)'"
+
 # Flags to pass down to most sub-makes, in which we're building with
 # the host environment.
 # If any variables are added here, they must be added to do-*, below.
@@ -1345,7 +1353,8 @@ $(ALL_TARGET_MODULES):
 	  r=`pwd`; export r; \
 	  s=`cd $(srcdir); pwd`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
+	  (cd $(TARGET_SUBDIR)/$${dir}; \
+	    $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
 	else \
 	  true; \
 	fi
@@ -1359,7 +1368,8 @@ $(CHECK_TARGET_MODULES):
 	  r=`pwd`; export r; \
 	  s=`cd $(srcdir); pwd`; export s; \
 	  $(SET_LIB_PATH) \
-	  (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
+	  (cd $(TARGET_SUBDIR)/$${dir}; \
+	    $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
 	else \
 	  true; \
 	fi
@@ -1474,7 +1484,7 @@ bootstrap bootstrap-lean bootstrap2 boot
 	s=`cd $(srcdir); pwd` ; export s; \
 	$(SET_LIB_PATH) \
 	echo "Building runtime libraries"; \
-	$(MAKE) $(BASE_FLAGS_TO_PASS) all
+	$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_UNCHANGED_FLAGS) all
 
 .PHONY: cross
 cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
@@ -1487,7 +1497,8 @@ cross: all-texinfo all-bison all-byacc a
 	s=`cd $(srcdir); pwd` ; export s; \
 	$(SET_LIB_PATH) \
 	echo "Building runtime libraries"; \
-	$(MAKE) $(BASE_FLAGS_TO_PASS) all LANGUAGES="c c++"
+	$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_UNCHANGED_FLAGS) \
+	  LANGUAGES="c c++" all
 
 .PHONY: check-gcc
 check-gcc:

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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