# HG changeset patch # User "Yann E. MORIN" # Date 1174511002 0 # Node ID e238f7fbc94175f3f6468446320ef9155a179071 # Parent d80e6dedcc1355d74c1b250672f2ac8e9cda73d7 Patch from Enrico WEIGELT to disable __cxa_atexit for those C libraries with no support (old uClibc). diff -r d80e6dedcc13 -r e238f7fbc941 CREDITS --- a/CREDITS Mon Mar 12 18:59:31 2007 +0000 +++ b/CREDITS Wed Mar 21 21:03:22 2007 +0000 @@ -6,4 +6,11 @@ Some crosstool-NG scripts have code snippets coming almost as-is from the original work by Dan. + Allan CLARK for his investigations on building toolchains on MacOS-X. + Allan made extensive tests of the first alpha of ct-ng on his MacOS-X + and unveiled some bash-2.05 weirdness. + + Enrico WEIGELT for some improvements of the build procedure: + - cxa_atexit disabling for C libraries not supporting it (uClibc) + More to come as they help. diff -r d80e6dedcc13 -r e238f7fbc941 config/cc_gcc.in --- a/config/cc_gcc.in Mon Mar 12 18:59:31 2007 +0000 +++ b/config/cc_gcc.in Wed Mar 21 21:03:22 2007 +0000 @@ -128,6 +128,14 @@ # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! +config CC_CXA_ATEXIT + bool + prompt "__cxa_atexit" + default "y" + help + If you get the missing symbol "__cxa_atexit" when building c++ programs, + you might want to try disabling this option. + config CC_EXTRA_CONFIG string prompt "Final gcc extra config" diff -r d80e6dedcc13 -r e238f7fbc941 scripts/build/cc_core_gcc.sh --- a/scripts/build/cc_core_gcc.sh Mon Mar 12 18:59:31 2007 +0000 +++ b/scripts/build/cc_core_gcc.sh Wed Mar 21 21:03:22 2007 +0000 @@ -20,6 +20,7 @@ [ -n "${CT_ARCH_TUNE}" ] && extra_config="${extra_config} --with-tune=${CT_ARCH_TUNE}" [ -n "${CT_ARCH_ARCH}" ] && extra_config="${extra_config} --with-arch=${CT_ARCH_ARCH}" [ -n "${CT_ARCH_FPU}" ] && extra_config="${extra_config} --with-fpu=${CT_ARCH_FPU}" + [ "${CT_CC_CXA_ATEXIT}" == "y" ] && extra_config="${extra_config} --enable-__cxa_atexit" CT_DoLog DEBUG "Extra config passed: \"${extra_config}\"" @@ -38,7 +39,6 @@ --disable-nls \ --enable-threads=no \ --enable-symvers=gnu \ - --enable-__cxa_atexit \ --enable-languages=c \ --disable-shared \ ${CT_CC_CORE_EXTRA_CONFIG} 2>&1 |CT_DoLog DEBUG diff -r d80e6dedcc13 -r e238f7fbc941 scripts/build/cc_gcc.sh --- a/scripts/build/cc_gcc.sh Mon Mar 12 18:59:31 2007 +0000 +++ b/scripts/build/cc_gcc.sh Wed Mar 21 21:03:22 2007 +0000 @@ -38,6 +38,7 @@ else extra_config="${extra_config} --disable-multilib" fi + [ "${CT_CC_CXA_ATEXIT}" == "y" ] && extra_config="${extra_config} --enable-__cxa_atexit" CT_DoLog DEBUG "Extra config passed: \"${extra_config}\"" @@ -56,7 +57,6 @@ --disable-nls \ --enable-threads=posix \ --enable-symvers=gnu \ - --enable-__cxa_atexit \ --enable-c99 \ --enable-long-long \ ${CT_CC_EXTRA_CONFIG} 2>&1 |CT_DoLog DEBUG