From a3e17bad4418c03a7fc4957bc4efc6a31ac04474 Mon Sep 17 00:00:00 2001 From: Samuel Martin Date: Sat, 13 Apr 2013 19:41:36 +0200 Subject: 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" Message-Id: Patchwork-Id: 236383 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} \ -- cgit v0.10.2-6-g49f6