diff options
author | David Edelsohn <dje.gcc@gmail.com> | 2013-02-01 20:26:24 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2013-02-01 15:26:24 -0500 |
commit | 99113dff9d9f04184797e8f3565dfe0c900a2345 (patch) | |
tree | 30472f84083cf675f186689b2add871ca6d548f8 /gcc | |
parent | ddd84654d90b8056c5aa1a5f164cb685db327aa0 (diff) | |
download | gcc-99113dff9d9f04184797e8f3565dfe0c900a2345.zip gcc-99113dff9d9f04184797e8f3565dfe0c900a2345.tar.gz gcc-99113dff9d9f04184797e8f3565dfe0c900a2345.tar.bz2 |
re PR c++/54601 (AIX uses atexit which causes unloading of shared modules to break)
PR target/54601
libgcc/
* config.host (powerpc-ibm-aix[56789]): Add t-aix-cxa to tmake_file.
Add crtcxa to extra_parts.
* config/rs6000/exit.h: New file.
* config/rs6000/cxa_atexit.c: New file.
* config/rs6000/cxa_finalize.c: New file.
* config/rs6000/crtcxa.c: New file.
* config/rs6000/t-aix-cxa: New file.
* config/rs6000/libgcc-aix-cxa.ver: New file.
gcc/
* configure.ac (cxa_atexit): Add AIX.
* configure: Regenerate.
* config/rs6000/aix61.h (STARTFILE_SPEC): Add crtcxa.o.
From-SVN: r195675
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/rs6000/aix61.h | 3 | ||||
-rwxr-xr-x | gcc/configure | 7 | ||||
-rw-r--r-- | gcc/configure.ac | 3 |
4 files changed, 18 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bbe5a66..8af4967 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2013-02-01 David Edelsohn <dje.gcc@gmail.com> + + PR target/54601 + * configure.ac (use_cxa_atexit): Add AIX. + * configure: Regenerate. + + * config/rs6000/aix61.h (STARTFILE_SPEC): Add crtcxa.o. + 2013-02-01 Jakub Jelinek <jakub@redhat.com> PR debug/54793 diff --git a/gcc/config/rs6000/aix61.h b/gcc/config/rs6000/aix61.h index d8387fa..42f4ba5 100644 --- a/gcc/config/rs6000/aix61.h +++ b/gcc/config/rs6000/aix61.h @@ -163,7 +163,8 @@ do { \ %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}\ %{!maix64:\ %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\ - %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}" + %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}\ + %{shared:crtcxa_s%O%s;:crtcxa%O%s}" /* AIX V5 typedefs ptrdiff_t as "long" while earlier releases used "int". */ diff --git a/gcc/configure b/gcc/configure index 6711c0f..d4f49bb 100755 --- a/gcc/configure +++ b/gcc/configure @@ -11136,6 +11136,9 @@ if test x$enable___cxa_atexit = xyes || \ *-*-mingw32*) use_cxa_atexit=yes ;; + powerpc-ibm-aix*) + use_cxa_atexit=yes + ;; *) ac_fn_c_check_func "$LINENO" "__cxa_atexit" "ac_cv_func___cxa_atexit" if test "x$ac_cv_func___cxa_atexit" = x""yes; then : @@ -17825,7 +17828,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17828 "configure" +#line 17831 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -17931,7 +17934,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17934 "configure" +#line 17937 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 9ae5604..811c296 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1455,6 +1455,9 @@ if test x$enable___cxa_atexit = xyes || \ *-*-mingw32*) use_cxa_atexit=yes ;; + powerpc-ibm-aix*) + use_cxa_atexit=yes + ;; *) AC_CHECK_FUNC(__cxa_atexit,[use_cxa_atexit=yes], [echo "__cxa_atexit can't be enabled on this target"]) |