diff --git a/SOURCES/gcc48-pr63442.patch b/SOURCES/gcc48-pr63442.patch new file mode 100644 index 0000000..8073c89 --- /dev/null +++ b/SOURCES/gcc48-pr63442.patch @@ -0,0 +1,16 @@ +2014-10-27 Jiong Wang + + PR target/63442 + * optabs.c (prepare_cmp_insn): Use "ret_mode" instead of "word_mode". + +--- gcc/optabs.c ++++ gcc/optabs.c +@@ -4294,7 +4294,7 @@ prepare_cmp_insn (rtx x, rtx y, enum rtx_code comparison, rtx size, + y = const0_rtx; + } + +- *pmode = word_mode; ++ *pmode = ret_mode; + prepare_cmp_insn (x, y, comparison, NULL_RTX, unsignedp, methods, + ptest, pmode); + } diff --git a/SOURCES/gcc48-rh1659698.patch b/SOURCES/gcc48-rh1659698.patch new file mode 100644 index 0000000..6043487 --- /dev/null +++ b/SOURCES/gcc48-rh1659698.patch @@ -0,0 +1,29 @@ +2018-12-13 Peter Bergner + + * config/powerpc/target.h (htm_available): Add support for + PPC_FEATURE2_HTM_NO_SUSPEND. Use __builtin_cpu_supports if available. + +--- libitm/config/powerpc/target.h ++++ libitm/config/powerpc/target.h +@@ -81,7 +81,20 @@ cpu_relax (void) + static inline bool + htm_available (void) + { +- return (getauxval (AT_HWCAP2) & PPC_FEATURE2_HAS_HTM) ? true : false; ++#ifdef __BUILTIN_CPU_SUPPORTS__ ++ if (__builtin_cpu_supports ("htm-no-suspend") ++ || __builtin_cpu_supports ("htm")) ++ return true; ++#else ++ unsigned long htm_flags = PPC_FEATURE2_HAS_HTM ++#ifdef PPC_FEATURE2_HTM_NO_SUSPEND ++ | PPC_FEATURE2_HTM_NO_SUSPEND ++#endif ++ | 0; ++ if (getauxval (AT_HWCAP2) & htm_flags) ++ return true; ++#endif ++ return false; + } + + static inline uint32_t diff --git a/SPECS/gcc.spec b/SPECS/gcc.spec index 24f0b6f..e6bfb14 100644 --- a/SPECS/gcc.spec +++ b/SPECS/gcc.spec @@ -6,7 +6,7 @@ %global _unpackaged_files_terminate_build 0 %global _performance_build 1 %global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64 -%ifarch %{ix86} x86_64 ia64 ppc ppc64 ppc64le ppc64p7 alpha aarch64 %{arm} +%ifarch %{ix86} x86_64 ia64 ppc ppc64 ppc64le ppc64p7 alpha aarch64 %global build_ada 1 %else %global build_ada 0 @@ -79,7 +79,7 @@ Name: gcc %global gcc_version 4.8.5 %endif Version: 4.8.5 -Release: %{gcc_release}%{?dist}.1 +Release: %{gcc_release}%{?dist}.2 %if "%{version}" != "%{gcc_version}" %define gcc_provides %{gcc_version}-16%{?dist} %endif @@ -269,6 +269,8 @@ Patch69: gcc48-pr72717.patch Patch70: gcc48-pr66840.patch Patch71: gcc48-rh1546372.patch Patch72: gcc48-rh1655148.patch +Patch73: gcc48-rh1659698.patch +Patch74: gcc48-pr63442.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -1061,6 +1063,8 @@ touch -r %{PATCH27} libstdc++-v3/python/libstdcxx/v6/printers.py %patch70 -p0 -b .pr66840~ %patch71 -p0 -b .rh1546372~ %patch72 -p1 -b .rh1655148~ +%patch73 -p0 -b .rh1659698~ +%patch74 -p0 -b .pr63442~ %if 0%{?_enable_debug_packages} cat > split-debuginfo.sh <<\EOF @@ -3550,6 +3554,10 @@ fi %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %changelog +* Wed Feb 13 2019 Marek Polacek 4.8.5-36.2 +- allow libitm to use HTM (#1674383) +- fix mode mismatch in prepare_cmp_insn (#1676795, PR target/63442) + * Wed Jan 16 2019 Jeff Law 4.8.5-36.1 - Avoid code generation bug due to incorrect CFG in the presence of setjmp/longjmp (#1655148).