From 7796772dc08504e3efc1cafda07c135a9756a4cc Mon Sep 17 00:00:00 2001 From: Alexander Pyhalov Date: Thu, 31 Aug 2017 09:31:33 +0300 Subject: [PATCH] GCC: use -fuse-cxa-atexit by default https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66967 --- components/developer/gcc-5/Makefile | 2 +- components/developer/gcc-5/patches/use-cxa_atexit.patch | 11 +++++++++++ components/developer/gcc-6/patches/use-cxa_atexit.patch | 11 +++++++++++ components/developer/gcc-7/patches/use-cxa_atexit.patch | 12 ++++++++++++ components/developer/gcc49/Makefile | 2 +- components/developer/gcc49/patches/use-cxa_atexit.patch | 15 +++++++++++++++ 6 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 components/developer/gcc-5/patches/use-cxa_atexit.patch create mode 100644 components/developer/gcc-6/patches/use-cxa_atexit.patch create mode 100644 components/developer/gcc-7/patches/use-cxa_atexit.patch create mode 100644 components/developer/gcc49/patches/use-cxa_atexit.patch diff --git a/components/developer/gcc-5/Makefile b/components/developer/gcc-5/Makefile index 3fc95c01b..266b8f71c 100644 --- a/components/developer/gcc-5/Makefile +++ b/components/developer/gcc-5/Makefile @@ -18,7 +18,7 @@ include ../../../make-rules/shared-macros.mk COMPONENT_NAME= gcc COMPONENT_VERSION= 5.4.0 -COMPONENT_REVISION= 5 +COMPONENT_REVISION= 6 THIS_GCC_PKGVERSION= $(COMPONENT_VERSION)-OI-$(COMPONENT_REVISION) COMPONENT_MAJOR_VERSION= $(shell echo $(COMPONENT_VERSION) | $(GSED) -e 's/\([0-9]\+\)\.[0-9]\+.*/\1/') COMPONENT_FMRI= developer/gcc-5 diff --git a/components/developer/gcc-5/patches/use-cxa_atexit.patch b/components/developer/gcc-5/patches/use-cxa_atexit.patch new file mode 100644 index 000000000..72b25f91a --- /dev/null +++ b/components/developer/gcc-5/patches/use-cxa_atexit.patch @@ -0,0 +1,11 @@ +--- gcc-5.4.0/gcc/config.gcc.~1~ 2015-09-10 17:17:53.000000000 +0000 ++++ gcc-5.4.0/gcc/config.gcc 2017-08-31 00:19:51.521347790 +0000 +@@ -820,7 +820,7 @@ + sol2_tm_file_tail="${cpu_type}/sol2.h sol2.h" + sol2_tm_file="${sol2_tm_file_head} ${sol2_tm_file_tail}" + case ${target} in +- *-*-solaris2.1[2-9]*) ++ *-*-solaris2.1[1-9]*) + # __cxa_atexit was introduced in Solaris 12. + default_use_cxa_atexit=yes + ;; diff --git a/components/developer/gcc-6/patches/use-cxa_atexit.patch b/components/developer/gcc-6/patches/use-cxa_atexit.patch new file mode 100644 index 000000000..03d857118 --- /dev/null +++ b/components/developer/gcc-6/patches/use-cxa_atexit.patch @@ -0,0 +1,11 @@ +--- gcc-6.4.0/gcc/config.gcc.~1~ 2017-01-10 00:01:26.582656000 +0000 ++++ gcc-6.4.0/gcc/config.gcc 2017-08-31 00:15:59.617620815 +0000 +@@ -850,7 +850,7 @@ + sol2_tm_file_tail="${cpu_type}/sol2.h sol2.h" + sol2_tm_file="${sol2_tm_file_head} ${sol2_tm_file_tail}" + case ${target} in +- *-*-solaris2.1[2-9]*) ++ *-*-solaris2.1[1-9]*) + # __cxa_atexit was introduced in Solaris 12. + default_use_cxa_atexit=yes + ;; diff --git a/components/developer/gcc-7/patches/use-cxa_atexit.patch b/components/developer/gcc-7/patches/use-cxa_atexit.patch new file mode 100644 index 000000000..5c8930f50 --- /dev/null +++ b/components/developer/gcc-7/patches/use-cxa_atexit.patch @@ -0,0 +1,12 @@ +illumos supports __cxa_atexit +--- gcc-7.2.0/gcc/config.gcc.1 2017-08-31 00:10:16.618741531 +0000 ++++ gcc-7.2.0/gcc/config.gcc 2017-08-31 00:11:08.356444118 +0000 +@@ -856,7 +856,7 @@ + sol2_tm_file_tail="${cpu_type}/sol2.h sol2.h" + sol2_tm_file="${sol2_tm_file_head} ${sol2_tm_file_tail}" + case ${target} in +- *-*-solaris2.1[2-9]*) ++ *-*-solaris2.1[1-9]*) + # __cxa_atexit was introduced in Solaris 12. + default_use_cxa_atexit=yes + ;; diff --git a/components/developer/gcc49/Makefile b/components/developer/gcc49/Makefile index 41989c022..907b3af97 100644 --- a/components/developer/gcc49/Makefile +++ b/components/developer/gcc49/Makefile @@ -18,7 +18,7 @@ include ../../../make-rules/shared-macros.mk COMPONENT_NAME= gcc COMPONENT_VERSION= 4.9.4 -COMPONENT_REVISION=1 +COMPONENT_REVISION=2 MPFR_NAME= mpfr MPFR_VERSION=3.1.3 MPC_NAME=mpc diff --git a/components/developer/gcc49/patches/use-cxa_atexit.patch b/components/developer/gcc49/patches/use-cxa_atexit.patch new file mode 100644 index 000000000..5520b7e17 --- /dev/null +++ b/components/developer/gcc49/patches/use-cxa_atexit.patch @@ -0,0 +1,15 @@ +--- gcc-4.9.4/gcc/config.gcc.1 2017-08-31 00:30:22.732766482 +0000 ++++ gcc-4.9.4/gcc/config.gcc 2017-08-31 00:34:20.809250398 +0000 +@@ -820,6 +820,12 @@ + *-*-solaris2.1[0-9]*) + sol2_tm_file="${sol2_tm_file} sol2-10.h" + use_gcc_stdint=wrap ++ case ${target} in ++ *-*-solaris2.1[1-9]*) ++ # __cxa_atexit was introduced in Solaris 12/illumos. ++ default_use_cxa_atexit=yes ++ ;; ++ esac + ;; + *) + use_gcc_stdint=provide -- 2.11.4.GIT