From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6297 invoked by alias); 20 May 2008 15:42:46 -0000 Received: (qmail 6180 invoked by uid 48); 20 May 2008 15:42:03 -0000 Date: Tue, 20 May 2008 15:42:00 -0000 Message-ID: <20080520154203.6179.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug pch/36277] Please allow directing pch file localization/usage via direct compiler flag. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "bursig at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-05/txt/msg01554.txt.bz2 ------- 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