This replaces the musl patches for gcc with the versions which are in gcc trunk. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 46873master
parent
5caee877dc
commit
0fdb4a458b
@ -1,11 +0,0 @@ |
||||
--- a/libgomp/config/posix/time.c
|
||||
+++ b/libgomp/config/posix/time.c
|
||||
@@ -29,6 +29,8 @@
|
||||
The following implementation uses the most simple POSIX routines.
|
||||
If present, POSIX 4 clocks should be used instead. */
|
||||
|
||||
+#define _POSIX_C_SOURCE 199309L /* for clocks */
|
||||
+
|
||||
#include "libgomp.h"
|
||||
#include <unistd.h>
|
||||
#if TIME_WITH_SYS_TIME
|
@ -0,0 +1,61 @@ |
||||
From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000)
|
||||
Subject: libitm fixes for musl support
|
||||
X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=e53a4d49c3d03ab8eaddb073cf972c1c46d75338
|
||||
|
||||
libitm fixes for musl support
|
||||
|
||||
On behalf of Szabolcs.Nagy@arm.com
|
||||
|
||||
2015-04-22 Gregor Richards <gregor.richards@uwaterloo.ca>
|
||||
|
||||
* config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h.
|
||||
* config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined.
|
||||
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222325 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
|
||||
--- a/libitm/config/arm/hwcap.cc
|
||||
+++ b/libitm/config/arm/hwcap.cc
|
||||
@@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0
|
||||
|
||||
#ifdef __linux__
|
||||
#include <unistd.h>
|
||||
-#include <sys/fcntl.h>
|
||||
+#include <fcntl.h>
|
||||
#include <elf.h>
|
||||
|
||||
static void __attribute__((constructor))
|
||||
--- a/libitm/config/linux/x86/tls.h
|
||||
+++ b/libitm/config/linux/x86/tls.h
|
||||
@@ -25,16 +25,19 @@
|
||||
#ifndef LIBITM_X86_TLS_H
|
||||
#define LIBITM_X86_TLS_H 1
|
||||
|
||||
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
|
||||
+#if defined(__GLIBC_PREREQ)
|
||||
+#if __GLIBC_PREREQ(2, 10)
|
||||
/* Use slots in the TCB head rather than __thread lookups.
|
||||
GLIBC has reserved words 10 through 13 for TM. */
|
||||
#define HAVE_ARCH_GTM_THREAD 1
|
||||
#define HAVE_ARCH_GTM_THREAD_DISP 1
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#include "config/generic/tls.h"
|
||||
|
||||
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
|
||||
+#if defined(__GLIBC_PREREQ)
|
||||
+#if __GLIBC_PREREQ(2, 10)
|
||||
namespace GTM HIDDEN {
|
||||
|
||||
#ifdef __x86_64__
|
||||
@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a
|
||||
|
||||
} // namespace GTM
|
||||
#endif /* >= GLIBC 2.10 */
|
||||
+#endif
|
||||
|
||||
#endif // LIBITM_X86_TLS_H
|
@ -0,0 +1,120 @@ |
||||
From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Fri, 8 May 2015 08:30:40 +0000 (+0000)
|
||||
Subject: [PATCH 0/13] Add musl support to GCC
|
||||
X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=f2d678afa5b8385d763b93772d73d6bf80a9739e
|
||||
|
||||
[PATCH 0/13] Add musl support to GCC
|
||||
|
||||
2015-05-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||||
|
||||
* config/glibc-stdint.h (OPTION_MUSL): Define.
|
||||
(INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE):
|
||||
Change the definition based on OPTION_MUSL for 64 bit targets.
|
||||
* config/linux.h (OPTION_MUSL): Redefine.
|
||||
* config/alpha/linux.h (OPTION_MUSL): Redefine.
|
||||
* config/rs6000/linux.h (OPTION_MUSL): Redefine.
|
||||
* config/rs6000/linux64.h (OPTION_MUSL): Redefine.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222905 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
|
||||
--- a/gcc/config/alpha/linux.h
|
||||
+++ b/gcc/config/alpha/linux.h
|
||||
@@ -61,10 +61,14 @@ along with GCC; see the file COPYING3.
|
||||
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL
|
||||
+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL
|
||||
+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
|
||||
/* Determine what functions are present at the runtime;
|
||||
--- a/gcc/config/glibc-stdint.h
|
||||
+++ b/gcc/config/glibc-stdint.h
|
||||
@@ -22,6 +22,12 @@ a copy of the GCC Runtime Library Except
|
||||
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
+/* Systems using musl libc should use this header and make sure
|
||||
+ OPTION_MUSL is defined correctly before using the TYPE macros. */
|
||||
+#ifndef OPTION_MUSL
|
||||
+#define OPTION_MUSL 0
|
||||
+#endif
|
||||
+
|
||||
#define SIG_ATOMIC_TYPE "int"
|
||||
|
||||
#define INT8_TYPE "signed char"
|
||||
@@ -43,12 +49,12 @@ see the files COPYING3 and COPYING.RUNTI
|
||||
#define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
|
||||
|
||||
#define INT_FAST8_TYPE "signed char"
|
||||
-#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
|
||||
-#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
|
||||
+#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
|
||||
+#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
|
||||
#define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
|
||||
#define UINT_FAST8_TYPE "unsigned char"
|
||||
-#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
|
||||
-#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
|
||||
+#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
|
||||
+#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
|
||||
#define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
|
||||
|
||||
#define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
|
||||
--- a/gcc/config/linux.h
|
||||
+++ b/gcc/config/linux.h
|
||||
@@ -32,11 +32,13 @@ see the files COPYING3 and COPYING.RUNTI
|
||||
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL
|
||||
#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL
|
||||
#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
|
||||
--- a/gcc/config/rs6000/linux.h
|
||||
+++ b/gcc/config/rs6000/linux.h
|
||||
@@ -30,10 +30,14 @@
|
||||
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL
|
||||
+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL
|
||||
+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
|
||||
/* Determine what functions are present at the runtime;
|
||||
--- a/gcc/config/rs6000/linux64.h
|
||||
+++ b/gcc/config/rs6000/linux64.h
|
||||
@@ -299,10 +299,14 @@ extern int dot_symbols;
|
||||
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL
|
||||
+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
|
||||
#else
|
||||
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
|
||||
#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
|
||||
#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
|
||||
+#undef OPTION_MUSL
|
||||
+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
|
||||
#endif
|
||||
|
||||
/* Determine what functions are present at the runtime;
|
@ -0,0 +1,34 @@ |
||||
From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
|
||||
Date: Wed, 22 Apr 2015 14:20:01 +0000 (+0000)
|
||||
Subject: unwind fix for musl
|
||||
X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a2e31d0681d8a47389b8a3552622fbd9827bcef4
|
||||
|
||||
unwind fix for musl
|
||||
|
||||
On behalf of szabolcs.nagy@arm.com
|
||||
|
||||
2015-04-22 Gregor Richards <gregor.richards@uwaterloo.ca>
|
||||
Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||||
|
||||
* unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on
|
||||
Linux if target provides dl_iterate_phdr.
|
||||
|
||||
|
||||
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222328 138bc75d-0d04-0410-961f-82ee72b054a4
|
||||
---
|
||||
|
||||
--- a/libgcc/unwind-dw2-fde-dip.c
|
||||
+++ b/libgcc/unwind-dw2-fde-dip.c
|
||||
@@ -59,6 +59,12 @@
|
||||
|
||||
#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
||||
&& defined(TARGET_DL_ITERATE_PHDR) \
|
||||
+ && defined(__linux__)
|
||||
+# define USE_PT_GNU_EH_FRAME
|
||||
+#endif
|
||||
+
|
||||
+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
||||
+ && defined(TARGET_DL_ITERATE_PHDR) \
|
||||
&& (defined(__DragonFly__) || defined(__FreeBSD__))
|
||||
# define ElfW __ElfN
|
||||
# define USE_PT_GNU_EH_FRAME
|
@ -1,43 +0,0 @@ |
||||
--- a/libgcc/unwind-dw2-fde-dip.c
|
||||
+++ b/libgcc/unwind-dw2-fde-dip.c
|
||||
@@ -46,34 +46,13 @@
|
||||
#include "unwind-compat.h"
|
||||
#include "gthr.h"
|
||||
|
||||
-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
||||
- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
|
||||
- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
|
||||
-# define USE_PT_GNU_EH_FRAME
|
||||
-#endif
|
||||
-
|
||||
-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
||||
- && defined(__BIONIC__)
|
||||
-# define USE_PT_GNU_EH_FRAME
|
||||
-#endif
|
||||
-
|
||||
-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
||||
- && defined(TARGET_DL_ITERATE_PHDR) \
|
||||
- && (defined(__DragonFly__) || defined(__FreeBSD__))
|
||||
-# define ElfW __ElfN
|
||||
-# define USE_PT_GNU_EH_FRAME
|
||||
-#endif
|
||||
-
|
||||
-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
||||
- && defined(__OpenBSD__)
|
||||
-# define ElfW(type) Elf_##type
|
||||
-# define USE_PT_GNU_EH_FRAME
|
||||
-#endif
|
||||
-
|
||||
-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
|
||||
- && defined(TARGET_DL_ITERATE_PHDR) \
|
||||
- && defined(__sun__) && defined(__svr4__)
|
||||
+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR)
|
||||
# define USE_PT_GNU_EH_FRAME
|
||||
+# ifdef __OpenBSD__
|
||||
+# define ElfW(type) Elf_##type
|
||||
+# elif defined(__FreeBSD__) && __FreeBSD__ >= 7
|
||||
+# define ElfW __ElfN
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
#if defined(USE_PT_GNU_EH_FRAME)
|
Loading…
Reference in new issue