Patch from Enrico WEIGELT <weigelt@metux.de> to disable __cxa_atexit for those C libraries with no support (old uClibc).
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Mar 21 21:03:22 2007 +0000 (2007-03-21)
changeset 20e238f7fbc941
parent 19 d80e6dedcc13
child 21 96ae23f0b5db
Patch from Enrico WEIGELT <weigelt@metux.de> to disable __cxa_atexit for those C libraries with no support (old uClibc).
CREDITS
config/cc_gcc.in
scripts/build/cc_core_gcc.sh
scripts/build/cc_gcc.sh
     1.1 --- a/CREDITS	Mon Mar 12 18:59:31 2007 +0000
     1.2 +++ b/CREDITS	Wed Mar 21 21:03:22 2007 +0000
     1.3 @@ -6,4 +6,11 @@
     1.4      Some crosstool-NG scripts have code snippets coming almost as-is from the
     1.5      original work by Dan.
     1.6  
     1.7 +  Allan CLARK for his investigations on building toolchains on MacOS-X.
     1.8 +    Allan made extensive tests of the first alpha of ct-ng on his MacOS-X
     1.9 +    and unveiled some bash-2.05 weirdness.
    1.10 +
    1.11 +  Enrico WEIGELT for some improvements of the build procedure:
    1.12 +    - cxa_atexit disabling for C libraries not supporting it (uClibc)
    1.13 +
    1.14  More to come as they help.
     2.1 --- a/config/cc_gcc.in	Mon Mar 12 18:59:31 2007 +0000
     2.2 +++ b/config/cc_gcc.in	Wed Mar 21 21:03:22 2007 +0000
     2.3 @@ -128,6 +128,14 @@
     2.4  # CT_INSERT_VERSION_STRING_ABOVE
     2.5  # Don't remove above line!
     2.6  
     2.7 +config CC_CXA_ATEXIT
     2.8 +    bool
     2.9 +    prompt "__cxa_atexit"
    2.10 +    default "y"
    2.11 +    help
    2.12 +      If you get the missing symbol "__cxa_atexit" when building c++ programs,
    2.13 +      you might want to try disabling this option.
    2.14 +
    2.15  config CC_EXTRA_CONFIG
    2.16      string
    2.17      prompt "Final gcc extra config"
     3.1 --- a/scripts/build/cc_core_gcc.sh	Mon Mar 12 18:59:31 2007 +0000
     3.2 +++ b/scripts/build/cc_core_gcc.sh	Wed Mar 21 21:03:22 2007 +0000
     3.3 @@ -20,6 +20,7 @@
     3.4      [ -n "${CT_ARCH_TUNE}" ] && extra_config="${extra_config} --with-tune=${CT_ARCH_TUNE}"
     3.5      [ -n "${CT_ARCH_ARCH}" ] && extra_config="${extra_config} --with-arch=${CT_ARCH_ARCH}"
     3.6      [ -n "${CT_ARCH_FPU}" ] && extra_config="${extra_config} --with-fpu=${CT_ARCH_FPU}"
     3.7 +    [ "${CT_CC_CXA_ATEXIT}" == "y" ] && extra_config="${extra_config} --enable-__cxa_atexit"
     3.8  
     3.9      CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
    3.10  
    3.11 @@ -38,7 +39,6 @@
    3.12          --disable-nls                               \
    3.13          --enable-threads=no                         \
    3.14          --enable-symvers=gnu                        \
    3.15 -        --enable-__cxa_atexit                       \
    3.16          --enable-languages=c                        \
    3.17          --disable-shared                            \
    3.18          ${CT_CC_CORE_EXTRA_CONFIG}                  2>&1 |CT_DoLog DEBUG
     4.1 --- a/scripts/build/cc_gcc.sh	Mon Mar 12 18:59:31 2007 +0000
     4.2 +++ b/scripts/build/cc_gcc.sh	Wed Mar 21 21:03:22 2007 +0000
     4.3 @@ -38,6 +38,7 @@
     4.4      else
     4.5         extra_config="${extra_config} --disable-multilib"
     4.6      fi
     4.7 +    [ "${CT_CC_CXA_ATEXIT}" == "y" ] && extra_config="${extra_config} --enable-__cxa_atexit"
     4.8  
     4.9      CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
    4.10  
    4.11 @@ -56,7 +57,6 @@
    4.12          --disable-nls                           \
    4.13          --enable-threads=posix                  \
    4.14          --enable-symvers=gnu                    \
    4.15 -        --enable-__cxa_atexit                   \
    4.16          --enable-c99                            \
    4.17          --enable-long-long                      \
    4.18          ${CT_CC_EXTRA_CONFIG}                   2>&1 |CT_DoLog DEBUG