cc/gcc: Make usage of --enable-target-optspace configurable
authorTitus von Boxberg <titus@v9g.de>
Mon May 24 16:34:55 2010 +0200 (2010-05-24)
changeset 19727939e7e0573d
parent 1971 cbe89e8dfc9c
child 1973 20f02d426e15
cc/gcc: Make usage of --enable-target-optspace configurable

Optionally configure to compile gcc-internal libs with -Os.

yann.morin.1998@anciens.enib.fr:
Rename the config options, it is in the GCC /namespace/.
config/cc/gcc.in
scripts/build/cc/gcc.sh
     1.1 --- a/config/cc/gcc.in	Tue May 25 18:25:11 2010 +0200
     1.2 +++ b/config/cc/gcc.in	Mon May 24 16:34:55 2010 +0200
     1.3 @@ -259,6 +259,15 @@
     1.4      help
     1.5        Extra flags to pass onto ./configure when configuring gcc.
     1.6  
     1.7 +config CC_GCC_ENABLE_TARGET_OPTSPACE
     1.8 +    bool
     1.9 +    prompt "Optimize gcc libs for size"
    1.10 +    default y
    1.11 +    help
    1.12 +      Pass --enable-target-optspace to crossgcc's configure.
    1.13 +
    1.14 +      This will compile crossgcc's libs with -Os.
    1.15 +
    1.16  config CC_PKGVERSION
    1.17      string
    1.18      prompt "gcc ID string"
     2.1 --- a/scripts/build/cc/gcc.sh	Tue May 25 18:25:11 2010 +0200
     2.2 +++ b/scripts/build/cc/gcc.sh	Mon May 24 16:34:55 2010 +0200
     2.3 @@ -171,6 +171,10 @@
     2.4          extra_config+=("--with-libelf=${CT_COMPLIBS_DIR}")
     2.5      fi
     2.6  
     2.7 +    if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then
     2.8 +        extra_config+=("--enable-target-optspace")
     2.9 +    fi
    2.10 +
    2.11      CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
    2.12  
    2.13      # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
    2.14 @@ -190,7 +194,6 @@
    2.15          --disable-nls                               \
    2.16          --enable-symvers=gnu                        \
    2.17          --enable-languages="${lang_opt}"            \
    2.18 -        --enable-target-optspace                    \
    2.19          ${CT_CC_CORE_EXTRA_CONFIG}
    2.20  
    2.21      if [ "${build_libgcc}" = "yes" ]; then
    2.22 @@ -355,6 +358,10 @@
    2.23          extra_config+=("--enable-threads=posix")
    2.24      fi
    2.25  
    2.26 +    if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then
    2.27 +        extra_config+=("--enable-target-optspace")
    2.28 +    fi
    2.29 +
    2.30      CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
    2.31  
    2.32      # --enable-symvers=gnu really only needed for sh4 to work around a
    2.33 @@ -380,7 +387,6 @@
    2.34          --enable-symvers=gnu                        \
    2.35          --enable-c99                                \
    2.36          --enable-long-long                          \
    2.37 -        --enable-target-optspace                    \
    2.38          ${CT_CC_EXTRA_CONFIG}
    2.39  
    2.40      if [ "${CT_CANADIAN}" = "y" ]; then