This is the mail archive of the 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: 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:
> .x.o:
>         $(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.


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