diff options
author | Yann E. MORIN" <yann.morin.1998@free.fr> | 2012-12-09 23:25:48 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@free.fr> | 2012-12-09 23:25:48 (GMT) |
commit | fc4d1bf65fbde3e791b8e3d564b0daab287e3018 (patch) | |
tree | e6fe019fa529a814859d587432f92497a44498d6 /scripts/build | |
parent | 288ac9d627df92cfcffdc28180f0f19ef18a4cf8 (diff) |
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 <jeremy.rosen@openwide.fr>
Reported-by: Peter Korsgaard <jacmet@uclibc.org>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/companion_libs/120-ppl.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/build/companion_libs/120-ppl.sh b/scripts/build/companion_libs/120-ppl.sh index 93a07ca..e7e17fc 100644 --- a/scripts/build/companion_libs/120-ppl.sh +++ b/scripts/build/companion_libs/120-ppl.sh @@ -30,6 +30,7 @@ do_ppl_extract() { # - 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 @@ do_ppl_for_build() { 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 @@ do_ppl_for_build() { # 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[@]}" |