summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-03-23 10:57:55 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-03-26 17:10:51 +0000
commit81567510fd9f876082204217f7a41782966eec18 (patch)
tree761d19598e1265681656b363f97c5652e3e0456b /meta/recipes-core/glibc
parentdaa6afead84588f8b302228b581498f492d21d38 (diff)
downloadpoky-81567510fd9f876082204217f7a41782966eec18.tar.gz
glibc: Repace aarch configure patch fix with a backport
despite it being an issue in gcc and still being open glibc has fixed this problem upstream regardless, therefore apply the backport instead. (From OE-Core rev: a6200d18c6a1438e39d44b391f8d0e343f8fdc1a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc')
-rw-r--r--meta/recipes-core/glibc/glibc/0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch67
1 files changed, 38 insertions, 29 deletions
diff --git a/meta/recipes-core/glibc/glibc/0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch b/meta/recipes-core/glibc/glibc/0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch
index 816471a828..f6523c5498 100644
--- a/meta/recipes-core/glibc/glibc/0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch
+++ b/meta/recipes-core/glibc/glibc/0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch
@@ -1,53 +1,62 @@
1From f761f5ca2d453e11d34fc7d552dab4a0e189dae9 Mon Sep 17 00:00:00 2001 1From 73c26018ed0ecd9c807bb363cc2c2ab4aca66a82 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Szabolcs Nagy <szabolcs.nagy@arm.com>
3Date: Fri, 4 Aug 2023 09:34:50 -0700 3Date: Wed, 13 Mar 2024 14:34:14 +0000
4Subject: [PATCH] aarch64/configure: Pass -mcpu along with -march to detect sve 4Subject: [PATCH] aarch64: fix check for SVE support in assembler
5 support
6 5
7SVE support logic in configure is rightly passing -march=<arch>+sve to 6Due to GCC bug 110901 -mcpu can override -march setting when compiling
8compiler to override whatever user might have passed via environment, 7asm code and thus a compiler targetting a specific cpu can fail the
9however GCC does not do as intended when -mcpu is part of environment 8configure check even when binutils gas supports SVE.
10compiler flags, then it overrides the -march computed from -mcpu and
11igonores other -march values so this test fails for lot of aarch64
12machines which pass -mcpu that does not support sve. This is seemingly a
13bug in GCC [1], until that is fixed we preempt -mcpu along with -march
14in the configure test itself. It does not change functionality and yet
15lets us through the GCC inconsistency.
16 9
17[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110901 10The workaround is that explicit .arch directive overrides both -mcpu
18 11and -march, and since that's what the actual SVE memcpy uses the
19Upstream-Status: Inappropriate [Workaround for a GCC issue] 12configure check should use that too even if the GCC issue is fixed
20Signed-off-by: Khem Raj <raj.khem@gmail.com> 13independently.
21 14
15Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=73c26018ed0ecd9c807bb363cc2c2ab4aca66a82]
22Signed-off-by: Khem Raj <raj.khem@gmail.com> 16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17Reviewed-by: Florian Weimer <fweimer@redhat.com>
23--- 18---
24 sysdeps/aarch64/configure | 2 +- 19 sysdeps/aarch64/configure | 5 +++--
25 sysdeps/aarch64/configure.ac | 2 +- 20 sysdeps/aarch64/configure.ac | 5 +++--
26 2 files changed, 2 insertions(+), 2 deletions(-) 21 2 files changed, 6 insertions(+), 4 deletions(-)
22 mode change 100644 => 100755 sysdeps/aarch64/configure
27 23
28diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure 24diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure
29index 5e91fab023..39dddc66d4 100644 25old mode 100644
26new mode 100755
27index ca57edce47..9606137e8d
30--- a/sysdeps/aarch64/configure 28--- a/sysdeps/aarch64/configure
31+++ b/sysdeps/aarch64/configure 29+++ b/sysdeps/aarch64/configure
32@@ -327,7 +327,7 @@ else $as_nop 30@@ -325,9 +325,10 @@ then :
31 printf %s "(cached) " >&6
32 else $as_nop
33 cat > conftest.s <<\EOF 33 cat > conftest.s <<\EOF
34 ptrue p0.b 34- ptrue p0.b
35+ .arch armv8.2-a+sve
36+ ptrue p0.b
35 EOF 37 EOF
36-if { ac_try='${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&5' 38-if { ac_try='${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&5'
37+if { ac_try='${CC-cc} -c -mcpu=generic+sve -march=armv8.2-a+sve conftest.s 1>&5' 39+if { ac_try='${CC-cc} -c conftest.s 1>&5'
38 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 40 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
39 (eval $ac_try) 2>&5 41 (eval $ac_try) 2>&5
40 ac_status=$? 42 ac_status=$?
41diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac 43diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac
42index 8a708f2ef4..b6a146d2be 100644 44index 27874eceb4..56d12d661d 100644
43--- a/sysdeps/aarch64/configure.ac 45--- a/sysdeps/aarch64/configure.ac
44+++ b/sysdeps/aarch64/configure.ac 46+++ b/sysdeps/aarch64/configure.ac
45@@ -92,7 +92,7 @@ AC_CACHE_CHECK([for SVE support in assembler], [libc_cv_aarch64_sve_asm], [dnl 47@@ -90,9 +90,10 @@ LIBC_CONFIG_VAR([aarch64-variant-pcs], [$libc_cv_aarch64_variant_pcs])
48 # Check if asm support armv8.2-a+sve
49 AC_CACHE_CHECK([for SVE support in assembler], [libc_cv_aarch64_sve_asm], [dnl
46 cat > conftest.s <<\EOF 50 cat > conftest.s <<\EOF
47 ptrue p0.b 51- ptrue p0.b
52+ .arch armv8.2-a+sve
53+ ptrue p0.b
48 EOF 54 EOF
49-if AC_TRY_COMMAND(${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&AS_MESSAGE_LOG_FD); then 55-if AC_TRY_COMMAND(${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&AS_MESSAGE_LOG_FD); then
50+if AC_TRY_COMMAND(${CC-cc} -c -mcpu=generic+sve -march=armv8.2-a+sve conftest.s 1>&AS_MESSAGE_LOG_FD); then 56+if AC_TRY_COMMAND(${CC-cc} -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
51 libc_cv_aarch64_sve_asm=yes 57 libc_cv_aarch64_sve_asm=yes
52 else 58 else
53 libc_cv_aarch64_sve_asm=no 59 libc_cv_aarch64_sve_asm=no
60--
612.44.0
62