1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-12 07:27:57 +00:00

devel/ispc: Unbreak by patching away LLVM's dump() functions that ISPC uses but which are not included in the LLVM packages

This commit is contained in:
Yuri Victorovich 2019-03-02 06:46:29 +00:00
parent 59bc911c6b
commit 4265539b07
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=494364
4 changed files with 74 additions and 4 deletions

View File

@ -4,6 +4,7 @@
PORTNAME= ispc
DISTVERSIONPREFIX= v
DISTVERSION= 1.10.0
PORTREVISION= 1
CATEGORIES= devel
MAINTAINER= yuri@FreeBSD.org
@ -12,8 +13,6 @@ COMMENT= Intel's compiler for high-performance SIMD programming
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
BROKEN= fails to build
ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS_REASON= only available for x86 architectures

View File

@ -1,6 +1,15 @@
--- Makefile.orig 2016-07-08 11:13:52 UTC
--- Makefile.orig 2019-01-19 01:23:04 UTC
+++ Makefile
@@ -241,16 +241,16 @@ dirs:
@@ -113,7 +113,7 @@ endif
ifneq ($(NVPTX_ENABLED), 0)
LLVM_COMPONENTS+=nvptx
endif
-LLVM_LIBS=$(shell $(LLVM_CONFIG) --libs $(LLVM_COMPONENTS))
+LLVM_LIBS=$(shell $(LLVM_CONFIG) --libs $(LLVM_COMPONENTS)) -lexecinfo
CLANG=clang
CLANG_LIBS = -lclangFrontend -lclangDriver \
@@ -249,16 +249,16 @@ dirs:
@/bin/mkdir -p objs
llvm_check:

View File

@ -0,0 +1,13 @@
ISPC devs insist on using dump() functions which LLVM devs consider a debug functionality, and it isn't available in the LLVM packages.
--- src/llvmutil.cpp.orig 2019-03-02 06:20:14 UTC
+++ src/llvmutil.cpp
@@ -1550,7 +1550,7 @@ lDumpValue(llvm::Value *v, std::set<llvm
return;
fprintf(stderr, " ");
- v->dump();
+ //v->dump();
done.insert(v);
if (inst == NULL)

View File

@ -0,0 +1,49 @@
ISPC devs insist on using dump() functions which LLVM devs consider a debug functionality, and it isn't available in the LLVM packages.
--- src/opt.cpp.orig 2019-03-02 06:22:00 UTC
+++ src/opt.cpp
@@ -173,7 +173,7 @@ static llvm::Pass *CreatePromoteLocalToP
strlen(getenv("FUNC"))))) { \
fprintf(stderr, "Start of " NAME "\n"); \
fprintf(stderr, "---------------\n"); \
- bb.dump(); \
+ /*bb.dump();*/ \
fprintf(stderr, "---------------\n\n"); \
} else /* eat semicolon */
@@ -184,7 +184,7 @@ static llvm::Pass *CreatePromoteLocalToP
strlen(getenv("FUNC"))))) { \
fprintf(stderr, "End of " NAME " %s\n", modifiedAny ? "** CHANGES **" : ""); \
fprintf(stderr, "---------------\n"); \
- bb.dump(); \
+ /*bb.dump();*/ \
fprintf(stderr, "---------------\n\n"); \
} else /* eat semicolon */
@@ -537,7 +537,7 @@ void
Optimize(llvm::Module *module, int optLevel) {
if (g->debugPrint) {
printf("*** Code going into optimization ***\n");
- module->dump();
+ //module->dump();
}
DebugPassManager optPM;
optPM.add(llvm::createVerifierPass(),0);
@@ -932,7 +932,7 @@ Optimize(llvm::Module *module, int optLe
if (g->debugPrint) {
printf("\n*****\nFINAL OUTPUT\n*****\n");
- module->dump();
+ //module->dump();
}
}
@@ -4895,7 +4895,7 @@ bool
DebugPass::runOnModule(llvm::Module &module) {
fprintf(stderr, "%s", str_output);
fflush(stderr);
- module.dump();
+ //module.dump();
return true;
}