------- Additional Comments From Ralf dot Wildenhues at gmx dot de 2005-01-20 15:47 ------- mkdir src build echo 'extern int foo;' > src/foo.h echo >src/bar.c '#include "foo.h" int bar(void) { return foo; }' cd build gcc -o foo.h.gch ../src/foo.h gcc -H -c ../src/bar.c
This will not use the gch in the current directory, unless I also specify `-I. -I-'. Putting the pch under the source tree works against all VPATH build principles (read-only source tree). It does not matter whether I use a directory build/foo.h.gch/ or a file. (The other bug I reported was indeed false, apologies for the reading disability that struck me there.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19541