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:13:50 +0100
commit595d2df62b049e463568ab97cfe26d6df96a18a9 (patch)
tree23399b80dee7a09661b5fcfa39da86c38542155e
parent951e859b1e8297970278c539e989b8a6d06a9cb3 (diff)
downloadopenembedded-core-contrib-595d2df62b049e463568ab97cfe26d6df96a18a9.tar.gz
openembedded-core-contrib-595d2df62b049e463568ab97cfe26d6df96a18a9.tar.bz2
openembedded-core-contrib-595d2df62b049e463568ab97cfe26d6df96a18a9.zip
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. 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 = "\
file://0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \
file://0036-Enable-CET-in-cross-compiler-if-possible.patch \
file://0037-mingw32-Enable-operation_not_supported.patch \
+ file://0038-Revert-AArch64-Use-__getauxval-instead-of-getauxval-.patch \
"
SRC_URI[sha256sum] = "b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2"
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 @@
+From 2101fb718935c7cf1cc2ad201bdeb1e635b54b0a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 11 May 2020 11:03:41 -0700
+Subject: [PATCH] Revert "[AArch64] Use __getauxval instead of getauxval in LSE
+ detection code in libgcc"
+
+This reverts commit 5a57016dd2758cc63a544f191f77635342397a72.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libgcc/config/aarch64/lse-init.c | 17 ++++++++---------
+ 1 file changed, 8 insertions(+), 9 deletions(-)
+
+diff --git a/libgcc/config/aarch64/lse-init.c b/libgcc/config/aarch64/lse-init.c
+index 00e9ab8cd1c..74acef25cce 100644
+--- a/libgcc/config/aarch64/lse-init.c
++++ b/libgcc/config/aarch64/lse-init.c
+@@ -29,20 +29,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ _Bool __aarch64_have_lse_atomics
+ __attribute__((visibility("hidden"), nocommon));
+
+-/* Gate availability of __getauxval on glibc. All AArch64-supporting glibc
+- versions support it. */
+-#ifdef __gnu_linux__
++/* Disable initialization of __aarch64_have_lse_atomics during bootstrap. */
++#if !defined(inhibit_libc) && defined(HAVE_SYS_AUXV_H)
++# include <sys/auxv.h>
+
+-# define AT_HWCAP 16
+-# define HWCAP_ATOMICS (1 << 8)
+-
+-unsigned long int __getauxval (unsigned long int);
++/* Disable initialization if the system headers are too old. */
++# if defined(AT_HWCAP) && defined(HWCAP_ATOMICS)
+
+ static void __attribute__((constructor))
+ init_have_lse_atomics (void)
+ {
+- unsigned long hwcap = __getauxval (AT_HWCAP);
++ unsigned long hwcap = getauxval (AT_HWCAP);
+ __aarch64_have_lse_atomics = (hwcap & HWCAP_ATOMICS) != 0;
+ }
+
+-#endif /* __gnu_linux__ */
++# endif /* HWCAP */
++#endif /* inhibit_libc */