Patchwork complibs/ppl: only add -fpermissive flag to CXXFLAGS

login
register
mail settings
Submitter Samuel Martin
Date April 13, 2013, 6:07 p.m.
Message ID <bba2482a06a11415207e.1365876457@smartin-de-2.aldebaran.lan>
Download mbox | patch
Permalink /patch/236383/
State Accepted
Commit 7fe58a4f79f8
Headers show

Comments

Samuel Martin - April 13, 2013, 6:07 p.m.
# HG changeset patch
# User Samuel Martin <smartin@aldebaran-robotics.com>
# Date 1365874896 -7200
# Node ID bba2482a06a11415207e6a85c24b876cbbd463bf
# Parent  30de175d3ed3bf8dc1228bf0abcddc10596936a2
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>


--
For unsubscribe information see http://sourceware.org/lists.html#faq
Yann E. MORIN - April 13, 2013, 9:28 p.m.
Samuel, All,

Your patch:
    complibs/ppl: only add -fpermissive flag to CXXFLAGS

has been applied as: #7fe58a4f79f8
    http://crosstool-ng.org/hg/crosstool-ng/rev/7fe58a4f79f8

Thank you!

Regards,
Yann E. MORIN.



--
For unsubscribe information see http://sourceware.org/lists.html#faq

Patch

diff -r 30de175d3ed3 -r bba2482a06a1 scripts/build/companion_libs/120-ppl.sh
--- a/scripts/build/companion_libs/120-ppl.sh	Thu Mar 21 11:01:09 2013 +0100
+++ b/scripts/build/companion_libs/120-ppl.sh	Sat Apr 13 19:41:36 2013 +0200
@@ -29,6 +29,7 @@ 
 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 @@ 
     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_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 @@ 
     local host
     local prefix
     local cflags
+    local cxxflags
     local ldflags
     local arg
 
@@ -96,7 +103,7 @@ 
 
     CT_DoExecLog CFG                                \
     CFLAGS="${cflags}"                              \
-    CXXFLAGS="${cflags}"                            \
+    CXXFLAGS="${cxxflags}"                          \
     LDFLAGS="${ldflags}"                            \
     "${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \
         --build=${CT_BUILD}                         \