summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-05-11 11:28:12 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-14 14:15:11 +0100
commit5757286da1e6f0c81ac0121cc9531549f24bafbd (patch)
tree3773c9a5d738bf76c6a0a84e5ad21377df8af93c
parentd8981bb2eb854ffc25905b2255229e668412d378 (diff)
downloadpoky-5757286da1e6f0c81ac0121cc9531549f24bafbd.tar.gz
gcc10: Revert using __getauxval in libgcc
This was added recently, but it seems be chewing more than what it should and causes non glibc packages also depend on it. (From OE-Core rev: 595d2df62b049e463568ab97cfe26d6df96a18a9) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-10.1.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-10.1/0038-Revert-AArch64-Use-__getauxval-instead-of-getauxval-.patch47
2 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-10.1.inc b/meta/recipes-devtools/gcc/gcc-10.1.inc
index 8c7a13d0ce..245f0a6fdb 100644
--- a/meta/recipes-devtools/gcc/gcc-10.1.inc
+++ b/meta/recipes-devtools/gcc/gcc-10.1.inc
@@ -65,6 +65,7 @@ SRC_URI = "\
65 file://0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \ 65 file://0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \
66 file://0036-Enable-CET-in-cross-compiler-if-possible.patch \ 66 file://0036-Enable-CET-in-cross-compiler-if-possible.patch \
67 file://0037-mingw32-Enable-operation_not_supported.patch \ 67 file://0037-mingw32-Enable-operation_not_supported.patch \
68 file://0038-Revert-AArch64-Use-__getauxval-instead-of-getauxval-.patch \
68" 69"
69SRC_URI[sha256sum] = "b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2" 70SRC_URI[sha256sum] = "b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2"
70 71
diff --git a/meta/recipes-devtools/gcc/gcc-10.1/0038-Revert-AArch64-Use-__getauxval-instead-of-getauxval-.patch b/meta/recipes-devtools/gcc/gcc-10.1/0038-Revert-AArch64-Use-__getauxval-instead-of-getauxval-.patch
new file mode 100644
index 0000000000..fc9228277a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-10.1/0038-Revert-AArch64-Use-__getauxval-instead-of-getauxval-.patch
@@ -0,0 +1,47 @@
1From 2101fb718935c7cf1cc2ad201bdeb1e635b54b0a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 11 May 2020 11:03:41 -0700
4Subject: [PATCH] Revert "[AArch64] Use __getauxval instead of getauxval in LSE
5 detection code in libgcc"
6
7This reverts commit 5a57016dd2758cc63a544f191f77635342397a72.
8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 libgcc/config/aarch64/lse-init.c | 17 ++++++++---------
13 1 file changed, 8 insertions(+), 9 deletions(-)
14
15diff --git a/libgcc/config/aarch64/lse-init.c b/libgcc/config/aarch64/lse-init.c
16index 00e9ab8cd1c..74acef25cce 100644
17--- a/libgcc/config/aarch64/lse-init.c
18+++ b/libgcc/config/aarch64/lse-init.c
19@@ -29,20 +29,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
20 _Bool __aarch64_have_lse_atomics
21 __attribute__((visibility("hidden"), nocommon));
22
23-/* Gate availability of __getauxval on glibc. All AArch64-supporting glibc
24- versions support it. */
25-#ifdef __gnu_linux__
26+/* Disable initialization of __aarch64_have_lse_atomics during bootstrap. */
27+#if !defined(inhibit_libc) && defined(HAVE_SYS_AUXV_H)
28+# include <sys/auxv.h>
29
30-# define AT_HWCAP 16
31-# define HWCAP_ATOMICS (1 << 8)
32-
33-unsigned long int __getauxval (unsigned long int);
34+/* Disable initialization if the system headers are too old. */
35+# if defined(AT_HWCAP) && defined(HWCAP_ATOMICS)
36
37 static void __attribute__((constructor))
38 init_have_lse_atomics (void)
39 {
40- unsigned long hwcap = __getauxval (AT_HWCAP);
41+ unsigned long hwcap = getauxval (AT_HWCAP);
42 __aarch64_have_lse_atomics = (hwcap & HWCAP_ATOMICS) != 0;
43 }
44
45-#endif /* __gnu_linux__ */
46+# endif /* HWCAP */
47+#endif /* inhibit_libc */