From 4162b4ff5c0298c99255e01e080954d15a7fca59 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 3 Oct 2008 08:32:05 +0000 Subject: [PATCH] Ubreak PCH, by setting -fPIC option as necessary when compiling PCH. [SVN r49126] --- src/tools/gcc.jam | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index fdce9657f..3e5dca805 100644 --- a/src/tools/gcc.jam +++ b/src/tools/gcc.jam @@ -358,12 +358,21 @@ toolset.flags gcc.compile DEFINES ; toolset.flags gcc.compile INCLUDES ; toolset.flags gcc.compile.c++ TEMPLATE_DEPTH ; +rule compile.c++.pch ( targets * : sources * : properties * ) +{ + setup-fpic $(targets) : $(sources) : $(properties) ; +} actions compile.c++.pch { "$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" } +rule compile.c.pch ( targets * : sources * : properties * ) +{ + setup-fpic $(targets) : $(sources) : $(properties) ; +} + actions compile.c.pch { "$(CONFIG_COMMAND)" -x c-header $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"