diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-09-11 13:25:57 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-09-11 20:42:05 -0700 |
commit | fe91ebe55c13c4fd15ded2f7da50fc4e0a475422 (patch) | |
tree | acc0b9d65ed73ea160d6be09f181626cef9487b7 /meta-oe/recipes-devtools/luajit | |
parent | 0eca35be06d9030c2ad3996ccb179451d221a932 (diff) | |
download | meta-openembedded-fe91ebe55c13c4fd15ded2f7da50fc4e0a475422.tar.gz |
luajit: Use builtin for __clear_cache on clang
Fixed build on mips
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/luajit')
-rw-r--r-- | meta-oe/recipes-devtools/luajit/luajit/0001-Use-builtin-for-clear_cache.patch | 29 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/luajit/luajit_git.bb | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/luajit/luajit/0001-Use-builtin-for-clear_cache.patch b/meta-oe/recipes-devtools/luajit/luajit/0001-Use-builtin-for-clear_cache.patch new file mode 100644 index 000000000..2c41180d9 --- /dev/null +++ b/meta-oe/recipes-devtools/luajit/luajit/0001-Use-builtin-for-clear_cache.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From ca8f7d968a212f2da64492faac4f80384a5ba395 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 11 Sep 2022 13:23:19 -0700 | ||
4 | Subject: [PATCH] Use builtin for clear_cache | ||
5 | |||
6 | This makes it compile on mips/clang and also portable across platforms | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | src/lj_mcode.c | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/src/lj_mcode.c b/src/lj_mcode.c | ||
15 | index 163aada4..471897da 100644 | ||
16 | --- a/src/lj_mcode.c | ||
17 | +++ b/src/lj_mcode.c | ||
18 | @@ -46,7 +46,7 @@ void lj_mcode_sync(void *start, void *end) | ||
19 | #elif LJ_TARGET_PPC | ||
20 | lj_vm_cachesync(start, end); | ||
21 | #elif defined(__GNUC__) || defined(__clang__) | ||
22 | - __clear_cache(start, end); | ||
23 | + __builtin___clear_cache(start, end); | ||
24 | #else | ||
25 | #error "Missing builtin to flush instruction cache" | ||
26 | #endif | ||
27 | -- | ||
28 | 2.37.3 | ||
29 | |||
diff --git a/meta-oe/recipes-devtools/luajit/luajit_git.bb b/meta-oe/recipes-devtools/luajit/luajit_git.bb index 3f3939eeb..dd1cd5169 100644 --- a/meta-oe/recipes-devtools/luajit/luajit_git.bb +++ b/meta-oe/recipes-devtools/luajit/luajit_git.bb | |||
@@ -6,6 +6,7 @@ HOMEPAGE = "http://luajit.org" | |||
6 | SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http;branch=v2.1 \ | 6 | SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http;branch=v2.1 \ |
7 | file://0001-Do-not-strip-automatically-this-leaves-the-stripping.patch \ | 7 | file://0001-Do-not-strip-automatically-this-leaves-the-stripping.patch \ |
8 | file://clang.patch \ | 8 | file://clang.patch \ |
9 | file://0001-Use-builtin-for-clear_cache.patch \ | ||
9 | " | 10 | " |
10 | 11 | ||
11 | # Set PV to a version tag and date (YYMMDD) associated with SRCREV if it is later. | 12 | # Set PV to a version tag and date (YYMMDD) associated with SRCREV if it is later. |