[arch-commits] Commit in faust/trunk (4 files)

David Runge dvzrv at archlinux.org
Sat May 29 22:13:52 UTC 2021


    Date: Saturday, May 29, 2021 @ 22:13:51
  Author: dvzrv
Revision: 950282

upgpkg: faust 2.30.5-3: Rebuild against llvm >= 12.0.0.

Add backported patches for missing include and llvm >= 12.
Add patch to ignore llvm patch level releases when considering llvm versions.

Added:
  faust/trunk/faust-2.30.5-llvm12.patch
  faust/trunk/faust-2.30.5-missing_include.patch
Modified:
  faust/trunk/PKGBUILD
Deleted:
  faust/trunk/faust-2.30.5-llvm-11.1.0.patch

------------------------------------+
 PKGBUILD                           |   23 +++++-
 faust-2.30.5-llvm-11.1.0.patch     |  116 -----------------------------------
 faust-2.30.5-llvm12.patch          |   27 ++++++++
 faust-2.30.5-missing_include.patch |   11 +++
 4 files changed, 55 insertions(+), 122 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-05-29 21:43:51 UTC (rev 950281)
+++ PKGBUILD	2021-05-29 22:13:51 UTC (rev 950282)
@@ -5,7 +5,7 @@
 
 pkgname=faust
 pkgver=2.30.5
-pkgrel=2
+pkgrel=3
 pkgdesc="A functional programming language for realtime audio signal processing."
 arch=('x86_64')
 url="https://faust.grame.fr/"
@@ -35,17 +35,28 @@
 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"
-        "${pkgname}-${pkgver}-llvm-11.1.0.patch")
+        "${pkgname}-2.30.5-llvm_patch_level.patch::https://github.com/grame-cncm/faust/commit/5fbe04232cfcf28b3aa6e64a6dd4d9347f3735a8.patch"
+        "${pkgname}-2.30.5-missing_include.patch"
+        "${pkgname}-2.30.5-llvm12.patch")
 sha512sums=('33271a39a465d257d7ccac529d1dac822940d72a1f19dcbbacce5d4d2b9ab5d367e6be001fab6bfd944a1480a2429b054a07d424916419117389154cbcd4d1ef'
-            'ffffdc78b0818973fbc9514806529fdff005fb25dc691896afc883dcfe5c2c40995d11ae6e5e1b1e837d0d7ac9875b266b0eab1fc23367ad8a87ed93ac460dab')
+            '71a891f4bc95f72744ffbccbb48eb8cd0d440933810ed6180336a2679beb55364dace63dbe5e4ed3f70cd292320667a98f5669c4a250d87c949e37012d05077b'
+            'd0a501a084ae57d226238c81293588242c04a3675c16de957e2f56609ac570ecdf613f1cdeae5687bd0e535bc4d495638b70b8f3fd13d8582e7f107c28e8431a'
+            'af75f018bf7288704269cfee8e888abdf07b6ad49357c1dd0ef00f5c86778faa56c2a2361fcd83a515a6629773e9566ef07c1aece23d363faa1d2fc8adc01d7e')
 b2sums=('116a6aba81c5b170528e08de2bf23f2f52800dea72a4beb550ff9796a71be7a7ce4415911ec54b7bf32d2eb8227d9193bc37e17750fa596d73a1022a3be2396e'
-        '6b303d8d689953281adf17805c9dde517b41f41beda3bc0424ed3421b448db725a8eb95a6d9fa5ee23d244e32de4f5a6a6cb0c86d589fb43f8b7c7274adf27bc')
+        '3028a3bbbefcff40066156e9f6a2382596a0a9c623dda4237153480eacafdd67d480d9fb06d9dab8ab95f2f031d996538a3e8cdbf805c95269b94d56b1b8a41e'
+        'ba4d34661ed959b42495e6ef781544b00c6b5b3901db04e6550f5a66c4e94d34ce468742d8eeb2d900c2640145227e673022a010bf739262fdbef3fd2a0965fb'
+        'bccc62096bff05bf42840ffbf98b7cfc6f5ffe8dc809d0656fd7c209f0fe059c0d765bcb765b0c61293d899b7279d748fee0673cbb845b83ba8b9985cebea761')
 
 prepare() {
   cd "${pkgname}-${pkgver}"
-  # extend explicit LLVM version checks:
+  # make checks against llvm more generic
   # https://github.com/grame-cncm/faust/issues/573
-  patch -Np1 -i "../${pkgname}-${pkgver}-llvm-11.1.0.patch"
+  patch -Np1 -i "../${pkgname}-2.30.5-llvm_patch_level.patch"
+  # fix missing include
+  # https://github.com/grame-cncm/faust/issues/586
+  patch -Np1 -i "../${pkgname}-2.30.5-missing_include.patch"
+  # fix build against llvm12
+  patch -Np1 -i "../${pkgname}-2.30.5-llvm12.patch"
 }
 
 build() {

Deleted: faust-2.30.5-llvm-11.1.0.patch
===================================================================
--- faust-2.30.5-llvm-11.1.0.patch	2021-05-29 21:43:51 UTC (rev 950281)
+++ faust-2.30.5-llvm-11.1.0.patch	2021-05-29 22:13:51 UTC (rev 950282)
@@ -1,116 +0,0 @@
-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()) {
-             

Added: faust-2.30.5-llvm12.patch
===================================================================
--- faust-2.30.5-llvm12.patch	                        (rev 0)
+++ faust-2.30.5-llvm12.patch	2021-05-29 22:13:51 UTC (rev 950282)
@@ -0,0 +1,27 @@
+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-05-29 23:40:20.532368506 +0200
+@@ -170,7 +170,11 @@
+     LLVMType getStructType(const string& name, const LLVMVecTypes& types)
+     {
+         // We want to have a unique creation for struct types, so check if the given type has already been created
++    #if defined(LLVM_120) || defined(LLVM_130)
++        StructType* struct_type = StructType::getTypeByName(fModule->getContext(), name);
++    #else
+         StructType* struct_type = fModule->getTypeByName(name);
++    #endif
+         if (!struct_type) {
+             struct_type = StructType::create(fModule->getContext(), name);
+             // Create "packed" struct type to match the size of C++ "packed" defined ones
+@@ -191,7 +195,11 @@
+         if (basic_typed) {
+             return fTypeMap[basic_typed->fType];
+         } else if (named_typed) {
++        #if defined(LLVM_120) || defined(LLVM_130)
++            LLVMType type = StructType::getTypeByName(fModule->getContext(), "struct.dsp" + named_typed->fName);
++        #else
+             LLVMType type = fModule->getTypeByName("struct.dsp" + named_typed->fName);
++        #endif
+             // Subcontainer type (RWTable...)
+             return (type) ? getTyPtr(type) : convertFIRType(named_typed->fType);
+         } else if (array_typed) {

Added: faust-2.30.5-missing_include.patch
===================================================================
--- faust-2.30.5-missing_include.patch	                        (rev 0)
+++ faust-2.30.5-missing_include.patch	2021-05-29 22:13:51 UTC (rev 950282)
@@ -0,0 +1,11 @@
+diff -ruN a/architecture/faust/gui/JSONUI.h b/architecture/faust/gui/JSONUI.h
+--- a/architecture/faust/gui/JSONUI.h	2021-01-12 15:20:11.000000000 +0100
++++ b/architecture/faust/gui/JSONUI.h	2021-05-29 17:24:52.786615823 +0200
+@@ -26,6 +26,7 @@
+ #define FAUST_JSONUI_H
+ 
+ #include <vector>
++#include <limits>
+ #include <map>
+ #include <string>
+ #include <iostream>



More information about the arch-commits mailing list