This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug pch/36277] Please allow directing pch file localization/usage via direct compiler flag.
- From: "bursig at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 May 2008 15:42:03 -0000
- Subject: [Bug pch/36277] Please allow directing pch file localization/usage via direct compiler flag.
- References: <bug-36277-16198@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from bursig at gmail dot com 2008-05-20 15:42 -------
(In reply to comment #1)
> I really don't see the issue here really, if you don't setup your include
> pathes correctly to include the object directory first, that seems like your
> issue rather than a limitation of GCC.
>
Then please create simple pch.h (with stdlib.h included) and main.c (where you
include pch.h) in same dir. Now create obj dir in pwd and build pch.h.gch (gcc
-H -O2 -Iobj pch.h -c -o obj/pch.h.gch) there. Now build main.c as gcc -O2 -H
-Iobj -c -o main.o main.c. As I know gcc search headers in *.c/*.cpp dir before
touch -I search paths.
In my case pch is not used... As I say may before projects already exist and
changing source tree (moving pch headers outoff sources dir) for gcc is not
good news for me because it will automatically disable pch with Sun CC (Sun
require pch.h in source dir).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36277