diff options
-rw-r--r-- | config/companion_libs/isl.in | 6 | ||||
-rw-r--r-- | patches/gdb/7.10/10-setns-handling.patch | 52 | ||||
-rw-r--r-- | patches/glibc/2.17/100-Fix-ARM-build-with-GCC-trunk.patch | 54 |
3 files changed, 109 insertions, 3 deletions
diff --git a/config/companion_libs/isl.in b/config/companion_libs/isl.in index 4f6ee36..1db51b3 100644 --- a/config/companion_libs/isl.in +++ b/config/companion_libs/isl.in @@ -9,19 +9,19 @@ choice config ISL_V_0_15 bool prompt "0.15" - depends on CLOOG_0_18_4_or_later + depends on CC_GCC_5_1_or_later select ISL_V_0_15_or_later config ISL_V_0_14 bool prompt "0.14" - depends on CLOOG_0_18_4_or_later + depends on CLOOG_0_18_4_or_later || CC_GCC_5_1_or_later select ISL_V_0_14_or_later config ISL_V_0_12_2 bool prompt "0.12.2" - depends on ! CLOOG_0_18_4_or_later + depends on ! CLOOG_0_18_4_or_later || CC_GCC_5_1_or_later select ISL_V_0_12_or_later config ISL_V_0_11_1 diff --git a/patches/gdb/7.10/10-setns-handling.patch b/patches/gdb/7.10/10-setns-handling.patch new file mode 100644 index 0000000..e2647ad --- /dev/null +++ b/patches/gdb/7.10/10-setns-handling.patch @@ -0,0 +1,52 @@ +From 99fe86f7999afd2743b08c550b10f083ae4bd9bd Mon Sep 17 00:00:00 2001 +From: Peter Bergner <bergner@vnet.ibm.com> +Date: Tue, 14 Jul 2015 10:46:16 -0500 +Subject: [PATCH] Fix build issue with nat/linux-namespaces.c. + + * nat/linux-namespaces.c (setns): Rename from this ... + (do_setns): ... to this. Support calling setns if it exists. + (mnsh_handle_setns): Call do_setns. +--- + gdb/ChangeLog | 6 ++++++ + gdb/nat/linux-namespaces.c | 12 ++++++------ + 2 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/gdb/nat/linux-namespaces.c b/gdb/nat/linux-namespaces.c +index a7a3e4d..fd0d4b0 100644 +--- a/gdb/nat/linux-namespaces.c ++++ b/gdb/nat/linux-namespaces.c +@@ -34,18 +34,18 @@ int debug_linux_namespaces; + + /* Handle systems without setns. */ + +-#ifndef HAVE_SETNS +-static int +-setns (int fd, int nstype) ++static inline int ++do_setns (int fd, int nstype) + { +-#ifdef __NR_setns ++#ifdef HAVE_SETNS ++ return setns (fd, nstype); ++#elif defined __NR_setns + return syscall (__NR_setns, fd, nstype); + #else + errno = ENOSYS; + return -1; + #endif + } +-#endif + + /* Handle systems without MSG_CMSG_CLOEXEC. */ + +@@ -495,7 +495,7 @@ mnsh_recv_message (int sock, enum mnsh_msg_type *type, + static ssize_t + mnsh_handle_setns (int sock, int fd, int nstype) + { +- int result = setns (fd, nstype); ++ int result = do_setns (fd, nstype); + + return mnsh_return_int (sock, result, errno); + } +-- +1.9.4 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 + |