cc/gcc: add option do disable PCH
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Jun 17 21:26:23 2010 +0200 (2010-06-17)
changeset 19911974075aa641
parent 1990 c12158f27395
child 1992 eebcaff6626f
cc/gcc: add option do disable PCH

In some cases, using Pre-Compiled Headers breaks the build.
Ass an option to disable building the PCH, as suggested by:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
config/cc/gcc.in
scripts/build/cc/gcc.sh
     1.1 --- a/config/cc/gcc.in	Thu Jun 17 18:30:09 2010 +0200
     1.2 +++ b/config/cc/gcc.in	Thu Jun 17 21:26:23 2010 +0200
     1.3 @@ -268,6 +268,18 @@
     1.4  
     1.5        This will compile crossgcc's libs with -Os.
     1.6  
     1.7 +config CC_GCC_DISABLE_PCH
     1.8 +    bool
     1.9 +    prompt "Do not build PCH"
    1.10 +    default n
    1.11 +    help
    1.12 +      Say 'y' here to not use Pre-Compiled Headers in the resulting toolchain.
    1.13 +      at the expense of speed when compiling C++ code.
    1.14 +      
    1.15 +      For some configurations (most notably canadian?), PCH are broken, and
    1.16 +      need to be disabled.  Please see:
    1.17 +        http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
    1.18 +
    1.19  config CC_PKGVERSION
    1.20      string
    1.21      prompt "gcc ID string"
     2.1 --- a/scripts/build/cc/gcc.sh	Thu Jun 17 18:30:09 2010 +0200
     2.2 +++ b/scripts/build/cc/gcc.sh	Thu Jun 17 21:26:23 2010 +0200
     2.3 @@ -367,6 +367,9 @@
     2.4      if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then
     2.5          extra_config+=("--enable-target-optspace")
     2.6      fi
     2.7 +    if [ "${CT_CC_GCC_DISABLE_PCH}" = "y" ]; then
     2.8 +        extra_config+=("--disable-libstdcxx-pch")
     2.9 +    fi
    2.10  
    2.11      CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
    2.12