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]

Re: [PATCH] Fix PR target/16344


> The problem is the PLT is moving from one invocation of cc1plus to
> another.  I'm not sure why.  Currently, function descriptors live in
> the PLT.  So, if it moves, the PCH is dead even if the text is in the
> same location as it was when the PCH file was written.  If this can't
> be fixed, then the only solution is to avoid writing out any function
> pointers.

It turns out that the PLT isn't moving.  The problem is a Makefile
issue.  The runtime libraries are being built with the training compiler
in a profiled build.  Then, we use the profiled feedback compiler
when the testsuite is run.  As a result, PCH is disabled.

I am testing the enclosed fix.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2004-07-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR target/16344
	* Makefile.tpl: Build runtime libraries with feedback based compiler.

Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.79
diff -u -3 -p -r1.79 Makefile.tpl
--- Makefile.tpl	14 Jan 2004 20:09:37 -0000	1.79
+++ Makefile.tpl	7 Jul 2004 20:11:09 -0000
@@ -1177,18 +1177,18 @@ profiledbootstrap: all-bootstrap configu
 	@r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(SET_LIB_PATH) \
-	echo "Bootstrapping the compiler"; \
+	echo "Bootstrapping the training compiler"; \
 	cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
 	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
-	$(SET_LIB_PATH) \
-	echo "Building runtime libraries and training compiler"; \
-	$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
-	@r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(SET_LIB_PATH) \
-	echo "Building feedback based compiler"; \
+	echo "Building the feedback based compiler"; \
 	cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+	$(SET_LIB_PATH) \
+	echo "Building the runtime libraries"; \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
 
 .PHONY: cross
 cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld


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