[arch-commits] Commit in faust/trunk (PKGBUILD faust-2.30.5-llvm-11.1.0.patch)
David Runge
dvzrv at archlinux.org
Fri Apr 16 17:09:33 UTC 2021
Date: Friday, April 16, 2021 @ 17:09:31
Author: dvzrv
Revision: 919521
upgpkg: faust 2.30.5-2: Rebuild to fix build for llvm >= 11.1.0.
Fix preprocessor conditionals that are too specific:
https://github.com/grame-cncm/faust/issues/573
Change ruby optdepends to ruby-rexml:
https://github.com/grame-cncm/faust/issues/572
Added:
faust/trunk/faust-2.30.5-llvm-11.1.0.patch
Modified:
faust/trunk/PKGBUILD
--------------------------------+
PKGBUILD | 20 +++++-
faust-2.30.5-llvm-11.1.0.patch | 116 +++++++++++++++++++++++++++++++++++++++
2 files changed, 131 insertions(+), 5 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-04-16 16:52:26 UTC (rev 919520)
+++ PKGBUILD 2021-04-16 17:09:31 UTC (rev 919521)
@@ -5,7 +5,7 @@
pkgname=faust
pkgver=2.30.5
-pkgrel=1
+pkgrel=2
pkgdesc="A functional programming language for realtime audio signal processing."
arch=('x86_64')
url="https://faust.grame.fr/"
@@ -28,16 +28,26 @@
'python: for faust2md and faust2atomsnippets'
'qt5-tools: for faust2{faustvst,jaqt,lv2}'
'rtaudio: for faust2raqt'
- 'ruby: for faust2sc and scbuilder'
+ 'ruby-rexml: for faust2sc and scbuilder'
'rust: for faust2jackrust'
'supercollider: for faust2supercollider'
'texlive-core: for faust2pdf')
provides=('libfaustmachine.so' 'libfaust.so' 'libOSCFaust.so' 'libHTTPDFaust.so')
options=('staticlibs')
-source=("https://github.com/grame-cncm/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz")
-sha512sums=('33271a39a465d257d7ccac529d1dac822940d72a1f19dcbbacce5d4d2b9ab5d367e6be001fab6bfd944a1480a2429b054a07d424916419117389154cbcd4d1ef')
-b2sums=('116a6aba81c5b170528e08de2bf23f2f52800dea72a4beb550ff9796a71be7a7ce4415911ec54b7bf32d2eb8227d9193bc37e17750fa596d73a1022a3be2396e')
+source=("https://github.com/grame-cncm/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ "${pkgname}-${pkgver}-llvm-11.1.0.patch")
+sha512sums=('33271a39a465d257d7ccac529d1dac822940d72a1f19dcbbacce5d4d2b9ab5d367e6be001fab6bfd944a1480a2429b054a07d424916419117389154cbcd4d1ef'
+ 'ffffdc78b0818973fbc9514806529fdff005fb25dc691896afc883dcfe5c2c40995d11ae6e5e1b1e837d0d7ac9875b266b0eab1fc23367ad8a87ed93ac460dab')
+b2sums=('116a6aba81c5b170528e08de2bf23f2f52800dea72a4beb550ff9796a71be7a7ce4415911ec54b7bf32d2eb8227d9193bc37e17750fa596d73a1022a3be2396e'
+ '6b303d8d689953281adf17805c9dde517b41f41beda3bc0424ed3421b448db725a8eb95a6d9fa5ee23d244e32de4f5a6a6cb0c86d589fb43f8b7c7274adf27bc')
+prepare() {
+ cd "${pkgname}-${pkgver}"
+ # extend explicit LLVM version checks:
+ # https://github.com/grame-cncm/faust/issues/573
+ patch -Np1 -i "../${pkgname}-${pkgver}-llvm-11.1.0.patch"
+}
+
build() {
cd "${pkgname}-${pkgver}"
cmake -C build/backends/all.cmake \
Added: faust-2.30.5-llvm-11.1.0.patch
===================================================================
--- faust-2.30.5-llvm-11.1.0.patch (rev 0)
+++ faust-2.30.5-llvm-11.1.0.patch 2021-04-16 17:09:31 UTC (rev 919521)
@@ -0,0 +1,116 @@
+diff -ruN a/compiler/generator/llvm/llvm_code_container.cpp b/compiler/generator/llvm/llvm_code_container.cpp
+--- a/compiler/generator/llvm/llvm_code_container.cpp 2021-01-12 15:20:11.000000000 +0100
++++ b/compiler/generator/llvm/llvm_code_container.cpp 2021-04-16 18:28:55.131765843 +0200
+@@ -77,7 +77,7 @@
+
+ // Set "-fast-math"
+ FastMathFlags FMF;
+-#if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_120)
++#if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_111) || defined(LLVM_120)
+ FMF.setFast(); // has replaced the following function
+ #else
+ FMF.setUnsafeAlgebra();
+diff -ruN a/compiler/generator/llvm/llvm_dsp_aux.cpp b/compiler/generator/llvm/llvm_dsp_aux.cpp
+--- a/compiler/generator/llvm/llvm_dsp_aux.cpp 2021-01-12 15:20:11.000000000 +0100
++++ b/compiler/generator/llvm/llvm_dsp_aux.cpp 2021-04-16 18:30:44.412026167 +0200
+@@ -116,7 +116,7 @@
+ {
+ if (llvm_dsp_factory_aux::gInstance++ == 0) {
+ // Install an LLVM error handler
+- #if defined(__APPLE__) && (defined(LLVM_110) || defined(LLVM_120))
++ #if defined(__APPLE__) && (defined(LLVM_110) || defined(LLVM_111) || defined(LLVM_120))
+ #warning Crash on OSX with LLVM_11 or LLVM_12, so deactivated in this case
+ #else
+ LLVMInstallFatalErrorHandler(llvm_dsp_factory_aux::LLVMFatalErrorHandler);
+diff -ruN a/compiler/generator/llvm/llvm_dynamic_dsp_aux.cpp b/compiler/generator/llvm/llvm_dynamic_dsp_aux.cpp
+--- a/compiler/generator/llvm/llvm_dynamic_dsp_aux.cpp 2021-01-12 15:20:11.000000000 +0100
++++ b/compiler/generator/llvm/llvm_dynamic_dsp_aux.cpp 2021-04-16 18:29:59.778586506 +0200
+@@ -65,7 +65,7 @@
+ #include <llvm/Bitcode/BitcodeReader.h>
+ #include <llvm/Bitcode/BitcodeWriter.h>
+
+-#if defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_120)
++#if defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_111) || defined(LLVM_120)
+ #include <llvm/InitializePasses.h>
+ #include <llvm/Support/CodeGen.h>
+ #endif
+@@ -114,7 +114,7 @@
+ string res;
+ raw_string_ostream out_str(res);
+ if (binary) {
+-#if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_120)
++#if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_111) || defined(LLVM_120)
+ WriteBitcodeToFile(*fModule, out_str);
+ #else
+ WriteBitcodeToFile(fModule, out_str);
+@@ -130,7 +130,7 @@
+ {
+ string res;
+ raw_string_ostream out(res);
+-#if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_120)
++#if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_111) || defined(LLVM_120)
+ WriteBitcodeToFile(*fModule, out);
+ #else
+ WriteBitcodeToFile(fModule, out);
+@@ -147,7 +147,7 @@
+ cerr << "ERROR : writeDSPFactoryToBitcodeFile could not open file : " << err.message();
+ return false;
+ }
+-#if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_120)
++#if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_111) || defined(LLVM_120)
+ WriteBitcodeToFile(*fModule, out);
+ #else
+ WriteBitcodeToFile(fModule, out);
+@@ -285,11 +285,11 @@
+ targetOptions.GuaranteedTailCallOpt = true;
+ targetOptions.NoTrappingFPMath = true;
+
+-#if defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_120)
++#if defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_111) || defined(LLVM_120)
+ targetOptions.NoSignedZerosFPMath = true;
+ #endif
+
+-#if defined(LLVM_110) || defined(LLVM_120)
++#if defined(LLVM_110) || defined(LLVM_111) || defined(LLVM_120)
+ targetOptions.setFPDenormalMode(DenormalMode::getIEEE());
+ #else
+ targetOptions.FPDenormalMode = FPDenormal::IEEE;
+@@ -434,7 +434,7 @@
+
+ legacy::PassManager pass;
+
+-#if defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_120)
++#if defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_111) || defined(LLVM_120)
+ if (TheTargetMachine->addPassesToEmitFile(pass, dest, nullptr, CGFT_ObjectFile)) {
+ #elif defined(LLVM_80) || defined(LLVM_90)
+ if (TheTargetMachine->addPassesToEmitFile(pass, dest, nullptr, TargetMachine::CGFT_ObjectFile)) {
+diff -ruN a/compiler/generator/llvm/llvm_instructions.hh b/compiler/generator/llvm/llvm_instructions.hh
+--- a/compiler/generator/llvm/llvm_instructions.hh 2021-01-12 15:20:11.000000000 +0100
++++ b/compiler/generator/llvm/llvm_instructions.hh 2021-04-16 18:30:28.765322226 +0200
+@@ -238,7 +238,7 @@
+
+ list<string> fMathLibTable; // All standard math functions
+
+-#if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_120)
++#if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_111) || defined(LLVM_120)
+ map<string, Intrinsic::ID> fUnaryIntrinsicTable; // LLVM unary intrinsic
+ map<string, Intrinsic::ID> fBinaryIntrinsicTable; // LLVM binary intrinsic
+ #endif
+@@ -312,7 +312,7 @@
+ fTypeMap[Typed::kObj_ptr] = dsp_ptr;
+ fAllocaBuilder = new IRBuilder<>(fModule->getContext());
+
+- #if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_120)
++ #if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_111) || defined(LLVM_120)
+
+ /* This does not work in visit(FunCallInst* inst) for intrinsic, which are deactivated for now
+ call_inst->addAttribute(AttributeList::FunctionIndex, Attribute::Builtin);
+@@ -839,7 +839,7 @@
+ fCurValue = generateFunPolymorphicMinMax(fun_args[0], fun_args[1], kLT);
+ } else if (checkMax(inst->fName) && fun_args.size() == 2) {
+ fCurValue = generateFunPolymorphicMinMax(fun_args[0], fun_args[1], kGT);
+- #if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_120)
++ #if defined(LLVM_80) || defined(LLVM_90) || defined(LLVM_100) || defined(LLVM_110) || defined(LLVM_111) || defined(LLVM_120)
+ // LLVM unary intrinsic
+ } else if (fUnaryIntrinsicTable.find(inst->fName) != fUnaryIntrinsicTable.end()) {
+
More information about the arch-commits
mailing list