[arch-commits] Commit in ispc/trunk (PKGBUILD llvm-11.1.0.patch llvm12.patch)
Evangelos Foutras
foutrelis at archlinux.org
Sun May 30 06:21:29 UTC 2021
Date: Sunday, May 30, 2021 @ 06:21:28
Author: foutrelis
Revision: 950346
upgpkg: ispc 1.15.0-3: LLVM 12 rebuild
Added:
ispc/trunk/llvm12.patch
Modified:
ispc/trunk/PKGBUILD
Deleted:
ispc/trunk/llvm-11.1.0.patch
-------------------+
PKGBUILD | 8 ++++----
llvm-11.1.0.patch | 40 ----------------------------------------
llvm12.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 56 insertions(+), 44 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-05-30 06:05:38 UTC (rev 950345)
+++ PKGBUILD 2021-05-30 06:21:28 UTC (rev 950346)
@@ -3,7 +3,7 @@
pkgname=ispc
pkgver=1.15.0
-pkgrel=2
+pkgrel=3
pkgdesc="Compiler for high-performance SIMD programming on the CPU"
arch=(x86_64)
url="https://ispc.github.io/"
@@ -11,15 +11,15 @@
depends=(ncurses zlib llvm-libs clang)
makedepends=(llvm python lib32-glibc cmake) # level-zero-headers level-zero-loader openmp spirv-llvm-translator vc-intrinsics)
source=(https://github.com/ispc/ispc/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz
- llvm-11.1.0.patch
+ llvm12.patch
ispc-libclang-cpp.patch)
sha256sums=('2658ff00dc045ac9fcefbf6bd26dffaf723b059a942a27df91bbb61bc503a285'
- 'fd2bc96a65656350629918be8c57682d1936ddbe37d410d8c8667538dc992cac'
+ '7fc5cee572731a5a31f02c7ecea301c42551c56160d58f164cfd01834e53087a'
'f6a162b8b60e0a0d17526c4e70bf9bc681c0e16cfee2b8cde1d7f9a5a99b8e78')
prepare() {
cd ${pkgname}-${pkgver}
- patch -p1 -i ../llvm-11.1.0.patch # Fix build with LLVM 11.1.0
+ patch -p1 -i ../llvm12.patch # Fix build with LLVM 12
patch -p1 -i ../ispc-libclang-cpp.patch # Build with unified libclang-cpp.so
# Remove tests that requires DUMPS (https://github.com/ispc/ispc/issues/1752)
sed -i '/debug-phase/d' tests/lit-tests/arg_parsing_errors.ispc
Deleted: llvm-11.1.0.patch
===================================================================
--- llvm-11.1.0.patch 2021-05-30 06:05:38 UTC (rev 950345)
+++ llvm-11.1.0.patch 2021-05-30 06:21:28 UTC (rev 950346)
@@ -1,40 +0,0 @@
-From 3cf2c0ade52eb1e25af7ceef30a62c81b6887bae Mon Sep 17 00:00:00 2001
-From: Tom Stellard <tstellar at redhat.com>
-Date: Sat, 23 Jan 2021 03:10:11 +0000
-Subject: [PATCH] Hard-code LLVM_VERSION_MINOR to 0 to fix build with llvm
- 11.1.0
-
----
- cmake/LLVMConfig.cmake | 2 +-
- src/ispc_version.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/cmake/LLVMConfig.cmake b/cmake/LLVMConfig.cmake
-index 8f5d6cf4..f6e1ef82 100644
---- a/cmake/LLVMConfig.cmake
-+++ b/cmake/LLVMConfig.cmake
-@@ -38,7 +38,7 @@ find_package(LLVM REQUIRED CONFIG)
- message(FATAL_ERROR "LLVM package can't be found. \
- Set CMAKE_PREFIX_PATH variable to LLVM's installation prefix.")
- endif()
-- set(LLVM_VERSION "LLVM_${LLVM_VERSION_MAJOR}_${LLVM_VERSION_MINOR}")
-+ set(LLVM_VERSION "LLVM_${LLVM_VERSION_MAJOR}_0")
- message(STATUS "Found LLVM ${LLVM_VERSION}")
-
- find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config
-diff --git a/src/ispc_version.h b/src/ispc_version.h
-index 75c2f38f..fa57042d 100644
---- a/src/ispc_version.h
-+++ b/src/ispc_version.h
-@@ -42,7 +42,7 @@
- #define ISPC_VERSION "1.15.0"
- #include <llvm/Config/llvm-config.h>
-
--#define ISPC_LLVM_VERSION (LLVM_VERSION_MAJOR * 10000 + LLVM_VERSION_MINOR * 100)
-+#define ISPC_LLVM_VERSION (LLVM_VERSION_MAJOR * 10000 + 0 * 100)
-
- #define ISPC_LLVM_8_0 80000
- #define ISPC_LLVM_9_0 90000
---
-2.26.2
-
Added: llvm12.patch
===================================================================
--- llvm12.patch (rev 0)
+++ llvm12.patch 2021-05-30 06:21:28 UTC (rev 950346)
@@ -0,0 +1,52 @@
+Author: Hans-Peter Jansen (frispete)
+
+Found @ https://build.opensuse.org/package/show/devel:tools:compiler/ispc
+
+Index: b/src/ctx.cpp
+===================================================================
+--- a/src/ctx.cpp
++++ b/src/ctx.cpp
+@@ -1473,11 +1473,15 @@ void FunctionEmitContext::AddDebugPos(ll
+ llvm::Instruction *inst = llvm::dyn_cast<llvm::Instruction>(value);
+ if (inst != NULL && m->diBuilder) {
+ SourcePos p = pos ? *pos : currentPos;
+- if (p.first_line != 0)
++ if (p.first_line != 0) {
+ // If first_line == 0, then we're in the middle of setting up
+ // the standard library or the like; don't add debug positions
+ // for those functions
+- inst->setDebugLoc(llvm::DebugLoc::get(p.first_line, p.first_column, scope ? scope : GetDIScope()));
++ scope = scope ? scope : GetDIScope();
++ llvm::DebugLoc diLoc =
++ llvm::DILocation::get(scope->getContext(), p.first_line, p.first_column, scope, nullptr, false);
++ inst->setDebugLoc(diLoc);
++ }
+ }
+ }
+
+@@ -1518,9 +1522,10 @@ void FunctionEmitContext::EmitVariableDe
+ llvm::DILocalVariable *var = m->diBuilder->createAutoVariable(
+ scope, sym->name, sym->pos.GetDIFile(), sym->pos.first_line, diType, true /* preserve through opts */);
+
++ llvm::DebugLoc diLoc =
++ llvm::DILocation::get(scope->getContext(), sym->pos.first_line, sym->pos.first_column, scope, nullptr, false);
+ llvm::Instruction *declareInst =
+- m->diBuilder->insertDeclare(sym->storagePtr, var, m->diBuilder->createExpression(),
+- llvm::DebugLoc::get(sym->pos.first_line, sym->pos.first_column, scope), bblock);
++ m->diBuilder->insertDeclare(sym->storagePtr, var, m->diBuilder->createExpression(), diLoc, bblock);
+ AddDebugPos(declareInst, &sym->pos, scope);
+ }
+
+@@ -1535,9 +1540,10 @@ void FunctionEmitContext::EmitFunctionPa
+ m->diBuilder->createParameterVariable(scope, sym->name, argNum + 1, sym->pos.GetDIFile(), sym->pos.first_line,
+ diType, true /* preserve through opts */, flags);
+
++ llvm::DebugLoc diLoc =
++ llvm::DILocation::get(scope->getContext(), sym->pos.first_line, sym->pos.first_column, scope, nullptr, false);
+ llvm::Instruction *declareInst =
+- m->diBuilder->insertDeclare(sym->storagePtr, var, m->diBuilder->createExpression(),
+- llvm::DebugLoc::get(sym->pos.first_line, sym->pos.first_column, scope), bblock);
++ m->diBuilder->insertDeclare(sym->storagePtr, var, m->diBuilder->createExpression(), diLoc, bblock);
+ AddDebugPos(declareInst, &sym->pos, scope);
+ }
+
More information about the arch-commits
mailing list