diff options
author | Khem Raj <raj.khem@gmail.com> | 2024-03-23 10:57:55 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-03-26 17:10:51 +0000 |
commit | 81567510fd9f876082204217f7a41782966eec18 (patch) | |
tree | 761d19598e1265681656b363f97c5652e3e0456b /meta/recipes-core/glibc | |
parent | daa6afead84588f8b302228b581498f492d21d38 (diff) | |
download | poky-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.patch | 67 |
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 @@ | |||
1 | From f761f5ca2d453e11d34fc7d552dab4a0e189dae9 Mon Sep 17 00:00:00 2001 | 1 | From 73c26018ed0ecd9c807bb363cc2c2ab4aca66a82 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Szabolcs Nagy <szabolcs.nagy@arm.com> |
3 | Date: Fri, 4 Aug 2023 09:34:50 -0700 | 3 | Date: Wed, 13 Mar 2024 14:34:14 +0000 |
4 | Subject: [PATCH] aarch64/configure: Pass -mcpu along with -march to detect sve | 4 | Subject: [PATCH] aarch64: fix check for SVE support in assembler |
5 | support | ||
6 | 5 | ||
7 | SVE support logic in configure is rightly passing -march=<arch>+sve to | 6 | Due to GCC bug 110901 -mcpu can override -march setting when compiling |
8 | compiler to override whatever user might have passed via environment, | 7 | asm code and thus a compiler targetting a specific cpu can fail the |
9 | however GCC does not do as intended when -mcpu is part of environment | 8 | configure check even when binutils gas supports SVE. |
10 | compiler flags, then it overrides the -march computed from -mcpu and | ||
11 | igonores other -march values so this test fails for lot of aarch64 | ||
12 | machines which pass -mcpu that does not support sve. This is seemingly a | ||
13 | bug in GCC [1], until that is fixed we preempt -mcpu along with -march | ||
14 | in the configure test itself. It does not change functionality and yet | ||
15 | lets us through the GCC inconsistency. | ||
16 | 9 | ||
17 | [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110901 | 10 | The workaround is that explicit .arch directive overrides both -mcpu |
18 | 11 | and -march, and since that's what the actual SVE memcpy uses the | |
19 | Upstream-Status: Inappropriate [Workaround for a GCC issue] | 12 | configure check should use that too even if the GCC issue is fixed |
20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 13 | independently. |
21 | 14 | ||
15 | Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=73c26018ed0ecd9c807bb363cc2c2ab4aca66a82] | ||
22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
17 | Reviewed-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 | ||
28 | diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure | 24 | diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure |
29 | index 5e91fab023..39dddc66d4 100644 | 25 | old mode 100644 |
26 | new mode 100755 | ||
27 | index 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=$? |
41 | diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac | 43 | diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac |
42 | index 8a708f2ef4..b6a146d2be 100644 | 44 | index 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 | -- | ||
61 | 2.44.0 | ||
62 | |||