summaryrefslogtreecommitdiff
path: root/scripts/build/companion_libs/120-ppl.sh
diff options
context:
space:
mode:
authorSamuel Martin <smartin@aldebaran-robotics.com>2013-04-13 17:41:36 (GMT)
committerSamuel Martin <smartin@aldebaran-robotics.com>2013-04-13 17:41:36 (GMT)
commita3e17bad4418c03a7fc4957bc4efc6a31ac04474 (patch)
tree885ee803c47a37fbc3ec01d121ce16558fc99e3c /scripts/build/companion_libs/120-ppl.sh
parentb9934ce10aeb1c59468d8581d07ddac6c447a6f1 (diff)
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
Diffstat (limited to 'scripts/build/companion_libs/120-ppl.sh')
-rw-r--r--scripts/build/companion_libs/120-ppl.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/build/companion_libs/120-ppl.sh b/scripts/build/companion_libs/120-ppl.sh
index fb52aa3..87d1512 100644
--- a/scripts/build/companion_libs/120-ppl.sh
+++ b/scripts/build/companion_libs/120-ppl.sh
@@ -29,6 +29,7 @@ do_ppl_extract() {
do_ppl_for_build() {
local -a ppl_opts
local ppl_cflags
+ local ppl_cxxflags
case "${CT_TOOLCHAIN_TYPE}" in
native|cross) return 0;;
@@ -38,13 +39,15 @@ do_ppl_for_build() {
CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-build-${CT_BUILD}"
ppl_cflags="${CT_CFLAGS_FOR_BUILD}"
+ ppl_cxxflags="${CT_CFLAGS_FOR_BUILD}"
if [ "${CT_PPL_NEEDS_FPERMISSIVE}" = "y" ]; then
- ppl_cflags+=" -fpermissive"
+ ppl_cxxflags+=" -fpermissive"
fi
ppl_opts+=( "host=${CT_BUILD}" )
ppl_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
ppl_opts+=( "cflags=${ppl_cflags}" )
+ ppl_opts+=( "cxxflags=${ppl_cxxflags}" )
ppl_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
do_ppl_backend "${ppl_opts[@]}"
@@ -56,18 +59,21 @@ do_ppl_for_build() {
do_ppl_for_host() {
local -a ppl_opts
local ppl_cflags
+ local ppl_cxxflags
CT_DoStep INFO "Installing PPL for host"
CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-host-${CT_HOST}"
ppl_cflags="${CT_CFLAGS_FOR_HOST}"
+ ppl_cxxflags="${CT_CFLAGS_FOR_HOST}"
if [ "${CT_PPL_NEEDS_FPERMISSIVE}" = "y" ]; then
- ppl_cflags+=" -fpermissive"
+ ppl_cxxflags+=" -fpermissive"
fi
ppl_opts+=( "host=${CT_HOST}" )
ppl_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
ppl_opts+=( "cflags=${ppl_cflags}" )
+ ppl_opts+=( "cxxflags=${ppl_cxxflags}" )
ppl_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
do_ppl_backend "${ppl_opts[@]}"
@@ -85,6 +91,7 @@ do_ppl_backend() {
local host
local prefix
local cflags
+ local cxxflags
local ldflags
local arg
@@ -96,7 +103,7 @@ do_ppl_backend() {
CT_DoExecLog CFG \
CFLAGS="${cflags}" \
- CXXFLAGS="${cflags}" \
+ CXXFLAGS="${cxxflags}" \
LDFLAGS="${ldflags}" \
"${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \
--build=${CT_BUILD} \