diff options
-rw-r--r-- | meta-oe/recipes-extended/highway/highway/0001-Add-cmake-check-for-deducing-32bit-or-64bit-RISCV.patch | 34 | ||||
-rw-r--r-- | meta-oe/recipes-extended/highway/highway_1.3.0.bb (renamed from meta-oe/recipes-extended/highway/highway_1.2.0.bb) | 2 |
2 files changed, 9 insertions, 27 deletions
diff --git a/meta-oe/recipes-extended/highway/highway/0001-Add-cmake-check-for-deducing-32bit-or-64bit-RISCV.patch b/meta-oe/recipes-extended/highway/highway/0001-Add-cmake-check-for-deducing-32bit-or-64bit-RISCV.patch index ecc9c441c5..1ab31e5eec 100644 --- a/meta-oe/recipes-extended/highway/highway/0001-Add-cmake-check-for-deducing-32bit-or-64bit-RISCV.patch +++ b/meta-oe/recipes-extended/highway/highway/0001-Add-cmake-check-for-deducing-32bit-or-64bit-RISCV.patch | |||
@@ -9,10 +9,13 @@ RVV as well | |||
9 | 9 | ||
10 | Upstream-Status: Submitted [https://github.com/google/highway/pull/2330] | 10 | Upstream-Status: Submitted [https://github.com/google/highway/pull/2330] |
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
12 | |||
12 | --- | 13 | --- |
13 | CMakeLists.txt | 38 +++++++++++++++++++++++++++++++++++--- | 14 | CMakeLists.txt | 27 +++++++++++++++++++++++++++ |
14 | 1 file changed, 35 insertions(+), 3 deletions(-) | 15 | 1 file changed, 27 insertions(+) |
15 | 16 | ||
17 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
18 | index 795408c5..9ddd92cd 100644 | ||
16 | --- a/CMakeLists.txt | 19 | --- a/CMakeLists.txt |
17 | +++ b/CMakeLists.txt | 20 | +++ b/CMakeLists.txt |
18 | @@ -59,6 +59,33 @@ if(CHECK_PIE_SUPPORTED) | 21 | @@ -59,6 +59,33 @@ if(CHECK_PIE_SUPPORTED) |
@@ -49,27 +52,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
49 | include(GNUInstallDirs) | 52 | include(GNUInstallDirs) |
50 | 53 | ||
51 | if (NOT CMAKE_BUILD_TYPE) | 54 | if (NOT CMAKE_BUILD_TYPE) |
52 | @@ -72,7 +99,7 @@ set(HWY_CMAKE_ARM7 OFF CACHE BOOL "Set c | 55 | -- |
53 | # skipped. For GCC 13.1+, you can also build with -fexcess-precision=standard. | 56 | 2.43.0 |
54 | set(HWY_CMAKE_SSE2 OFF CACHE BOOL "Set SSE2 as baseline for 32-bit x86?") | 57 | |
55 | |||
56 | -# Currently this will compile the entire codebase with `-march=rv64gcv1p0`: | ||
57 | +# Currently this will compile the entire codebase with `-march=rv<XLEN>gcv1p0`: | ||
58 | set(HWY_CMAKE_RVV ON CACHE BOOL "Set copts for RISCV with RVV?") | ||
59 | |||
60 | # Unconditionally adding -Werror risks breaking the build when new warnings | ||
61 | @@ -378,7 +405,13 @@ else() | ||
62 | # we add the gcv compiler flag, which then requires the CPU (now when using | ||
63 | # either compiler) to support V. | ||
64 | if(HWY_CMAKE_RVV) | ||
65 | - list(APPEND HWY_FLAGS -march=rv64gcv1p0) | ||
66 | + if(RISCV_XLEN EQUAL 64) | ||
67 | + list(APPEND HWY_FLAGS -march=rv64gcv1p0) | ||
68 | + add_link_options(-march=rv64gcv1p0) | ||
69 | + elseif(RISCV_XLEN EQUAL 32) | ||
70 | + list(APPEND HWY_FLAGS -march=rv32gcv1p0) | ||
71 | + add_link_options(-march=rv32gcv1p0) | ||
72 | + endif() | ||
73 | if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") | ||
74 | list(APPEND HWY_FLAGS -menable-experimental-extensions) | ||
75 | endif() | ||
diff --git a/meta-oe/recipes-extended/highway/highway_1.2.0.bb b/meta-oe/recipes-extended/highway/highway_1.3.0.bb index ea38310398..81b71b1f21 100644 --- a/meta-oe/recipes-extended/highway/highway_1.2.0.bb +++ b/meta-oe/recipes-extended/highway/highway_1.3.0.bb | |||
@@ -9,7 +9,7 @@ inherit cmake | |||
9 | SRC_URI = "git://github.com/google/highway.git;protocol=https;branch=master \ | 9 | SRC_URI = "git://github.com/google/highway.git;protocol=https;branch=master \ |
10 | file://0001-Add-cmake-check-for-deducing-32bit-or-64bit-RISCV.patch" | 10 | file://0001-Add-cmake-check-for-deducing-32bit-or-64bit-RISCV.patch" |
11 | 11 | ||
12 | SRCREV = "457c891775a7397bdb0376bb1031e6e027af1c48" | 12 | SRCREV = "ac0d5d297b13ab1b89f48484fc7911082d76a93f" |
13 | 13 | ||
14 | EXTRA_OECMAKE = "-DBUILD_TESTING=0 -DCMAKE_BUILD_TYPE=Release" | 14 | EXTRA_OECMAKE = "-DBUILD_TESTING=0 -DCMAKE_BUILD_TYPE=Release" |
15 | 15 | ||