This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR target/16344
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Cc: mark at codesourcery dot com, geoffk at geoffk dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 7 Jul 2004 16:29:56 -0400 (EDT)
- Subject: 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