From fe91ebe55c13c4fd15ded2f7da50fc4e0a475422 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 11 Sep 2022 13:25:57 -0700 Subject: luajit: Use builtin for __clear_cache on clang Fixed build on mips Signed-off-by: Khem Raj --- .../luajit/0001-Use-builtin-for-clear_cache.patch | 29 ++++++++++++++++++++++ meta-oe/recipes-devtools/luajit/luajit_git.bb | 1 + 2 files changed, 30 insertions(+) create mode 100644 meta-oe/recipes-devtools/luajit/luajit/0001-Use-builtin-for-clear_cache.patch (limited to 'meta-oe/recipes-devtools/luajit') 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 0000000000..2c41180d91 --- /dev/null +++ b/meta-oe/recipes-devtools/luajit/luajit/0001-Use-builtin-for-clear_cache.patch @@ -0,0 +1,29 @@ +From ca8f7d968a212f2da64492faac4f80384a5ba395 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 11 Sep 2022 13:23:19 -0700 +Subject: [PATCH] Use builtin for clear_cache + +This makes it compile on mips/clang and also portable across platforms + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + src/lj_mcode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lj_mcode.c b/src/lj_mcode.c +index 163aada4..471897da 100644 +--- a/src/lj_mcode.c ++++ b/src/lj_mcode.c +@@ -46,7 +46,7 @@ void lj_mcode_sync(void *start, void *end) + #elif LJ_TARGET_PPC + lj_vm_cachesync(start, end); + #elif defined(__GNUC__) || defined(__clang__) +- __clear_cache(start, end); ++ __builtin___clear_cache(start, end); + #else + #error "Missing builtin to flush instruction cache" + #endif +-- +2.37.3 + diff --git a/meta-oe/recipes-devtools/luajit/luajit_git.bb b/meta-oe/recipes-devtools/luajit/luajit_git.bb index 3f3939eeb4..dd1cd51698 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" SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http;branch=v2.1 \ file://0001-Do-not-strip-automatically-this-leaves-the-stripping.patch \ file://clang.patch \ + file://0001-Use-builtin-for-clear_cache.patch \ " # Set PV to a version tag and date (YYMMDD) associated with SRCREV if it is later. -- cgit v1.2.3-54-g00ecf