diff --git a/SOURCES/gcc8-dts-arm.patch b/SOURCES/gcc8-dts-arm.patch new file mode 100644 index 0000000..78f09f4 --- /dev/null +++ b/SOURCES/gcc8-dts-arm.patch @@ -0,0 +1,222 @@ +diff -Naurp a/libstdc++-v3/src/nonshared11/cow-shim_facets.cc b/libstdc++-v3/src/nonshared11/cow-shim_facets.cc +--- a/libstdc++-v3/src/nonshared11/cow-shim_facets.cc 2019-06-13 13:06:05.174643027 +0000 ++++ b/libstdc++-v3/src/nonshared11/cow-shim_facets.cc 2019-06-13 13:04:21.926181688 +0000 +@@ -168,7 +168,7 @@ asm (".hidden _ZTVNSt13__facet_shims12_G + asm (".hidden _ZTVNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EEE"); + asm (".hidden _ZNSt13__facet_shims21__numpunct_fill_cacheIcEEvSt17integral_constantIbLb0EEPKNSt6locale5facetEPSt16__numpunct_cacheIT_E"); + asm (".hidden _ZNSt13__facet_shims21__numpunct_fill_cacheIwEEvSt17integral_constantIbLb0EEPKNSt6locale5facetEPSt16__numpunct_cacheIT_E"); +-#if defined(__i386__) || (defined(__powerpc__) && !defined(__powerpc64__)) ++#if defined(__i386__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) + asm (".hidden _ZNSt13__facet_shims14__messages_getIcEEvSt17integral_constantIbLb0EEPKNSt6locale5facetERNS_12__any_stringEiiiPKT_j"); + asm (".hidden _ZNSt13__facet_shims14__messages_getIwEEvSt17integral_constantIbLb0EEPKNSt6locale5facetERNS_12__any_stringEiiiPKT_j"); + asm (".hidden _ZNSt13__facet_shims15__messages_openIcEEiSt17integral_constantIbLb0EEPKNSt6locale5facetEPKcjRKS3_"); +diff -Naurp a/libstdc++-v3/src/nonshared11/cow-stdexcept.cc b/libstdc++-v3/src/nonshared11/cow-stdexcept.cc +--- a/libstdc++-v3/src/nonshared11/cow-stdexcept.cc 2019-06-13 13:06:05.148643918 +0000 ++++ b/libstdc++-v3/src/nonshared11/cow-stdexcept.cc 2019-06-13 13:04:21.927181654 +0000 +@@ -35,7 +35,7 @@ asm (".hidden _ZNSt12__cow_stringaSEOS_" + asm (".hidden _ZNSt12__cow_stringaSERKS_"); + asm (".hidden _ZNSt12__sso_stringC1ERKSs"); + asm (".hidden _ZNSt12__sso_stringC2ERKSs"); +-#if defined(__i386__) || (defined(__powerpc__) && !defined(__powerpc64__)) ++#if defined(__i386__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) + asm (".hidden _ZNSt12__cow_stringC1EPKcj"); + asm (".hidden _ZNSt12__cow_stringC2EPKcj"); + #else +diff -Naurp a/libstdc++-v3/src/nonshared11/cxx11-shim_facets.cc b/libstdc++-v3/src/nonshared11/cxx11-shim_facets.cc +--- a/libstdc++-v3/src/nonshared11/cxx11-shim_facets.cc 2019-06-13 13:06:05.156643644 +0000 ++++ b/libstdc++-v3/src/nonshared11/cxx11-shim_facets.cc 2019-06-13 13:04:21.927181654 +0000 +@@ -168,7 +168,7 @@ asm (".hidden _ZTVNSt13__facet_shims12_G + asm (".hidden _ZTVNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb1EEE"); + asm (".hidden _ZTVNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb0EEE"); + asm (".hidden _ZTVNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EEE"); +-#if defined(__i386__) || (defined(__powerpc__) && !defined(__powerpc64__)) ++#if defined(__i386__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) + asm (".hidden _ZNSt13__facet_shims14__messages_getIcEEvSt17integral_constantIbLb1EEPKNSt6locale5facetERNS_12__any_stringEiiiPKT_j"); + asm (".hidden _ZNSt13__facet_shims14__messages_getIwEEvSt17integral_constantIbLb1EEPKNSt6locale5facetERNS_12__any_stringEiiiPKT_j"); + asm (".hidden _ZNSt13__facet_shims15__messages_openIcEEiSt17integral_constantIbLb1EEPKNSt6locale5facetEPKcjRKS3_"); +diff -Naurp a/libstdc++-v3/src/nonshared11/cxx11-wlocale-inst.cc b/libstdc++-v3/src/nonshared11/cxx11-wlocale-inst.cc +--- a/libstdc++-v3/src/nonshared11/cxx11-wlocale-inst.cc 2019-06-13 13:06:05.137644295 +0000 ++++ b/libstdc++-v3/src/nonshared11/cxx11-wlocale-inst.cc 2019-06-13 13:04:21.928181620 +0000 +@@ -36,7 +36,7 @@ asm (".hidden _ZNKSt17__gnu_cxx_ldbl1287 + asm (".hidden _ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intB5cxx11IxEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_"); + asm (".hidden _ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intB5cxx11IyEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_"); + #endif +-#if defined(__i386__) || (defined(__powerpc__) && !defined(__powerpc64__)) ++#if defined(__i386__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) + asm (".hidden _ZNSt15time_put_bynameIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEEC1ERKNSt7__cxx1112basic_stringIcS1_IcESaIcEEEj"); + asm (".hidden _ZNSt15time_put_bynameIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEEC2ERKNSt7__cxx1112basic_stringIcS1_IcESaIcEEEj"); + #else +diff -Naurp a/libstdc++-v3/src/nonshared11/locale-inst-asm.S b/libstdc++-v3/src/nonshared11/locale-inst-asm.S +--- a/libstdc++-v3/src/nonshared11/locale-inst-asm.S 2019-06-13 13:06:05.139644226 +0000 ++++ b/libstdc++-v3/src/nonshared11/locale-inst-asm.S 2019-06-13 13:04:21.929181585 +0000 +@@ -43,6 +43,11 @@ + #define ALIGN3 .align 2 + #define SECTION2(x).section .gnu.linkonce.s.x,"aw",@progbits + #define SECTION3(x)SECTION2(x) ++#elif defined __arm__ ++#define ALIGN1 .align 4 ++#define OBJECT %object ++#define SECTION1(x).section .gnu.linkonce.d.rel.ro.x,"aw",%progbits ++#define SECTION3(x).section .gnu.linkonce.r.x,"a",%progbits + #elif defined __aarch64__ + #define ALIGN1 .align 3 + #define ALIGN3 .align 3 +@@ -288,4 +293,4 @@ _ZTVSt16__numpunct_cacheIwE: + POINTER SYM(_ZTISt16__numpunct_cacheIwE) + VPTR(_ZNSt16__numpunct_cacheIwED1Ev) + VPTR(_ZNSt16__numpunct_cacheIwED0Ev) +- .section .note.GNU-stack,"",@progbits ++ .section .note.GNU-stack,"",%progbits +diff -Naurp a/libstdc++-v3/src/nonshared11/locale-inst.cc b/libstdc++-v3/src/nonshared11/locale-inst.cc +--- a/libstdc++-v3/src/nonshared11/locale-inst.cc 2019-06-13 13:06:05.167643267 +0000 ++++ b/libstdc++-v3/src/nonshared11/locale-inst.cc 2019-06-13 13:04:21.929181585 +0000 +@@ -70,13 +70,13 @@ _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + + #ifdef C_is_char +-#if defined(__i386__) || (defined(__powerpc__) && !defined(__powerpc64__)) ++#if defined(__i386__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) + asm (".hidden _ZSt14__add_groupingIcEPT_S1_S0_PKcjPKS0_S5_"); + #else + asm (".hidden _ZSt14__add_groupingIcEPT_S1_S0_PKcmPKS0_S5_"); + #endif + #else +-#if defined(__i386__) || (defined(__powerpc__) && !defined(__powerpc64__)) ++#if defined(__i386__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) + asm (".hidden _ZSt14__add_groupingIwEPT_S1_S0_PKcjPKS0_S5_"); + #else + asm (".hidden _ZSt14__add_groupingIwEPT_S1_S0_PKcmPKS0_S5_"); +diff -Naurp a/libstdc++-v3/src/nonshared11/snprintf_lite.cc b/libstdc++-v3/src/nonshared11/snprintf_lite.cc +--- a/libstdc++-v3/src/nonshared11/snprintf_lite.cc 2019-06-13 13:06:05.179642856 +0000 ++++ b/libstdc++-v3/src/nonshared11/snprintf_lite.cc 2019-06-13 13:04:21.930181551 +0000 +@@ -30,6 +30,9 @@ asm (".hidden _ZN9__gnu_cxx15__snprintf_ + #elif defined(__powerpc__) + asm (".hidden _ZN9__gnu_cxx15__concat_size_tEPcjj"); + asm (".hidden _ZN9__gnu_cxx15__snprintf_liteEPcjPKcP13__va_list_tag"); ++#elif defined(__arm__) ++asm (".hidden _ZN9__gnu_cxx15__concat_size_tEPcjj"); ++asm (".hidden _ZN9__gnu_cxx15__snprintf_liteEPcjPKcSt9__va_list"); + #elif defined(__aarch64__) + asm (".hidden _ZN9__gnu_cxx15__concat_size_tEPcmm"); + asm (".hidden _ZN9__gnu_cxx15__snprintf_liteEPcmPKcSt9__va_list"); +diff -Naurp a/libstdc++-v3/src/nonshared11/sso_string.cc b/libstdc++-v3/src/nonshared11/sso_string.cc +--- a/libstdc++-v3/src/nonshared11/sso_string.cc 2019-06-13 13:06:05.175642993 +0000 ++++ b/libstdc++-v3/src/nonshared11/sso_string.cc 2019-06-13 13:04:21.930181551 +0000 +@@ -39,7 +39,7 @@ asm (".hidden _ZNSt12__sso_stringD1Ev"); + asm (".hidden _ZNSt12__sso_stringD2Ev"); + asm (".hidden _ZNSt12__sso_stringaSEOS_"); + asm (".hidden _ZNSt12__sso_stringaSERKS_"); +-#if defined(__i386__) || (defined(__powerpc__) && !defined(__powerpc64__)) ++#if defined(__i386__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) + asm (".hidden _ZNSt12__sso_stringC1EPKcj"); + asm (".hidden _ZNSt12__sso_stringC2EPKcj"); + #else +diff -Naurp a/libstdc++-v3/src/nonshared98/decimal-rtti.S b/libstdc++-v3/src/nonshared98/decimal-rtti.S +--- a/libstdc++-v3/src/nonshared98/decimal-rtti.S 2019-06-13 13:06:05.121644843 +0000 ++++ b/libstdc++-v3/src/nonshared98/decimal-rtti.S 2019-06-13 13:04:21.931181517 +0000 +@@ -21,7 +21,7 @@ + . */ + + #if defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __ia64__ || defined __aarch64__ \ +- || defined __i386__ || defined __powerpc__ || defined __s390__ ++ || defined __i386__ || defined __powerpc__ || defined __s390__ || defined __arm__ + #ifdef __i386__ + #define ALIGN1 .align 4 + #elif defined __x86_64__ +@@ -43,6 +43,11 @@ + #define ALIGN3 .align 2 + #define SECTION2(x).section .gnu.linkonce.s.x,"aw",@progbits + #define SECTION3(x)SECTION2(x) ++#elif defined __arm__ ++#define ALIGN1 .align 4 ++#define OBJECT %object ++#define SECTION1(x).section .gnu.linkonce.d.rel.ro.x,"aw",%progbits ++#define SECTION3(x).section .gnu.linkonce.r.x,"a",%progbits + #elif defined __aarch64__ + #define ALIGN1 .align 3 + #define ALIGN3 .align 3 +@@ -271,4 +276,4 @@ _ZTSPDf: + _ZTSDf: + STRING "Df" + #endif +- .section .note.GNU-stack,"",@progbits ++ .section .note.GNU-stack,"",%progbits +diff -Naurp a/libstdc++-v3/src/nonshared98/float128.S b/libstdc++-v3/src/nonshared98/float128.S +--- a/libstdc++-v3/src/nonshared98/float128.S 2019-06-13 13:06:05.116645015 +0000 ++++ b/libstdc++-v3/src/nonshared98/float128.S 2019-06-13 13:04:21.932181482 +0000 +@@ -20,12 +20,17 @@ + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +-#if defined __x86_64__ || defined __i386__ || defined __ia64__ ++#if defined __x86_64__ || defined __i386__ || defined __ia64__ || defined __arm__ + #ifdef __i386__ + #define ALIGN1 .align 4 + #elif defined __x86_64__ + #define ALIGN1 .align 32 + #define ALIGN2 .align 16 ++#elif defined __arm__ ++#define ALIGN1 .align 4 ++#define OBJECT %object ++#define SECTION1(x).section .gnu.linkonce.d.rel.ro.x,"aw",%progbits ++#define SECTION3(x).section .gnu.linkonce.r.x,"a",%progbits + #elif defined __ia64__ + #define ALIGN1 .align 8 + #define ALIGN3 .align 8 +@@ -159,4 +164,4 @@ _ZTSPg: + _ZTSg: + STRING "g" + #endif +- .section .note.GNU-stack,"",@progbits ++ .section .note.GNU-stack,"",%progbits +diff -Naurp a/libstdc++-v3/src/nonshared98/int128.S b/libstdc++-v3/src/nonshared98/int128.S +--- a/libstdc++-v3/src/nonshared98/int128.S 2019-06-13 13:06:05.133644432 +0000 ++++ b/libstdc++-v3/src/nonshared98/int128.S 2019-06-13 13:04:21.932181482 +0000 +@@ -213,4 +213,4 @@ _ZTSPo: + _ZTSo: + STRING "o" + #endif +- .section .note.GNU-stack,"",@progbits ++ .section .note.GNU-stack,"",%progbits +diff -Naurp a/libstdc++-v3/src/nonshared98/locale_facets.cc b/libstdc++-v3/src/nonshared98/locale_facets.cc +--- a/libstdc++-v3/src/nonshared98/locale_facets.cc 2019-06-13 13:06:05.119644912 +0000 ++++ b/libstdc++-v3/src/nonshared98/locale_facets.cc 2019-06-13 13:04:21.933181448 +0000 +@@ -22,7 +22,7 @@ + + #define _GLIBCXX_NONSHARED_CXX11 + #include "../c++98/locale_facets.cc" +-#if defined(__i386__) || (defined(__powerpc__) && !defined(__powerpc64__)) ++#if defined(__i386__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) + asm (".hidden _ZSt22__verify_grouping_implPKcjS0_j"); + #else + asm (".hidden _ZSt22__verify_grouping_implPKcmS0_m"); +diff -Naurp a/libstdc++-v3/src/nonshared98/nullptr-rtti.S b/libstdc++-v3/src/nonshared98/nullptr-rtti.S +--- a/libstdc++-v3/src/nonshared98/nullptr-rtti.S 2019-06-13 13:06:05.132644466 +0000 ++++ b/libstdc++-v3/src/nonshared98/nullptr-rtti.S 2019-06-13 13:04:21.933181448 +0000 +@@ -21,7 +21,7 @@ + . */ + + #if defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __ia64__ || defined __aarch64__ \ +- || defined __i386__ || defined __powerpc__ || defined __s390__ ++ || defined __i386__ || defined __powerpc__ || defined __s390__ || defined __arm__ + #ifdef __i386__ + #define ALIGN1 .align 4 + #elif defined __x86_64__ +@@ -43,6 +43,11 @@ + #define ALIGN3 .align 2 + #define SECTION2(x).section .gnu.linkonce.s.x,"aw",@progbits + #define SECTION3(x)SECTION2(x) ++#elif defined __arm__ ++#define ALIGN1 .align 4 ++#define OBJECT %object ++#define SECTION1(x).section .gnu.linkonce.d.rel.ro.x,"aw",%progbits ++#define SECTION3(x).section .gnu.linkonce.r.x,"a",%progbits + #elif defined __aarch64__ + #define ALIGN1 .align 3 + #define ALIGN3 .align 3 +@@ -163,4 +168,4 @@ _ZTSPDn: + _ZTSDn: + STRING "Dn" + #endif +- .section .note.GNU-stack,"",@progbits ++ .section .note.GNU-stack,"",%progbits diff --git a/SPECS/gcc.spec b/SPECS/gcc.spec index 9b17c41..9e62652 100644 --- a/SPECS/gcc.spec +++ b/SPECS/gcc.spec @@ -237,6 +237,9 @@ Provides: liblto_plugin.so.0 %ifarch aarch64 %global oformat OUTPUT_FORMAT(elf64-littleaarch64) %endif +%ifarch %{arm} +%global oformat OUTPUT_FORMAT(elf32-littlearm) +%endif Patch0: gcc8-hack.patch Patch2: gcc8-i386-libgomp.patch @@ -289,6 +292,9 @@ Patch3028: gcc8-fortran-fpad-source.patch Patch3029: gcc8-fortran-pr87919.patch Patch3030: gcc8-fortran-pr87919-2.patch +# specific patches for .el7 armhfp build +Patch10001: gcc8-dts-arm.patch + %if 0%{?rhel} >= 7 %global nonsharedver 48 %else @@ -296,7 +302,9 @@ Patch3030: gcc8-fortran-pr87919-2.patch %endif %if 0%{?scl:1} +%ifnarch %{arm} %global _gnu %{nil} +%endif %else %global _gnu 7E %endif @@ -306,7 +314,10 @@ Patch3030: gcc8-fortran-pr87919-2.patch %ifarch ppc ppc64p7 %global gcc_target_platform ppc64-%{_vendor}-%{_target_os}%{?_gnu} %endif -%ifnarch sparcv9 ppc ppc64p7 +%ifarch %{arm} +%global gcc_target_platform armv7hl-%{_vendor}-%{_target_os}-gnueabi +%endif +%ifnarch sparcv9 ppc ppc64p7 %{arm} %global gcc_target_platform %{_target_platform} %endif @@ -684,6 +695,10 @@ cd .. %patch3030 -p1 -b .fortran30~ %endif +%ifarch %{arm} +%patch10001 -p1 -b .arm1 +%endif + echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE %if 0%{?rhel} == 6 @@ -909,6 +924,10 @@ CONFIGURE_OPTS="\ %ifarch mips64 mips64el --with-arch=mips64r2 --with-abi=64 \ %endif +%ifarch armv7hl + --with-tune=cortex-a8 --with-arch=armv7-a \ + --with-float=hard --with-fpu=vfpv3-d16 --with-abi=aapcs-linux \ +%endif %ifnarch sparc sparcv9 ppc --build=%{gcc_target_platform} \ %endif @@ -2496,6 +2515,9 @@ fi %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Thu Jun 13 2019 Pablo Greco 8.3.1-3 +- Fix for armhfp + * Mon Mar 11 2019 Marek Polacek 8.3.1-3 - update from Fedora 8.3.1-3 - two small autoFDO fixes (#1684650)