]> code.ossystems Code Review - openembedded-core.git/commitdiff
boost: properly fix do_boostconfig re-execution
authorMartin Jansa <martin.jansa@gmail.com>
Thu, 14 May 2015 11:41:26 +0000 (13:41 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 15 May 2015 11:05:52 +0000 (12:05 +0100)
* it was partially fixed in:
  commit 291e20a51544c640d07767d1dc32d762f4370f41
  Author: Venkata ramana gollamudi <ramana.gollamudi@huawei.com>
  Date:   Fri Apr 13 11:42:46 2012 +0000
  Subject: boost: fix re-execution of task

  but with disadvantage that when CXX or *FLAGS variables were changed
  it was continuing to use old values
* just remove the line before appending it with current values to fix
  that

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/boost/boost.inc

index 7628e37d6fbe972b0850f5912a47968103c89f85..d95d281fefaed19ed7b171e39a30f71ec65fa1bb 100644 (file)
@@ -60,7 +60,7 @@ RRECOMMENDS_${PN}_class-native = ""
 ALLOW_EMPTY_${PN} = "1"
 
 # to avoid GNU_HASH QA errors added LDFLAGS to ARCH; a little bit dirty but at least it works
-TARGET_CC_ARCH += " ${LDFLAGS}" 
+TARGET_CC_ARCH += "${LDFLAGS}"
 
 # Oh yippee, a new build system, it's sooo cooool I could eat my own
 # foot.  inlining=on lets the compiler choose, I think.  At least this
@@ -143,11 +143,9 @@ do_boostconfig() {
        cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp
 
        # D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation.
-       if ! grep -qe "^using gcc : 4.3.1" ${S}/tools/build/example/user-config.jam 
-       then
-               echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam
-       fi      
-
+       sed -i "/^using gcc : 4.3.1/d" ${S}/tools/build/example/user-config.jam
+       sed -i "/^using python : ${PYTHON_BASEVERSION}"/d ${S}/tools/build/example/user-config.jam
+       echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam
        echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/example/user-config.jam
 
        CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT}