From c37942613e70c49c9fce3247c1427d0a1c10ad21 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 11 Jun 2021 20:26:39 -0700 Subject: mesa: Do not StackAlignmentOverride on llvm >= 13 This has been removed see https://reviews.llvm.org/D103048 Signed-off-by: Khem Raj --- recipes-graphics/mesa/mesa/clang13.patch | 15 +++++++++++++++ recipes-graphics/mesa/mesa_%.bbappend | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 recipes-graphics/mesa/mesa/clang13.patch diff --git a/recipes-graphics/mesa/mesa/clang13.patch b/recipes-graphics/mesa/mesa/clang13.patch new file mode 100644 index 0000000..8387b34 --- /dev/null +++ b/recipes-graphics/mesa/mesa/clang13.patch @@ -0,0 +1,15 @@ +--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp ++++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +@@ -351,8 +351,12 @@ lp_build_create_jit_compiler_for_module( + */ + TargetOptions options; + #if defined(PIPE_ARCH_X86) ++#if LLVM_VERSION_MAJOR >= 13 ++ // do nothing ++#else + options.StackAlignmentOverride = 4; + #endif ++#endif + + builder.setEngineKind(EngineKind::JIT) + .setErrorStr(&Error) diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend index ddf5305..d382f40 100644 --- a/recipes-graphics/mesa/mesa_%.bbappend +++ b/recipes-graphics/mesa/mesa_%.bbappend @@ -1,3 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_toolchain-clang = " file://clang13.patch " + LDFLAGS_append_toolchain-clang = " -latomic -lm" DEPENDS_append_toolchain-clang = " libatomic-ops" @@ -6,4 +10,4 @@ EXTRA_OEMASON_append_toolchain-clang_x86-64 = " -Dasm=false" export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-config" -PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, clang clang-native elfutils" +PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true -Ddraw-use-llvm=true,-Dllvm=false,clang clang-native elfutils" -- cgit v1.2.3-54-g00ecf