From 5687bc9b1de4d68d1e0c2028253d463cfa11b584 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Thu, 30 Nov 2017 20:07:35 +0100 Subject: [PATCH] Bring the branch on par with master. --- gcc.spec | 8 ++++++++ gcc7-aarch64-sanitizer-fix.patch | 11 +++++++++++ 2 files changed, 19 insertions(+) create mode 100644 gcc7-aarch64-sanitizer-fix.patch diff --git a/gcc.spec b/gcc.spec index 65a75cb..e31732e 100644 --- a/gcc.spec +++ b/gcc.spec @@ -11,6 +11,10 @@ %global _performance_build 1 # Hardening slows the compiler way too much. %undefine _hardened_build +%if 0%{?fedora} > 27 +# Until annobin is fixed (#1519165). +%undefine _annotated_build +%endif %global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64 %ifarch %{ix86} x86_64 ia64 ppc %{power64} alpha s390x %{arm} aarch64 %global build_ada 1 @@ -237,6 +241,7 @@ Patch13: gcc7-pr81325.patch Patch14: gcc7-pr82112-1.patch Patch15: gcc7-pr82112-2.patch Patch16: gcc7-pr81929.patch +Patch17: gcc7-aarch64-sanitizer-fix.patch Patch1000: nvptx-tools-no-ptxas.patch Patch1001: nvptx-tools-build.patch @@ -849,6 +854,9 @@ package or when debugging this package. %patch14 -p0 -b .pr82112-1~ %patch15 -p0 -b .pr82112-2~ %patch16 -p0 -b .pr81929~ +%if 0%{?fedora} > 27 +%patch17 -p0 -b .aarch64-sanitizer-fix~ +%endif cd nvptx-tools-%{nvptx_tools_gitrev} %patch1000 -p1 -b .nvptx-tools-no-ptxas~ diff --git a/gcc7-aarch64-sanitizer-fix.patch b/gcc7-aarch64-sanitizer-fix.patch new file mode 100644 index 0000000..c1d8cba --- /dev/null +++ b/gcc7-aarch64-sanitizer-fix.patch @@ -0,0 +1,11 @@ +--- libsanitizer/sanitizer_common/sanitizer_linux.cc ++++ libsanitizer/sanitizer_common/sanitizer_linux.cc +@@ -1262,7 +1262,7 @@ struct __sanitizer_esr_context { + + static bool Aarch64GetESR(ucontext_t *ucontext, u64 *esr) { + static const u32 kEsrMagic = 0x45535201; +- u8 *aux = ucontext->uc_mcontext.__reserved; ++ u8 *aux = ucontext->uc_mcontext.__glibc_reserved1; + while (true) { + _aarch64_ctx *ctx = (_aarch64_ctx *)aux; + if (ctx->size == 0) break;