summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2015-09-15 15:05:36 (GMT)
committerBryan Hundven <bryanhundven@gmail.com>2015-09-15 15:05:36 (GMT)
commite0f06d6258fc9d4988f4c15c12b24e9bc5203640 (patch)
treee0735002eddc2288f9eb2c689beb9f18d6f28d29 /patches
parent8ea09a6b5f3865ad164227c1f0303431670a32bb (diff)
parent8442cd7e029c7a7d802195a77f74d3a5251f9d09 (diff)
Merge pull request #178 from pkirchhofer/fix-glibc-with-new-gcc
Fix building glibc 2.17 with gcc 5.1+
Diffstat (limited to 'patches')
-rw-r--r--patches/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/patches/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch b/patches/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch
new file mode 100644
index 0000000..59f95aa
--- /dev/null
+++ b/patches/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch
@@ -0,0 +1,54 @@
+From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001
+From: Joseph Myers <joseph@codesourcery.com>
+Date: Tue, 20 May 2014 21:27:13 +0000
+Subject: [PATCH] Fix ARM build with GCC trunk.
+
+sysdeps/unix/sysv/linux/arm/unwind-resume.c and
+sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static
+variables that are written in C code but only read from toplevel asms.
+Current GCC trunk now optimizes away such apparently write-only static
+variables, so causing a build failure. This patch marks those
+variables with __attribute_used__ to avoid that optimization.
+
+Tested that this fixes the build for ARM.
+
+ * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
+ (libgcc_s_resume): Use __attribute_used__.
+ * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume):
+ Likewise.
+---
+ sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++-
+ sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++-
+ 3 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
+index 6ccd9b4..660d148 100644
+--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
+@@ -22,7 +22,8 @@
+ #include <pthreadP.h>
+
+ static void *libgcc_s_handle;
+-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
++ __attribute_used__;
+ static _Unwind_Reason_Code (*libgcc_s_personality)
+ (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
+ static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
+diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c
+index bff3e2b..1f1eb71 100644
+--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
++++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
+@@ -20,7 +20,8 @@
+ #include <stdio.h>
+ #include <unwind.h>
+
+-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
++ __attribute_used__;
+ static _Unwind_Reason_Code (*libgcc_s_personality)
+ (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
+
+--
+1.9.4
+