From aaea34768c73eb404d0f3e34983a4ceba1fa1794 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 21 Mar 2007 21:03:22 +0000 Subject: Patch from Enrico WEIGELT to disable __cxa_atexit for those C libraries with no support (old uClibc). diff --git a/CREDITS b/CREDITS index b571936..5110824 100644 --- a/CREDITS +++ b/CREDITS @@ -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. diff --git a/config/cc_gcc.in b/config/cc_gcc.in index 974dd2c..d922239 100644 --- a/config/cc_gcc.in +++ b/config/cc_gcc.in @@ -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" diff --git a/scripts/build/cc_core_gcc.sh b/scripts/build/cc_core_gcc.sh index 720a581..b5fa46e 100644 --- a/scripts/build/cc_core_gcc.sh +++ b/scripts/build/cc_core_gcc.sh @@ -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 diff --git a/scripts/build/cc_gcc.sh b/scripts/build/cc_gcc.sh index 7621d42..1ada512 100644 --- a/scripts/build/cc_gcc.sh +++ b/scripts/build/cc_gcc.sh @@ -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 -- cgit v0.10.2-6-g49f6