]> Zhao Yanbai Git Server - minix.git/commitdiff
llvm: Fix OPTFLAGS. 35/3135/1
authorCristiano Giuffrida <giuffrida@cs.vu.nl>
Wed, 28 Jan 2015 12:40:19 +0000 (13:40 +0100)
committerDavid van Moolenbroek <david@minix3.org>
Thu, 17 Sep 2015 13:52:24 +0000 (13:52 +0000)
Change-Id: Id35ac2821ad69825735c50a32bdd04d8453edb22

minix/llvm/build.llvm

index c3b7eb5d9e6123ab9126de25a60ec0a287381af2..913a3114ad79279ed6c9200097744b5369536c8e 100755 (executable)
@@ -140,9 +140,11 @@ echo
 
 cd ${MINIX_ROOT}
 
+OPTFLAGS=`echo ${OPTFLAGS} | sed -e 's/\\$/$$/g'`
 for m in ${MINIX_MODS}
 do 
        echo "Instrumenting $m ..."
+
        n=`get_module_name $m`
        if [ "" == "$n" ]; then
                 echo "Error: Couldn't fetch the module name for $m"
@@ -153,12 +155,11 @@ do
                continue
        fi
        clean_module $n $m
-       OPTFLAGS=`echo ${OPTFLAGS} | sed -e "s/\ /\\\ /g"`
-       OPTFLAGS_PLACEHOLDER="OPTFLAGS.$n=${OPTFLAGS}"
-       
-       (env "`echo ${OPTFLAGS_PLACEHOLDER}`" MKBITCODE=yes \
-       ${TOOLDIR}/nbmake-${ARCH} -C $m all install && echo "INFO: $m successfully instrumented." ) || echo "ERROR: Failed instrumenting $m"
-       echo 
+
+       ( ${TOOLDIR}/nbmake-${ARCH} -C $m all install MKBITCODE=yes OPTFLAGS.$n="${OPTFLAGS}" \
+           && echo "INFO: $m successfully instrumented."
+       )
+       echo
 done
 
 cd ${MYPWD}