complibs/ppl: only add -fpermissive flag to CXXFLAGS
authorSamuel Martin <smartin@aldebaran-robotics.com>
Sat Apr 13 19:41:36 2013 +0200 (2013-04-13)
changeset 32067fe58a4f79f8
parent 3205 30de175d3ed3
child 3207 ec3c3aa99c79
complibs/ppl: only add -fpermissive flag to CXXFLAGS

-fpermissive is not a valid option to gcc.

Adding it to the CFLAGS make the ppl checks fail with the following
error:

[ALL ] Making check in tests
[ALL ] cc1: warnings being treated as errors
[ERROR] cc1: error: command line option "-fpermissive" is valid for C++/ObjC++ but not for C
[ALL ] cc1: warnings being treated as errors
[ERROR] cc1: error: command line option "-fpermissive" is valid for C++/ObjC++ but not for C
[ERROR] make[7]: *** [formatted_output.o] Error 1

Signed-off-by: "Samuel Martin" <smartin@aldebaran-robotics.com>
Message-Id: <bba2482a06a11415207e.1365876457@smartin-de-2.aldebaran.lan>
Patchwork-Id: 236383
scripts/build/companion_libs/120-ppl.sh
     1.1 --- a/scripts/build/companion_libs/120-ppl.sh	Thu Mar 21 11:01:09 2013 +0100
     1.2 +++ b/scripts/build/companion_libs/120-ppl.sh	Sat Apr 13 19:41:36 2013 +0200
     1.3 @@ -29,6 +29,7 @@
     1.4  do_ppl_for_build() {
     1.5      local -a ppl_opts
     1.6      local ppl_cflags
     1.7 +    local ppl_cxxflags
     1.8  
     1.9      case "${CT_TOOLCHAIN_TYPE}" in
    1.10          native|cross)   return 0;;
    1.11 @@ -38,13 +39,15 @@
    1.12      CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-build-${CT_BUILD}"
    1.13  
    1.14      ppl_cflags="${CT_CFLAGS_FOR_BUILD}"
    1.15 +    ppl_cxxflags="${CT_CFLAGS_FOR_BUILD}"
    1.16      if [ "${CT_PPL_NEEDS_FPERMISSIVE}" = "y" ]; then
    1.17 -        ppl_cflags+=" -fpermissive"
    1.18 +        ppl_cxxflags+=" -fpermissive"
    1.19      fi
    1.20  
    1.21      ppl_opts+=( "host=${CT_BUILD}" )
    1.22      ppl_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
    1.23      ppl_opts+=( "cflags=${ppl_cflags}" )
    1.24 +    ppl_opts+=( "cxxflags=${ppl_cxxflags}" )
    1.25      ppl_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
    1.26      do_ppl_backend "${ppl_opts[@]}"
    1.27  
    1.28 @@ -56,18 +59,21 @@
    1.29  do_ppl_for_host() {
    1.30      local -a ppl_opts
    1.31      local ppl_cflags
    1.32 +    local ppl_cxxflags
    1.33  
    1.34      CT_DoStep INFO "Installing PPL for host"
    1.35      CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-host-${CT_HOST}"
    1.36  
    1.37      ppl_cflags="${CT_CFLAGS_FOR_HOST}"
    1.38 +    ppl_cxxflags="${CT_CFLAGS_FOR_HOST}"
    1.39      if [ "${CT_PPL_NEEDS_FPERMISSIVE}" = "y" ]; then
    1.40 -        ppl_cflags+=" -fpermissive"
    1.41 +        ppl_cxxflags+=" -fpermissive"
    1.42      fi
    1.43  
    1.44      ppl_opts+=( "host=${CT_HOST}" )
    1.45      ppl_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
    1.46      ppl_opts+=( "cflags=${ppl_cflags}" )
    1.47 +    ppl_opts+=( "cxxflags=${ppl_cxxflags}" )
    1.48      ppl_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
    1.49      do_ppl_backend "${ppl_opts[@]}"
    1.50  
    1.51 @@ -85,6 +91,7 @@
    1.52      local host
    1.53      local prefix
    1.54      local cflags
    1.55 +    local cxxflags
    1.56      local ldflags
    1.57      local arg
    1.58  
    1.59 @@ -96,7 +103,7 @@
    1.60  
    1.61      CT_DoExecLog CFG                                \
    1.62      CFLAGS="${cflags}"                              \
    1.63 -    CXXFLAGS="${cflags}"                            \
    1.64 +    CXXFLAGS="${cxxflags}"                          \
    1.65      LDFLAGS="${ldflags}"                            \
    1.66      "${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \
    1.67          --build=${CT_BUILD}                         \