diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2024-05-04 22:13:49 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-05-05 07:37:32 -0700 |
commit | 32984eb9fdde4a61b48d04a02be049725e85e044 (patch) | |
tree | acb5b6a4f95c8bf5c09aa0fd40e0da732267e7ca /meta-oe/recipes-extended/libdeflate | |
parent | d4e3bdd519ce8c3b6b2ef920e25a232e4df0b101 (diff) | |
download | meta-openembedded-32984eb9fdde4a61b48d04a02be049725e85e044.tar.gz |
libdeflate: fix build with -mcpu=cortex-a76+crypto without -march=armv8.2-a+crypto
* fixes:
https://github.com/ebiggers/libdeflate/issues/369
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/libdeflate')
-rw-r--r-- | meta-oe/recipes-extended/libdeflate/libdeflate/0001-lib-arm-don-t-use-explicit-armv8.2-a-on-gcc-13.2-and.patch | 57 | ||||
-rw-r--r-- | meta-oe/recipes-extended/libdeflate/libdeflate_1.20.bb | 5 |
2 files changed, 60 insertions, 2 deletions
diff --git a/meta-oe/recipes-extended/libdeflate/libdeflate/0001-lib-arm-don-t-use-explicit-armv8.2-a-on-gcc-13.2-and.patch b/meta-oe/recipes-extended/libdeflate/libdeflate/0001-lib-arm-don-t-use-explicit-armv8.2-a-on-gcc-13.2-and.patch new file mode 100644 index 0000000000..e87972af27 --- /dev/null +++ b/meta-oe/recipes-extended/libdeflate/libdeflate/0001-lib-arm-don-t-use-explicit-armv8.2-a-on-gcc-13.2-and.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From 684ebc7f8eb44558219d4b5be52add1250b3c0ca Mon Sep 17 00:00:00 2001 | ||
2 | From: Eric Biggers <ebiggers@google.com> | ||
3 | Date: Tue, 30 Apr 2024 11:27:55 -0700 | ||
4 | Subject: [PATCH] lib/arm: don't use explicit armv8.2-a on gcc 13.2 and later | ||
5 | |||
6 | Resolves https://github.com/ebiggers/libdeflate/issues/369 | ||
7 | --- | ||
8 | Upstream-Status: Backport [https://github.com/ebiggers/libdeflate/pull/370] | ||
9 | |||
10 | lib/arm/adler32_impl.h | 10 ++++++---- | ||
11 | lib/arm/crc32_impl.h | 10 ++++++---- | ||
12 | 2 files changed, 12 insertions(+), 8 deletions(-) | ||
13 | |||
14 | diff --git a/lib/arm/adler32_impl.h b/lib/arm/adler32_impl.h | ||
15 | index 6453b8e..6144afb 100644 | ||
16 | --- a/lib/arm/adler32_impl.h | ||
17 | +++ b/lib/arm/adler32_impl.h | ||
18 | @@ -214,11 +214,13 @@ adler32_arm_neon(u32 adler, const u8 *p, size_t len) | ||
19 | # ifdef __clang__ | ||
20 | # define ATTRIBUTES _target_attribute("dotprod") | ||
21 | /* | ||
22 | - * With gcc, arch=armv8.2-a is needed for dotprod intrinsics, unless the | ||
23 | - * default target is armv8.3-a or later in which case it must be omitted. | ||
24 | - * armv8.3-a or later can be detected by checking for __ARM_FEATURE_JCVT. | ||
25 | + * With gcc 13.1 and earlier (before gcc commit 73d3bc348190 or 9aac37ab8a7b, | ||
26 | + * "aarch64: Remove architecture dependencies from intrinsics"), | ||
27 | + * arch=armv8.2-a is needed for the dotprod intrinsics, unless the default | ||
28 | + * target is armv8.3-a or later in which case it must be omitted. armv8.3-a | ||
29 | + * or later can be detected by checking for __ARM_FEATURE_JCVT. | ||
30 | */ | ||
31 | -# elif defined(__ARM_FEATURE_JCVT) | ||
32 | +# elif GCC_PREREQ(13, 2) || defined(__ARM_FEATURE_JCVT) | ||
33 | # define ATTRIBUTES _target_attribute("+dotprod") | ||
34 | # else | ||
35 | # define ATTRIBUTES _target_attribute("arch=armv8.2-a+dotprod") | ||
36 | diff --git a/lib/arm/crc32_impl.h b/lib/arm/crc32_impl.h | ||
37 | index 3c4bec7..5363041 100644 | ||
38 | --- a/lib/arm/crc32_impl.h | ||
39 | +++ b/lib/arm/crc32_impl.h | ||
40 | @@ -551,11 +551,13 @@ crc32_arm_pmullx4(u32 crc, const u8 *p, size_t len) | ||
41 | # ifdef __clang__ | ||
42 | # define ATTRIBUTES _target_attribute("aes,crc,sha3") | ||
43 | /* | ||
44 | - * With gcc, arch=armv8.2-a is needed for the sha3 intrinsics, unless the | ||
45 | - * default target is armv8.3-a or later in which case it must be omitted. | ||
46 | - * armv8.3-a or later can be detected by checking for __ARM_FEATURE_JCVT. | ||
47 | + * With gcc 13.1 and earlier (before gcc commit 73d3bc348190 or 9aac37ab8a7b, | ||
48 | + * "aarch64: Remove architecture dependencies from intrinsics"), | ||
49 | + * arch=armv8.2-a is needed for the sha3 intrinsics, unless the default | ||
50 | + * target is armv8.3-a or later in which case it must be omitted. armv8.3-a | ||
51 | + * or later can be detected by checking for __ARM_FEATURE_JCVT. | ||
52 | */ | ||
53 | -# elif defined(__ARM_FEATURE_JCVT) | ||
54 | +# elif GCC_PREREQ(13, 2) || defined(__ARM_FEATURE_JCVT) | ||
55 | # define ATTRIBUTES _target_attribute("+crypto,+crc,+sha3") | ||
56 | # else | ||
57 | # define ATTRIBUTES _target_attribute("arch=armv8.2-a+crypto+crc+sha3") | ||
diff --git a/meta-oe/recipes-extended/libdeflate/libdeflate_1.20.bb b/meta-oe/recipes-extended/libdeflate/libdeflate_1.20.bb index f0a966f2b4..e3de8aca62 100644 --- a/meta-oe/recipes-extended/libdeflate/libdeflate_1.20.bb +++ b/meta-oe/recipes-extended/libdeflate/libdeflate_1.20.bb | |||
@@ -6,10 +6,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7b6977026437092191e9da699ed9f780" | |||
6 | 6 | ||
7 | DEPENDS += "gzip zlib" | 7 | DEPENDS += "gzip zlib" |
8 | 8 | ||
9 | SRC_URI = "git://github.com/ebiggers/libdeflate.git;protocol=https;branch=master" | 9 | SRC_URI = "git://github.com/ebiggers/libdeflate.git;protocol=https;branch=master \ |
10 | file://0001-lib-arm-don-t-use-explicit-armv8.2-a-on-gcc-13.2-and.patch \ | ||
11 | " | ||
10 | 12 | ||
11 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
12 | SRCREV = "275aa5141db6eda3587214e0f1d3a134768f557d" | 14 | SRCREV = "275aa5141db6eda3587214e0f1d3a134768f557d" |
13 | 15 | ||
14 | inherit cmake pkgconfig | 16 | inherit cmake pkgconfig |
15 | |||