cc/gcc: add an option to enable/disable build of libgomp
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Oct 08 23:58:58 2010 +0200 (2010-10-08)
changeset 2145efea409ff8be
parent 2144 80f088eb0608
child 2146 3b812ba8d001
cc/gcc: add an option to enable/disable build of libgomp

libgomp is the GNU implementation of the OpenMP API.
It can be usefull to have or miss, depends...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
config/cc/gcc.in.2
scripts/build/cc/gcc.sh
     1.1 --- a/config/cc/gcc.in.2	Fri Oct 08 23:53:41 2010 +0200
     1.2 +++ b/config/cc/gcc.in.2	Fri Oct 08 23:58:58 2010 +0200
     1.3 @@ -62,6 +62,18 @@
     1.4        alternatives (eg. DUMA, dmalloc...) that need neither re-
     1.5        compilation nor re-link.
     1.6  
     1.7 +config CC_GCC_LIBGOMP
     1.8 +    bool
     1.9 +    prompt "Compile libgomp"
    1.10 +    default n
    1.11 +    help
    1.12 +      libgomp is "the GNU implementation of the OpenMP Application Programming
    1.13 +      Interface (API) for multi-platform shared-memory parallel programming in
    1.14 +      C/C++ and Fortran". See:
    1.15 +        http://gcc.gnu.org/onlinedocs/libgomp/
    1.16 +      
    1.17 +      The default is 'N'. Say 'Y' if you need it, and report success/failure.
    1.18 +
    1.19  #-----------------------------------------------------------------------------
    1.20  
    1.21  comment "Misc. obscure options."
     2.1 --- a/scripts/build/cc/gcc.sh	Fri Oct 08 23:53:41 2010 +0200
     2.2 +++ b/scripts/build/cc/gcc.sh	Fri Oct 08 23:58:58 2010 +0200
     2.3 @@ -371,6 +371,11 @@
     2.4      else
     2.5          extra_config+=(--disable-libmudflap)
     2.6      fi
     2.7 +    if [ "${CT_CC_GCC_LIBGOMP}" = "y" ]; then
     2.8 +        extra_config+=(--enable-libgomp)
     2.9 +    else
    2.10 +        extra_config+=(--disable-libgomp)
    2.11 +    fi
    2.12  
    2.13      if [ "${CT_CC_STATIC_LIBSTDCXX}" = "y" ]; then
    2.14          # this is from CodeSourcery arm-2010q1-202-arm-none-linux-gnueabi.src.tar.bz2
    2.15 @@ -408,6 +413,7 @@
    2.16      if [ "${CT_THREADS}" = "none" ]; then
    2.17          extra_config+=("--disable-threads")
    2.18          if [ "${CT_CC_GCC_4_2_or_later}" = y ]; then
    2.19 +            CT_Test "Disabling libgomp for no-thread gcc>=4.2" "${CT_CC_GCC_LIBGOMP}" = "Y"
    2.20              extra_config+=("--disable-libgomp")
    2.21          fi
    2.22      else