scripts/build/companion_libs/120-ppl.sh
changeset 3159 fb71cad4b085
parent 3119 1c56c03b7ed5
child 3180 0c76cb00a9c6
     1.1 --- a/scripts/build/companion_libs/120-ppl.sh	Fri Nov 16 15:25:57 2012 +0100
     1.2 +++ b/scripts/build/companion_libs/120-ppl.sh	Thu Jan 10 00:27:13 2013 +0100
     1.3 @@ -30,6 +30,7 @@
     1.4  # - install in build-tools prefix
     1.5  do_ppl_for_build() {
     1.6      local -a ppl_opts
     1.7 +    local ppl_cflags
     1.8  
     1.9      case "${CT_TOOLCHAIN_TYPE}" in
    1.10          native|cross)   return 0;;
    1.11 @@ -38,9 +39,14 @@
    1.12      CT_DoStep INFO "Installing PPL for build"
    1.13      CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-build-${CT_BUILD}"
    1.14  
    1.15 +    ppl_cflags="${CT_CFLAGS_FOR_BUILD}"
    1.16 +    if [ "${CT_PPL_NEEDS_FPERMISSIVE}" = "y" ]; then
    1.17 +        ppl_cflags+=" -fpermissive"
    1.18 +    fi
    1.19 +
    1.20      ppl_opts+=( "host=${CT_BUILD}" )
    1.21      ppl_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
    1.22 -    ppl_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
    1.23 +    ppl_opts+=( "cflags=${ppl_cflags}" )
    1.24      ppl_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
    1.25      do_ppl_backend "${ppl_opts[@]}"
    1.26  
    1.27 @@ -51,13 +57,19 @@
    1.28  # Build PPL for running on host
    1.29  do_ppl_for_host() {
    1.30      local -a ppl_opts
    1.31 +    local ppl_cflags
    1.32  
    1.33      CT_DoStep INFO "Installing PPL for host"
    1.34      CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-host-${CT_HOST}"
    1.35  
    1.36 +    ppl_cflags="${CT_CFLAGS_FOR_HOST}"
    1.37 +    if [ "${CT_PPL_NEEDS_FPERMISSIVE}" = "y" ]; then
    1.38 +        ppl_cflags+=" -fpermissive"
    1.39 +    fi
    1.40 +
    1.41      ppl_opts+=( "host=${CT_HOST}" )
    1.42      ppl_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
    1.43 -    ppl_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    1.44 +    ppl_opts+=( "cflags=${ppl_cflags}" )
    1.45      ppl_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
    1.46      do_ppl_backend "${ppl_opts[@]}"
    1.47