jam0 use passed cflags
authorAnas Nashif <anas.nashif@intel.com>
Tue, 30 Oct 2012 20:11:33 +0000 (13:11 -0700)
committerAnas Nashif <anas.nashif@intel.com>
Tue, 30 Oct 2012 20:11:33 +0000 (13:11 -0700)
build.jam
build.sh

index 266b07a17d465f1600bc86d8ecbb3107767b9fba..60adfb6604fe0be8e747aa948edf403f18935a22 100644 (file)
--- a/build.jam
+++ b/build.jam
@@ -212,7 +212,7 @@ toolset darwin cc :  "-o " : -D
 ## GCC 2.x, 3.x, 4.x
 toolset gcc gcc : "-o " : -D
     : -pedantic -fno-strict-aliasing
-    [ opt --release : [ opt --symbols : -g : -s ] -O3 ]
+    [ opt --release : [ opt --symbols : -g : -s ] $(CFLAGS) ]
     [ opt --debug : -g -O0 -fno-inline ]
     -I$(--python-include) -I$(--extra-include) -Wno-long-long
     : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
index 543fb2836427b26a959c92b170666916df251b15..f04be48e6180e9c545a5418f309d83985bc30730 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -12,7 +12,7 @@ BOOST_JAM_TOOLSET=
 echo_run ()
 {
     echo "$@"
-    $@
+    eval "$@"
     r=$?
     if test $r -ne 0 ; then
         exit $r
@@ -299,5 +299,9 @@ if test -x "./bootstrap/jam0" ; then
     if test "${BJAM_UPDATE}" != "update" ; then
         echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean
     fi
-    echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@"
+    if test -z "$BOOST_JAM_TOOLSET_ROOT"; then
+        echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "$@"
+    else
+        echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@"
+    fi
 fi