# HG changeset patch # User "Yann E. MORIN" # Date 1355095548 -3600 # Node ID 3829050af02adff0e54fb0cf93844c3fab553873 # Parent 863723936e242a8ef9aa72b673ef425cccd4b35e complibs/ppl: fix build with newer gcc ppl-0.10.x does not build with gcc-4.6+, as it uses constructs that were warnings with gcc-4.5 and before, but are now errors with gcc-4.6 and above. Fix that by passing -fpermissive in CFLAGS for ppl 0.10. Reported-by: Jeremy Rosen Reported-by: Peter Korsgaard Signed-off-by: "Yann E. MORIN" diff -r 863723936e24 -r 3829050af02a config/companion_libs/ppl.in --- a/config/companion_libs/ppl.in Wed Dec 05 20:31:43 2012 +0100 +++ b/config/companion_libs/ppl.in Mon Dec 10 00:25:48 2012 +0100 @@ -24,6 +24,7 @@ config PPL_V_0_10_2 bool prompt "0.10.2" + select PPL_NEEDS_FPERMISSIVE endchoice @@ -36,6 +37,11 @@ default "0.11" if PPL_V_0_11 default "0.10.2" if PPL_V_0_10_2 +# For PPL 0.10, we need -fpermissive to build on gcc 4.7+ +# (even gcc-4.6+ ?) +config PPL_NEEDS_FPERMISSIVE + bool + # For PPL 0.11, we need to pull libpwl if configured static config PPL_0_11 bool diff -r 863723936e24 -r 3829050af02a scripts/build/companion_libs/120-ppl.sh --- a/scripts/build/companion_libs/120-ppl.sh Wed Dec 05 20:31:43 2012 +0100 +++ b/scripts/build/companion_libs/120-ppl.sh Mon Dec 10 00:25:48 2012 +0100 @@ -30,6 +30,7 @@ # - install in build-tools prefix do_ppl_for_build() { local -a ppl_opts + local ppl_cflags case "${CT_TOOLCHAIN_TYPE}" in native|cross) return 0;; @@ -38,9 +39,14 @@ CT_DoStep INFO "Installing PPL for build" CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-build-${CT_BUILD}" + ppl_cflags="${CT_CFLAGS_FOR_BUILD}" + if [ "${CT_PPL_NEEDS_FPERMISSIVE}" = "y" ]; then + ppl_cflags+=" -fpermissive" + fi + ppl_opts+=( "host=${CT_BUILD}" ) ppl_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) - ppl_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) + ppl_opts+=( "cflags=${ppl_cflags}" ) ppl_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) do_ppl_backend "${ppl_opts[@]}" @@ -51,13 +57,19 @@ # Build PPL for running on host do_ppl_for_host() { local -a ppl_opts + local ppl_cflags CT_DoStep INFO "Installing PPL for host" CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-host-${CT_HOST}" + ppl_cflags="${CT_CFLAGS_FOR_HOST}" + if [ "${CT_PPL_NEEDS_FPERMISSIVE}" = "y" ]; then + ppl_cflags+=" -fpermissive" + fi + ppl_opts+=( "host=${CT_HOST}" ) ppl_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" ) - ppl_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) + ppl_opts+=( "cflags=${ppl_cflags}" ) ppl_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) do_ppl_backend "${ppl_opts[@]}"