diff options
author | Ladislav Michl <ladis@linux-mips.org> | 2007-03-28 15:50:43 +0000 |
---|---|---|
committer | Ladislav Michl <ladis@linux-mips.org> | 2007-03-28 15:50:43 +0000 |
commit | 659c0f3fa5ed10e8357d0087b27ed26f823b4dc5 (patch) | |
tree | b4cf4dbdd920f03e018804df6aaabbcc65478dcb | |
parent | e29fb4727273bdf0453de0ac30199540555c70ad (diff) | |
download | OSELAS.Toolchain-659c0f3fa5ed10e8357d0087b27ed26f823b4dc5.tar.gz OSELAS.Toolchain-659c0f3fa5ed10e8357d0087b27ed26f823b4dc5.tar.xz |
Use _cxa_atexit, rather than atexit, to register C++ destructors for local
statics and global objects only when libc provides __cxa_atexit. That
currently means glibc and uClibc-0.9.29 (once released) and later.
git-svn-id: https://svn.pengutronix.de/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk@2340 f8d472c7-5700-0410-ac5a-87979cec3adf
-rw-r--r-- | rules/cross-gcc-first.make | 2 | ||||
-rw-r--r-- | rules/cross-gcc.in | 11 | ||||
-rw-r--r-- | rules/glibc.in | 1 | ||||
-rw-r--r-- | rules/uclibc.in | 1 |
4 files changed, 11 insertions, 4 deletions
diff --git a/rules/cross-gcc-first.make b/rules/cross-gcc-first.make index 5716046..861101d 100644 --- a/rules/cross-gcc-first.make +++ b/rules/cross-gcc-first.make @@ -71,12 +71,12 @@ CROSS_GCC_AUTOCONF_COMMON := \ --with-mpfr=$(PTX_PREFIX_HOST) \ $(PTXCONF_CROSS_GCC_EXTRA_CONFIG) \ $(PTXCONF_CROSS_GCC_EXTRA_CONFIG_LIBC) \ + $(CROSS_GCC_EXTRA_CONFIG_CXA_ATEXIT) \ $(PTXCONF_CROSS_GCC_HEADERS) \ \ --disable-nls \ --disable-multilib \ --enable-symvers=gnu \ - --enable-__cxa_atexit \ --disable-libunwind-exceptions # diff --git a/rules/cross-gcc.in b/rules/cross-gcc.in index 326e0d5..721902d 100644 --- a/rules/cross-gcc.in +++ b/rules/cross-gcc.in @@ -46,18 +46,24 @@ config CROSS_GCC_EXTRA_CONFIG help Add these extra options to the gcc configure script. - config CROSS_GCC_EXTRA_CONFIG_LIBC string default "--with-newlib" if LIBC_NEWLIB +config CROSS_GCC_EXTRA_CONFIG_CXA_ATEXIT + string + default "--enable-__cxa_atexit" if CROSS_GCC_ENABLE_CXA_ATEXIT + default "--disable-__cxa_atexit" if !CROSS_GCC_ENABLE_CXA_ATEXIT + +config CROSS_GCC_ENABLE_CXA_ATEXIT + bool + config CROSS_GCC_SECOND bool select LIBC_FIRST prompt "gcc (second)" - #config CROSS_GCC_WITHOUT_HEADERS # bool # @@ -65,7 +71,6 @@ config CROSS_GCC_SECOND # string # default "--without-headers" if CROSS_GCC_WITHOUT_HEADERS - config CROSS_GCC_SHARED bool diff --git a/rules/glibc.in b/rules/glibc.in index c729204..5485802 100644 --- a/rules/glibc.in +++ b/rules/glibc.in @@ -9,6 +9,7 @@ menuconfig GLIBC_FIRST select CROSS_GCC_SHARED select CROSS_GCC_THREADS_POSIX + select CROSS_GCC_ENABLE_CXA_ATEXIT prompt "glibc " config GLIBC_VERSION diff --git a/rules/uclibc.in b/rules/uclibc.in index 21df458..3f150bb 100644 --- a/rules/uclibc.in +++ b/rules/uclibc.in @@ -15,6 +15,7 @@ choice config UCLIBC_VERSION_0_9_29 bool "0.9.29" + select CROSS_GCC_ENABLE_CXA_ATEXIT help Specify the uclibc version here. |