summaryrefslogtreecommitdiff
path: root/tools/build/src/tools/gcc.jam
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:38:45 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:39:52 +0900
commit5cde13f21d36c7224b0e13d11c4b49379ae5210d (patch)
treee8269ac85a4b0f7d416e2565fa4f451b5cb41351 /tools/build/src/tools/gcc.jam
parentd9ec475d945d3035377a0d89ed42e382d8988891 (diff)
downloadboost-5cde13f21d36c7224b0e13d11c4b49379ae5210d.tar.gz
boost-5cde13f21d36c7224b0e13d11c4b49379ae5210d.tar.bz2
boost-5cde13f21d36c7224b0e13d11c4b49379ae5210d.zip
Imported Upstream version 1.61.0
Change-Id: I96a1f878d1e6164f01e9aadd5147f38fca448d90 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'tools/build/src/tools/gcc.jam')
-rw-r--r--tools/build/src/tools/gcc.jam23
1 files changed, 16 insertions, 7 deletions
diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
index e94eced204..0f346a5015 100644
--- a/tools/build/src/tools/gcc.jam
+++ b/tools/build/src/tools/gcc.jam
@@ -12,6 +12,7 @@
import "class" : new ;
import common ;
+import cygwin ;
import feature ;
import fortran ;
import generators ;
@@ -231,13 +232,9 @@ rule init ( version ? : command * : options * )
# programs as needed to prefer using their installation specific versions.
# This is essential for correct use of MinGW and for cross-compiling.
- local nl = "
-" ;
-
# - Archive builder.
local archiver = [ common.get-invocation-command gcc
- : [ NORMALIZE_PATH [ MATCH "(.*)[$(nl)]+" :
- [ SHELL "$(command-string) -print-prog-name=ar" ] ] ]
+ : [ .get-prog-name $(command-string) : ar : $(flavor) ]
: [ feature.get-values <archiver> : $(options) ]
: $(bin)
: search-path ] ;
@@ -249,8 +246,7 @@ rule init ( version ? : command * : options * )
# - Ranlib.
local ranlib = [ common.get-invocation-command gcc
- : [ NORMALIZE_PATH [ MATCH "(.*)[$(nl)]+" :
- [ SHELL "$(command-string) -print-prog-name=ranlib" ] ] ]
+ : [ .get-prog-name $(command-string) : ranlib : $(flavor) ]
: [ feature.get-values <ranlib> : $(options) ]
: $(bin)
: search-path ] ;
@@ -286,6 +282,19 @@ if [ os.name ] = NT
JAMSHELL = % ;
}
+# Uses -print-prog-name to get the name of the tool.
+# Converts the path to native form if using cygwin.
+rule .get-prog-name ( command-string : tool : flavor ? )
+{
+ local prog-name = [ NORMALIZE_PATH [ MATCH "(.*)[\n]+" :
+ [ SHELL "$(command-string) -print-prog-name=$(tool)" ] ] ] ;
+ if $(flavor) != mingw && [ os.name ] = NT
+ {
+ prog-name = [ cygwin.cygwin-to-windows-path $(prog-name) ] ;
+ }
+ return $(prog-name) ;
+}
+
generators.register-c-compiler gcc.compile.c++.preprocess : CPP : PREPROCESSED_CPP : <toolset>gcc ;
generators.register-c-compiler gcc.compile.c.preprocess : C : PREPROCESSED_C : <toolset>gcc ;
generators.register-c-compiler gcc.compile.c++ : CPP : OBJ : <toolset>gcc ;