Improve handling of __cxa_atexit by Arnaud Vrac <rawoul at zogzog dot org>.
/trunk/scripts/build/cc_gcc.sh | 18 15 3 0 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
1.1 --- a/scripts/build/cc_gcc.sh Wed May 21 22:00:52 2008 +0000
1.2 +++ b/scripts/build/cc_gcc.sh Thu May 22 22:38:37 2008 +0000
1.3 @@ -59,8 +59,12 @@
1.4 CT_DoLog EXTRA "Configuring static core C compiler"
1.5
1.6 extra_config="${CT_ARCH_WITH_ARCH} ${CT_ARCH_WITH_ABI} ${CT_ARCH_WITH_CPU} ${CT_ARCH_WITH_TUNE} ${CT_ARCH_WITH_FPU} ${CT_ARCH_WITH_FLOAT}"
1.7 - [ "${CT_CC_CXA_ATEXIT}" = "y" ] && extra_config="${extra_config} --enable-__cxa_atexit"
1.8 [ "${CT_CC_GCC_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
1.9 + if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
1.10 + extra_config="${extra_config} --enable-__cxa_atexit"
1.11 + else
1.12 + extra_config="${extra_config} --disable-__cxa_atexit"
1.13 + fi
1.14
1.15 CT_DoLog DEBUG "Extra config passed: '${extra_config}'"
1.16
1.17 @@ -114,8 +118,12 @@
1.18 CT_DoLog EXTRA "Configuring shared core C compiler"
1.19
1.20 extra_config="${CT_ARCH_WITH_ARCH} ${CT_ARCH_WITH_ABI} ${CT_ARCH_WITH_CPU} ${CT_ARCH_WITH_TUNE} ${CT_ARCH_WITH_FPU} ${CT_ARCH_WITH_FLOAT}"
1.21 - [ "${CT_CC_CXA_ATEXIT}" = "y" ] && extra_config="${extra_config} --enable-__cxa_atexit"
1.22 [ "${CT_CC_GCC_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
1.23 + if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
1.24 + extra_config="${extra_config} --enable-__cxa_atexit"
1.25 + else
1.26 + extra_config="${extra_config} --disable-__cxa_atexit"
1.27 + fi
1.28
1.29 CT_DoLog DEBUG "Extra config passed: '${extra_config}'"
1.30
1.31 @@ -215,7 +223,11 @@
1.32 extra_config="--enable-languages=${lang_opt}"
1.33 extra_config="${extra_config} ${CT_ARCH_WITH_ARCH} ${CT_ARCH_WITH_ABI} ${CT_ARCH_WITH_CPU} ${CT_ARCH_WITH_TUNE} ${CT_ARCH_WITH_FPU} ${CT_ARCH_WITH_FLOAT}"
1.34 [ "${CT_SHARED_LIBS}" = "y" ] || extra_config="${extra_config} --disable-shared"
1.35 - [ "${CT_CC_CXA_ATEXIT}" == "y" ] && extra_config="${extra_config} --enable-__cxa_atexit"
1.36 + if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
1.37 + extra_config="${extra_config} --enable-__cxa_atexit"
1.38 + else
1.39 + extra_config="${extra_config} --disable-__cxa_atexit"
1.40 + fi
1.41 if [ "${CT_TARGET_MULTILIB}" = "y" ]; then
1.42 extra_config="${extra_config} --enable-multilib"
1.43 else