Patch from Enrico WEIGELT <weigelt@metux.de> to disable __cxa_atexit for those C libraries with no support (old uClibc).

This commit is contained in:
Yann E. MORIN" 2007-03-21 21:03:22 +00:00
parent 19e8f6a15a
commit aaea34768c
4 changed files with 17 additions and 2 deletions

View File

@ -6,4 +6,11 @@ I would like to thank these fine people for making crosstool-NG possible:
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.

View File

@ -128,6 +128,14 @@ config CC_VERSION
# 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"

View File

@ -20,6 +20,7 @@ do_cc_core() {
[ -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 @@ do_cc_core() {
--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

View File

@ -38,6 +38,7 @@ do_cc() {
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 @@ do_cc() {
--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