This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: -fpic/-fPIC testresults under sol2.9 & ppclinux trunk


> > To disable PCH in the testrun, remove PCHFLAGS from
> > libstdc++-v3/testsuite_hooks. PCH enabled/disabled should give the same
> > testresults.
> > -benjamin
>
>Thanks for the pointer, that'll make testing easier.  Sorry, I haven't
>had time to check removing PCH flags yet.  (And did you mean
>testsuite_flags.in rather than testsuite_hooks?)

Either will work. If you edit testsuite_flags.in then you won't have to
edit the generated testsuite_flags every time you bootstrap.

>However I did manage to reproduce the problem on x86-linux-gnu and
>mips-irix6.5, so it does seem to affect our most widely used
>platforms.  E.g.:
>http://gcc.gnu.org/ml/gcc-testresults/2003-05/msg00593.html

Yeah, I saw this.

:(

>Wild guess here, if PCH turns out to be the culprit it may be simply
>because the pre-compiled header is generated without regard to the
>extra flags used in RUNTESTFLAGS.  E.g. PCH was generated "regular"
>and the extra testsuite passes use -fpic or something else which
>doesn't match.
>
>Is this possible and would it cause these symptoms?  If so, the
>solution may be as simple as removing and regenerating the PCH file
>once for each separate testsuite pass with the extra flag(s).  I'm not
>familiar enough with the code to diagnose or fix this though.

Perhaps, but I think this is unlikely. If no PCH's can be used (most
often due to certain flags defining new macros, diagnosed with
-Winvalid-pch), then a blank file containing nothing is included, and
the file is compiled as you'd expect, ie all include files are included
individually as happened pre-PCH.

All generated pre-compiled headers are checked to see if they are valid
given the current compilation flags. (Although this is difficult to
determine given the current shabby PCH + cpp diagnostics) 

Currently, two PCH files are built, one with -O0, and one with -O2. See 
(build)/(target)/libstdc++-v3/include/(target)/bits/stdc++.h.gch/*

It would be easy enough to build more than these two, if necessary.

>I'll try taking out PCHFLAGS from testsuite_flags.in tonight and see
>if that makes the problem go away.  If it does, we've narrowed the
>cause of the problem at least.  I'll let you know.

Thanks Kaveh, this would be helpful. Please let me know what you find.

-benjamin


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