From 71a3c2a2b8b7da83deb658a29fea1d322d9fac22 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 15 Sep 2018 17:12:08 +0200 Subject: [PATCH] ispc: rebuild for llvm resolves #2790 --- ...1-Remove-uses-of-LLVM-dump-functions.patch | 84 +++++++++++++++++++ srcpkgs/ispc/patches/llvm6.0_compat.patch | 13 +++ srcpkgs/ispc/template | 3 +- 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/ispc/patches/0001-Remove-uses-of-LLVM-dump-functions.patch create mode 100644 srcpkgs/ispc/patches/llvm6.0_compat.patch diff --git a/srcpkgs/ispc/patches/0001-Remove-uses-of-LLVM-dump-functions.patch b/srcpkgs/ispc/patches/0001-Remove-uses-of-LLVM-dump-functions.patch new file mode 100644 index 00000000000..064983a0198 --- /dev/null +++ b/srcpkgs/ispc/patches/0001-Remove-uses-of-LLVM-dump-functions.patch @@ -0,0 +1,84 @@ +From 758e152a4832311818ea5b2bff0ac2e438b7a88a Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Tue, 24 Oct 2017 09:45:53 -0700 +Subject: [PATCH] Remove uses of LLVM dump() functions + +These aren't exposed in release builds. +--- + llvmutil.cpp | 3 ++- + opt.cpp | 10 +++++----- + 2 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/llvmutil.cpp b/llvmutil.cpp +index 02bd729..b98b5f1 100644 +--- a/llvmutil.cpp ++++ b/llvmutil.cpp +@@ -45,6 +45,7 @@ + #include + #include + #endif ++#include + #include + #include + +@@ -1516,7 +1517,7 @@ lDumpValue(llvm::Value *v, std::set &done) { + return; + + fprintf(stderr, " "); +- v->dump(); ++ v->print(llvm::errs()); + done.insert(v); + + if (inst == NULL) +diff --git a/opt.cpp b/opt.cpp +index ef9e4c5..48106f4 100644 +--- a/opt.cpp ++++ b/opt.cpp +@@ -169,7 +169,7 @@ static llvm::Pass *CreatePromoteLocalToPrivatePass(); + strlen(getenv("FUNC"))))) { \ + fprintf(stderr, "Start of " NAME "\n"); \ + fprintf(stderr, "---------------\n"); \ +- bb.dump(); \ ++ bb.print(llvm::errs()); \ + fprintf(stderr, "---------------\n\n"); \ + } else /* eat semicolon */ + +@@ -180,7 +180,7 @@ static llvm::Pass *CreatePromoteLocalToPrivatePass(); + strlen(getenv("FUNC"))))) { \ + fprintf(stderr, "End of " NAME " %s\n", modifiedAny ? "** CHANGES **" : ""); \ + fprintf(stderr, "---------------\n"); \ +- bb.dump(); \ ++ bb.print(llvm::errs()); \ + fprintf(stderr, "---------------\n\n"); \ + } else /* eat semicolon */ + +@@ -533,7 +533,7 @@ void + Optimize(llvm::Module *module, int optLevel) { + if (g->debugPrint) { + printf("*** Code going into optimization ***\n"); +- module->dump(); ++ module->print(llvm::errs(), nullptr); + } + DebugPassManager optPM; + optPM.add(llvm::createVerifierPass(),0); +@@ -928,7 +928,7 @@ Optimize(llvm::Module *module, int optLevel) { + + if (g->debugPrint) { + printf("\n*****\nFINAL OUTPUT\n*****\n"); +- module->dump(); ++ module->print(llvm::errs(), nullptr); + } + + } +@@ -4859,7 +4859,7 @@ bool + DebugPass::runOnModule(llvm::Module &module) { + fprintf(stderr, "%s", str_output); + fflush(stderr); +- module.dump(); ++ module.print(llvm::errs(), nullptr); + return true; + } + +-- +1.8.3.1 + diff --git a/srcpkgs/ispc/patches/llvm6.0_compat.patch b/srcpkgs/ispc/patches/llvm6.0_compat.patch new file mode 100644 index 00000000000..19a8b9e10fa --- /dev/null +++ b/srcpkgs/ispc/patches/llvm6.0_compat.patch @@ -0,0 +1,13 @@ +diff -rup ispc-1.9.2/ispc.cpp ispc-1.9.2.new/ispc.cpp +--- ispc-1.9.2/ispc.cpp 2017-11-11 00:07:30.000000000 +0100 ++++ ispc-1.9.2.new/ispc.cpp 2018-03-17 20:23:01.104377910 +0100 +@@ -59,7 +59,7 @@ + #include + #include + #endif +-#if ISPC_LLVM_VERSION >= ISPC_LLVM_3_6 // LLVM 3.6+ ++#if ISPC_LLVM_VERSION >= ISPC_LLVM_3_6 && ISPC_LLVM_VERSION < ISPC_LLVM_6_0 // LLVM 3.6-6.0 + #include + #if ISPC_LLVM_VERSION >= ISPC_LLVM_3_7 // LLVM 3.7+ + #include + diff --git a/srcpkgs/ispc/template b/srcpkgs/ispc/template index ee4dceae9ff..fb22400cb31 100644 --- a/srcpkgs/ispc/template +++ b/srcpkgs/ispc/template @@ -1,7 +1,7 @@ # Template file for 'ispc' pkgname=ispc version=1.9.2 -revision=1 +revision=2 only_for_archs="i686 x86_64" build_style=gnu-makefile hostmakedepends="llvm clang python m4 bison flex" @@ -11,6 +11,7 @@ maintainer="Andrea Brancaleoni " license="BSD" homepage="https://ispc.github.io" distfiles="https://github.com/ispc/ispc/archive/v${version}.tar.gz" +patch_args="-p1" checksum=76a14e22f05a52fb0b30142686a6cb144b0415b39be6c9fcd3f17ac23447f0b2 nopie=yes