diff options
| -rw-r--r-- | meta/recipes-extended/ltp/ltp/0001-Add-__clear_cache-declaration-for-clang.patch | 32 | ||||
| -rw-r--r-- | meta/recipes-extended/ltp/ltp_20240524.bb | 1 |
2 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-Add-__clear_cache-declaration-for-clang.patch b/meta/recipes-extended/ltp/ltp/0001-Add-__clear_cache-declaration-for-clang.patch new file mode 100644 index 0000000000..ade6a52b63 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-Add-__clear_cache-declaration-for-clang.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From 2d384f268791ecd5ff0f26c8137dd4de0a1c4566 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 10 Jun 2024 22:52:56 -0700 | ||
| 4 | Subject: [PATCH] Add __clear_cache declaration for clang | ||
| 5 | |||
| 6 | __clear_cache was enabled on RISCV recently with 7352ba02390116f1cd6a9b583860ba28aa0a1b7a | ||
| 7 | however it fails to compile with clang19 on RISCV | ||
| 8 | With this error | ||
| 9 | |||
| 10 | hugemmap15.c:51:2: error: call to undeclared function '__clear_cache'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] | ||
| 11 | 51 | __clear_cache(p, p + COPY_SIZE); | ||
| 12 | | ^ | ||
| 13 | |||
| 14 | Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2024-June/038762.html] | ||
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 16 | Cc: Hui Min Mina Chou <minachou@andestech.com> | ||
| 17 | --- | ||
| 18 | testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c | 1 + | ||
| 19 | 1 file changed, 1 insertion(+) | ||
| 20 | |||
| 21 | diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c | ||
| 22 | index a84ba6476..856e22ff3 100644 | ||
| 23 | --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c | ||
| 24 | +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c | ||
| 25 | @@ -21,6 +21,7 @@ | ||
| 26 | |||
| 27 | #if defined(__clang__) | ||
| 28 | #pragma clang optimize off | ||
| 29 | + void __clear_cache(void *start, void *end); | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #define _GNU_SOURCE | ||
diff --git a/meta/recipes-extended/ltp/ltp_20240524.bb b/meta/recipes-extended/ltp/ltp_20240524.bb index 1aafed0bf5..7105154712 100644 --- a/meta/recipes-extended/ltp/ltp_20240524.bb +++ b/meta/recipes-extended/ltp/ltp_20240524.bb | |||
| @@ -28,6 +28,7 @@ SRCREV = "8f21ebba42216dbb7e8d44c23b4a977d6823f7a1" | |||
| 28 | 28 | ||
| 29 | SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \ | 29 | SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=https \ |
| 30 | file://0001-Remove-OOM-tests-from-runtest-mm.patch \ | 30 | file://0001-Remove-OOM-tests-from-runtest-mm.patch \ |
| 31 | file://0001-Add-__clear_cache-declaration-for-clang.patch \ | ||
| 31 | " | 32 | " |
| 32 | 33 | ||
| 33 | S = "${WORKDIR}/git" | 34 | S = "${WORKDIR}/git" |
