diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2023-09-25 19:19:27 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2023-09-25 22:29:45 +0200 |
commit | 04d707a7baaea6129a941a18bb2c4b629c29d22e (patch) | |
tree | 12a88fdaaf9807c01a0e578b5aeea2d315cd69b1 /source/x/mesa | |
parent | e2559d5d49cc23c6e82c6ca767ed63bab5dd0cf4 (diff) | |
download | current-04d707a7baaea6129a941a18bb2c4b629c29d22e.tar.gz current-04d707a7baaea6129a941a18bb2c4b629c29d22e.tar.xz |
Mon Sep 25 19:19:27 UTC 202320230925191927
ap/man-db-2.12.0-x86_64-1.txz: Upgraded.
ap/mpg123-1.32.1-x86_64-1.txz: Upgraded.
d/llvm-17.0.1-x86_64-1.txz: Upgraded.
Shared library .so-version bump.
d/lua-5.4.6-x86_64-4.txz: Rebuilt.
Fixed prefix and $LIBDIRSUFFIX in lua.pc. Thanks to ArTourter.
d/parallel-20230922-noarch-1.txz: Upgraded.
kde/kdevelop-23.08.1-x86_64-2.txz: Rebuilt.
Recompiled against llvm-17.0.1.
l/imagemagick-7.1.1_18-x86_64-1.txz: Upgraded.
l/libclc-17.0.1-x86_64-1.txz: Upgraded.
l/qt5-5.15.10_20230923_6e8e373e-x86_64-1.txz: Upgraded.
Compiled against llvm-17.0.1.
l/spirv-llvm-translator-17.0.0-x86_64-1.txz: Upgraded.
Compiled against llvm-17.0.1.
x/mesa-23.2.0_rc4-x86_64-1.txz: Upgraded.
Compiled against llvm-17.0.1.
Diffstat (limited to '')
-rwxr-xr-x | source/x/mesa/mesa.SlackBuild | 2 | ||||
-rw-r--r-- | source/x/mesa/patches/23827.patch | 42 | ||||
-rw-r--r-- | source/x/mesa/patches/2d4fe5f229791fde52846b3f583c12508b5109d6.patch | 127 |
3 files changed, 170 insertions, 1 deletions
diff --git a/source/x/mesa/mesa.SlackBuild b/source/x/mesa/mesa.SlackBuild index e69ebba18..4c3595d51 100755 --- a/source/x/mesa/mesa.SlackBuild +++ b/source/x/mesa/mesa.SlackBuild @@ -26,7 +26,7 @@ PKGNAM=mesa VERSION=${VERSION:-$(echo $PKGNAM-[0-9]*.tar.?z | rev | cut -f 3- -d . | rev | cut -f 2- -d -)} AMBERVERS=${AMBERVERS:-21.3.9} DEMOVERS=${DEMOVERS:-8.5.0} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} BUILD_AMBER=${BUILD_AMBER:-YES} BUILD_DEMOS=${BUILD_DEMOS:-YES} CODECS=${CODECS:-h264dec,h264enc,h265dec,h265enc,vc1dec} diff --git a/source/x/mesa/patches/23827.patch b/source/x/mesa/patches/23827.patch new file mode 100644 index 000000000..32dfd887a --- /dev/null +++ b/source/x/mesa/patches/23827.patch @@ -0,0 +1,42 @@ +From 919d6d420f49b61096b5ebfc65cfb3866a427e73 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 23 Jun 2023 01:20:38 -0700 +Subject: [PATCH] gallium: Fix build with llvm 17 + +These headers are not available for C files in llvm 17+ +and they seem to be not needed to compile after all with llvm 17 +so add conditions to exclude them for llvm >= 17 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c +index cd2108f3a088d..7131ec8667ecf 100644 +--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c ++++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c +@@ -45,16 +45,18 @@ + #include <llvm-c/BitWriter.h> + #if GALLIVM_USE_NEW_PASS == 1 + #include <llvm-c/Transforms/PassBuilder.h> +-#elif GALLIVM_HAVE_CORO == 1 ++#elif GALLIVM_HAVE_CORO == 1 && LLVM_VERSION_MAJOR < 17 + #include <llvm-c/Transforms/Scalar.h> +-#if LLVM_VERSION_MAJOR >= 7 ++#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17 + #include <llvm-c/Transforms/Utils.h> + #endif + #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64) + #include <llvm-c/Transforms/IPO.h> + #endif ++#if LLVM_VERSION_MAJOR < 17 + #include <llvm-c/Transforms/Coroutines.h> + #endif ++#endif + + unsigned gallivm_perf = 0; + +-- +GitLab + diff --git a/source/x/mesa/patches/2d4fe5f229791fde52846b3f583c12508b5109d6.patch b/source/x/mesa/patches/2d4fe5f229791fde52846b3f583c12508b5109d6.patch new file mode 100644 index 000000000..3fa3282f2 --- /dev/null +++ b/source/x/mesa/patches/2d4fe5f229791fde52846b3f583c12508b5109d6.patch @@ -0,0 +1,127 @@ +From 2d4fe5f229791fde52846b3f583c12508b5109d6 Mon Sep 17 00:00:00 2001 +From: Dave Airlie <airlied@redhat.com> +Date: Fri, 25 Aug 2023 12:43:44 +1000 +Subject: clover/llvm: move to modern pass manager. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This seems like it should work, but I haven't tested it yet. + +Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> +Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24879> +--- + src/gallium/frontends/clover/llvm/invocation.cpp | 64 +++++++++++++++++++----- + 1 file changed, 51 insertions(+), 13 deletions(-) + +diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp +index 7a50fea3323..43d26fe1abb 100644 +--- a/src/gallium/frontends/clover/llvm/invocation.cpp ++++ b/src/gallium/frontends/clover/llvm/invocation.cpp +@@ -27,13 +27,17 @@ + #include <llvm/IR/DiagnosticPrinter.h> + #include <llvm/IR/DiagnosticInfo.h> + #include <llvm/IR/LLVMContext.h> ++#include <llvm/IR/Module.h> + #include <llvm/Support/raw_ostream.h> +-#include <llvm/Transforms/IPO/PassManagerBuilder.h> ++#include <llvm/Transforms/IPO/Internalize.h> + #include <llvm-c/Target.h> + #ifdef HAVE_CLOVER_SPIRV + #include <LLVMSPIRVLib/LLVMSPIRVLib.h> + #endif + ++#include <llvm-c/TargetMachine.h> ++#include <llvm-c/Transforms/PassBuilder.h> ++#include <llvm/Support/CBindingWrapping.h> + #include <clang/CodeGen/CodeGenAction.h> + #include <clang/Lex/PreprocessorOptions.h> + #include <clang/Frontend/TextDiagnosticBuffer.h> +@@ -439,10 +443,10 @@ clover::llvm::compile_program(const std::string &source, + + namespace { + void +- optimize(Module &mod, unsigned optimization_level, ++ optimize(Module &mod, ++ const std::string& ir_target, ++ unsigned optimization_level, + bool internalize_symbols) { +- ::llvm::legacy::PassManager pm; +- + // By default, the function internalizer pass will look for a function + // called "main" and then mark all other functions as internal. Marking + // functions as internal enables the optimizer to perform optimizations +@@ -458,19 +462,53 @@ namespace { + if (internalize_symbols) { + std::vector<std::string> names = + map(std::mem_fn(&Function::getName), get_kernels(mod)); +- pm.add(::llvm::createInternalizePass( ++ internalizeModule(mod, + [=](const ::llvm::GlobalValue &gv) { + return std::find(names.begin(), names.end(), + gv.getName()) != names.end(); +- })); ++ }); + } + +- ::llvm::PassManagerBuilder pmb; +- pmb.OptLevel = optimization_level; +- pmb.LibraryInfo = new ::llvm::TargetLibraryInfoImpl( +- ::llvm::Triple(mod.getTargetTriple())); +- pmb.populateModulePassManager(pm); +- pm.run(mod); ++ ++ const char *opt_str = NULL; ++ LLVMCodeGenOptLevel level; ++ switch (optimization_level) { ++ case 0: ++ default: ++ opt_str = "default<O0>"; ++ level = LLVMCodeGenLevelNone; ++ break; ++ case 1: ++ opt_str = "default<O1>"; ++ level = LLVMCodeGenLevelLess; ++ break; ++ case 2: ++ opt_str = "default<O2>"; ++ level = LLVMCodeGenLevelDefault; ++ break; ++ case 3: ++ opt_str = "default<O3>"; ++ level = LLVMCodeGenLevelAggressive; ++ break; ++ } ++ ++ const target &target = ir_target; ++ LLVMTargetRef targ; ++ char *err_message; ++ ++ if (LLVMGetTargetFromTriple(target.triple.c_str(), &targ, &err_message)) ++ return; ++ LLVMTargetMachineRef tm = ++ LLVMCreateTargetMachine(targ, target.triple.c_str(), ++ target.cpu.c_str(), "", level, ++ LLVMRelocDefault, LLVMCodeModelDefault); ++ ++ if (!tm) ++ return; ++ LLVMPassBuilderOptionsRef opts = LLVMCreatePassBuilderOptions(); ++ LLVMRunPasses(wrap(&mod), opt_str, tm, opts); ++ ++ LLVMDisposeTargetMachine(tm); + } + + std::unique_ptr<Module> +@@ -500,7 +538,7 @@ clover::llvm::link_program(const std::vector<binary> &binaries, + auto c = create_compiler_instance(dev, dev.ir_target(), options, r_log); + auto mod = link(*ctx, *c, binaries, r_log); + +- optimize(*mod, c->getCodeGenOpts().OptimizationLevel, !create_library); ++ optimize(*mod, dev.ir_target(), c->getCodeGenOpts().OptimizationLevel, !create_library); + + static std::atomic_uint seq(0); + const std::string id = "." + mod->getModuleIdentifier() + "-" + +-- +cgit v1.2.1 + |