# HG changeset patch # User Arnaud Lacombe # Date 1270658122 -7200 # Node ID 5284cdc29a638f272143af475b63a77c5d7aa72d # Parent 8bb8652222292c73cf9381977dbd00a5483a868c cc/gcc: fix thread-less final gcc build If threads are disabled in libc, we don't want to enable them in the final compiler. Doing so pass the configure stage, but fails latter on a missing . Moreover, we don't want to build libgomp if threads are disabled; its configure script would fails anyway. Signed-off-by: Arnaud Lacombe diff -r 8bb865222229 -r 5284cdc29a63 config/cc/gcc.in --- a/config/cc/gcc.in Wed Apr 07 18:35:21 2010 +0200 +++ b/config/cc/gcc.in Wed Apr 07 18:35:22 2010 +0200 @@ -62,24 +62,29 @@ config CC_V_4_2_4 bool prompt "4.2.4" + select CC_GCC_4_2_or_later config CC_V_4_2_3 bool prompt "4.2.3 (OBSOLETE)" + select CC_GCC_4_2_or_later depends on OBSOLETE config CC_V_4_2_2 bool prompt "4.2.2" + select CC_GCC_4_2_or_later config CC_V_4_2_1 bool prompt "4.2.1 (OBSOLETE)" + select CC_GCC_4_2_or_later depends on OBSOLETE config CC_V_4_2_0 bool prompt "4.2.0 (OBSOLETE)" + select CC_GCC_4_2_or_later depends on OBSOLETE config CC_V_4_1_2 @@ -99,15 +104,21 @@ endchoice +config CC_GCC_4_2_or_later + bool + default n + config CC_GCC_4_3_or_later bool default n + select CC_GCC_4_2_or_later select CC_GCC_USE_GMP_MPFR config CC_GCC_4_4_or_later bool default n select CC_GCC_4_3_or_later + select CC_GCC_4_2_or_later select CC_GCC_USE_PPL_CLOOG_MPC config CC_GCC_USE_GMP_MPFR diff -r 8bb865222229 -r 5284cdc29a63 scripts/build/cc/gcc.sh --- a/scripts/build/cc/gcc.sh Wed Apr 07 18:35:21 2010 +0200 +++ b/scripts/build/cc/gcc.sh Wed Apr 07 18:35:22 2010 +0200 @@ -313,6 +313,15 @@ extra_config+=("--with-mpc=${CT_PREFIX_DIR}") fi + if [ "${CT_THREADS}" = "none" ]; then + extra_config+=("--disable-threads") + if [ "${CT_CC_GCC_4_2_or_later}" = y ]; then + extra_config+=("--disable-libgomp") + fi + else + extra_config+=("--enable-threads=posix") + fi + CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" # --enable-symvers=gnu really only needed for sh4 to work around a @@ -334,7 +343,6 @@ "${extra_config[@]}" \ --with-local-prefix="${CT_SYSROOT_DIR}" \ --disable-nls \ - --enable-threads=posix \ --enable-symvers=gnu \ --enable-c99 \ --enable-long-long \