This is the mail archive of the
mailing list for the GCC project.
Re: Changes to gcc 3.x to invoke an external cpp (updated patch 2)
- From: "Ashif S. Harji" <asharji at plg2 dot math dot uwaterloo dot ca>
- To: Bernd Schmidt <bernds at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Neil Booth <neil at daikokuya dot demon dot co dot uk>, "Peter A. Buhr" <pabuhr at plg2 dot math dot uwaterloo dot ca>, Zack Weinberg <zack at codesourcery dot com>
- Date: Mon, 24 Dec 2001 16:55:31 -0500 (EST)
- Subject: Re: Changes to gcc 3.x to invoke an external cpp (updated patch 2)
On Mon, 24 Dec 2001, Bernd Schmidt wrote:
> On Mon, 24 Dec 2001, Ashif S. Harji wrote:
> > For the past 10 years, we have
> > been developing concurrency software (uC++) that piggy-backs on g++. This
> > software uses an additional preprocessor to change the source text *after*
> > being processed by cpp. For the past 10 years, we have used the -B flag to
> > supply our own cpp driver that first invokes the standard cpp and then our cpp.
> > However, with the integrated cpp, we can no longer use this
> > mechanism as our user-supplied cpp in the -B directory is no longer invoked
> > unless the -save-temps flag is used, which produces unnecessary files so this
> > is not a clean solution.
> Seems to me that this would be most cleanly done in your Makefiles without
> relying on gcc internals. Pick a new filename extension (e.g. ".x"), then:
> $(CC) -E $< -o tmp1
> my-preprocess tmp1 >tmp2.i
> $(CC) tmp2.i -o $@
> rm tmp1 tmp2.i
We have tried to address why using the -E flag is not sufficient in
previous messages. Please refer to:
and the follow up discussion.
As well, since Makefiles are created by the users of our software, the
above approach is not feasible.