summaryrefslogtreecommitdiff
path: root/devel/boost-libs/files/patch-tools__build__v2__tools__clang-linux.jam
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2014-02-13 19:42:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2014-02-13 19:42:23 +0000
commit19b90b3c32af8d319b21be067853324cc2a16c39 (patch)
treef065e859385b2b1128c5f4ae4e5fd274eac2d5db /devel/boost-libs/files/patch-tools__build__v2__tools__clang-linux.jam
parent- Update to 20140213 (0.4.4-dev) (diff)
For clang, use the type of precompiled headers recommended by upstream
(generated by -emit-pch), instead of the deprecated ones (generated by -emit-pth). Approved by: bapt
Diffstat (limited to 'devel/boost-libs/files/patch-tools__build__v2__tools__clang-linux.jam')
-rw-r--r--devel/boost-libs/files/patch-tools__build__v2__tools__clang-linux.jam92
1 files changed, 92 insertions, 0 deletions
diff --git a/devel/boost-libs/files/patch-tools__build__v2__tools__clang-linux.jam b/devel/boost-libs/files/patch-tools__build__v2__tools__clang-linux.jam
new file mode 100644
index 000000000000..532d2688b28a
--- /dev/null
+++ b/devel/boost-libs/files/patch-tools__build__v2__tools__clang-linux.jam
@@ -0,0 +1,92 @@
+--- tools/build/v2/tools/clang-linux.jam.orig 2011-06-06 22:36:21.000000000 +0200
++++ tools/build/v2/tools/clang-linux.jam 2014-02-09 22:19:34.000000000 +0100
+@@ -31,7 +31,7 @@
+ generators.override clang-linux.compile.c++.pch : pch.default-cpp-pch-generator ;
+
+ type.set-generated-target-suffix PCH
+- : <toolset>clang <toolset-clang:platform>linux : pth ;
++ : <toolset>clang <toolset-clang:platform>linux : pch ;
+
+ toolset.inherit-rules clang-linux : gcc ;
+ toolset.inherit-flags clang-linux : gcc
+@@ -95,24 +95,24 @@
+ gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
+ gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
+
+- local pth-file = [ on $(<) return $(PCH_FILE) ] ;
++ local pch-file = [ on $(<) return $(PCH_FILE) ] ;
+
+- if $(pth-file) {
+- DEPENDS $(<) : $(pth-file) ;
++ if $(pch-file) {
++ DEPENDS $(<) : $(pch-file) ;
+ clang-linux.compile.c++.with-pch $(targets) : $(sources) ;
+ }
+ else {
+- clang-linux.compile.c++.without-pth $(targets) : $(sources) ;
++ clang-linux.compile.c++.without-pch $(targets) : $(sources) ;
+ }
+ }
+
+-actions compile.c++.without-pth {
++actions compile.c++.without-pch {
+ "$(CONFIG_COMMAND)" -c -x c++ $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o "$(<)" "$(>)"
+ }
+
+ actions compile.c++.with-pch bind PCH_FILE
+ {
+- "$(CONFIG_COMMAND)" -c -x c++ $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -include-pth -Xclang "$(PCH_FILE)" -o "$(<)" "$(>)"
++ "$(CONFIG_COMMAND)" -c -x c++ $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -include-pch -Xclang "$(PCH_FILE)" -o "$(<)" "$(>)"
+ }
+
+ rule compile.c ( targets * : sources * : properties * )
+@@ -121,25 +121,25 @@
+ gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
+ gcc.setup-address-model $(targets) : $(sources) : $(properties) ;
+
+- local pth-file = [ on $(<) return $(PCH_FILE) ] ;
++ local pch-file = [ on $(<) return $(PCH_FILE) ] ;
+
+- if $(pth-file) {
+- DEPENDS $(<) : $(pth-file) ;
++ if $(pch-file) {
++ DEPENDS $(<) : $(pch-file) ;
+ clang-linux.compile.c.with-pch $(targets) : $(sources) ;
+ }
+ else {
+- clang-linux.compile.c.without-pth $(targets) : $(sources) ;
++ clang-linux.compile.c.without-pch $(targets) : $(sources) ;
+ }
+ }
+
+-actions compile.c.without-pth
++actions compile.c.without-pch
+ {
+ "$(CONFIG_COMMAND)" -c -x c $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+ }
+
+ actions compile.c.with-pch bind PCH_FILE
+ {
+- "$(CONFIG_COMMAND)" -c -x c $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -include-pth -Xclang "$(PCH_FILE)" -c -o "$(<)" "$(>)"
++ "$(CONFIG_COMMAND)" -c -x c $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -include-pch -Xclang "$(PCH_FILE)" -c -o "$(<)" "$(>)"
+ }
+
+ ###############################################################################
+@@ -152,7 +152,7 @@
+ }
+
+ actions compile.c++.pch {
+- rm -f "$(<)" && "$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -emit-pth -o "$(<)" "$(>)"
++ rm -f "$(<)" && "$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -emit-pch -o "$(<)" "$(>)"
+ }
+
+ rule compile.c.pch ( targets * : sources * : properties * ) {
+@@ -163,7 +163,7 @@
+
+ actions compile.c.pch
+ {
+- rm -f "$(<)" && "$(CONFIG_COMMAND)" -x c-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -emit-pth -o "$(<)" "$(>)"
++ rm -f "$(<)" && "$(CONFIG_COMMAND)" -x c-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -Xclang -emit-pch -o "$(<)" "$(>)"
+ }
+
+ ###############################################################################