Index: head/devel/ispc/Makefile =================================================================== --- head/devel/ispc/Makefile (revision 499814) +++ head/devel/ispc/Makefile (revision 499815) @@ -1,55 +1,44 @@ # Created by: Yuri Victorovich # $FreeBSD$ PORTNAME= ispc DISTVERSIONPREFIX= v -DISTVERSION= 1.10.0 -PORTREVISION= 2 +DISTVERSION= 1.11.0 CATEGORIES= devel MAINTAINER= yuri@FreeBSD.org COMMENT= Intel's compiler for high-performance SIMD programming LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE.txt ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= only available for x86 architectures LIB_DEPENDS= libLLVM.so:devel/llvm${LLVM_DEFAULT} -USES= bison gmake python:build shebangfix +USES= bison cmake python:build shebangfix USE_GITHUB= yes - -ALL_TARGET= default -MAKE_ENV= LLVM_HOME="${LOCALBASE}" SHEBANG_FILES= *.py -MAKE_ARGS= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT} \ - CLANG=clang${LLVM_DEFAULT} CXX=clang++${LLVM_DEFAULT} +CONFIGURE_ENV= PATH=${LOCALBASE}/llvm${LLVM_DEFAULT}/bin:${PATH} +CMAKE_OFF= ISPC_INCLUDE_EXAMPLES -PLIST_FILES= bin/ispc +BINARY_ALIAS= python=${PYTHON_CMD} -post-patch: - @${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}| ; s|@$$(C|$$(C|' \ - ${WRKSRC}/Makefile - @${REINPLACE_CMD} -e '/alloca\.h/d' ${WRKSRC}/src/util.cpp - @${REINPLACE_CMD} -e '/^LLVM_LIBS=/s|$$| -lexecinfo|' \ - ${WRKSRC}/Makefile +PLIST_FILES= bin/ispc \ + bin/check_isa -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/ispc ${STAGEDIR}${PREFIX}/bin - -do-test: +do-test: # tests are broken with python-3.6 @cd ${WRKSRC} && ISPC_HOME=${WRKSRC} ./run_tests.py run-examples: @[ -f ${LOCALBASE}/lib/libtbb.so ] || ! echo "ERROR run-examples target requires devel/tbb package installed" .for e in simple sort mandelbrot stencil @cd ${WRKSRC}/examples/${e} && \ ${ECHO} "===> Running example ${e}" && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} && \ ./${e} .endfor .include Index: head/devel/ispc/distinfo =================================================================== --- head/devel/ispc/distinfo (revision 499814) +++ head/devel/ispc/distinfo (revision 499815) @@ -1,3 +1,3 @@ -TIMESTAMP = 1548912339 -SHA256 (ispc-ispc-v1.10.0_GH0.tar.gz) = 0aa30e989f8d446b2680c9078d5c5db70634f40b9aa07db387aa35aa08dd0b81 -SIZE (ispc-ispc-v1.10.0_GH0.tar.gz) = 19358558 +TIMESTAMP = 1555776188 +SHA256 (ispc-ispc-v1.11.0_GH0.tar.gz) = f48ef6e8a1fe5ad4fca691583bf7419f4dce1596e7ed850ff99cc017f8711b2f +SIZE (ispc-ispc-v1.11.0_GH0.tar.gz) = 19369955 Index: head/devel/ispc/files/patch-Makefile =================================================================== --- head/devel/ispc/files/patch-Makefile (revision 499814) +++ head/devel/ispc/files/patch-Makefile (nonexistent) @@ -1,31 +0,0 @@ ---- Makefile.orig 2019-01-19 01:23:04 UTC -+++ Makefile -@@ -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: -- @llvm-config --version > /dev/null || \ -+ @$(LLVM_CONFIG) --version > /dev/null || \ - (echo; \ - echo "******************************************"; \ -- echo "ERROR: llvm-config not found in your PATH"; \ -+ echo "ERROR: $(LLVM_CONFIG) not found in your PATH"; \ - echo "******************************************"; \ - echo; exit 1) - @echo -e '$(subst $(newline), ,$(RIGHT_LLVM))' - - print_llvm_src: llvm_check -- @echo Using LLVM `llvm-config --version` from `llvm-config --libdir` -+ @echo Using LLVM `$(LLVM_CONFIG) --version` from `$(LLVM_CONFIG) --libdir` - @echo Using compiler to build: `$(CXX) --version | head -1` - - clean: Property changes on: head/devel/ispc/files/patch-Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/ispc/files/patch-examples_common.mk =================================================================== --- head/devel/ispc/files/patch-examples_common.mk (revision 499814) +++ head/devel/ispc/files/patch-examples_common.mk (nonexistent) @@ -1,39 +0,0 @@ ---- examples/common.mk.orig 2016-07-08 11:13:52 UTC -+++ examples/common.mk -@@ -4,18 +4,18 @@ TASK_LIB=-lpthread - TASK_OBJ=objs/tasksys.o - - CXX=clang++ --CXXFLAGS+=-Iobjs/ -O2 -+CXXFLAGS+=-Iobjs/ -O2 -std=c++11 -I$(LOCALBASE)/include - CC=clang - CCFLAGS+=-Iobjs/ -O2 - --LIBS=-lm $(TASK_LIB) -lstdc++ -+LIBS=-lm $(TASK_LIB) -lstdc++ -L$(LOCALBASE)/lib -ltbb - ISPC=ispc - ISPC_FLAGS+=-O2 - ISPC_HEADER=objs/$(ISPC_SRC:.ispc=_ispc.h) - --ARCH:=$(shell uname -m | sed -e s/x86_64/x86/ -e s/i686/x86/ -e s/arm.*/arm/ -e s/sa110/arm/) -+_ARCH:=$(shell uname -m | sed -e s/amd64/x86/ -e s/i.86/x86/ -e s/arm.*/arm/ -e s/sa110/arm/) - --ifeq ($(ARCH),x86) -+ifeq ($(_ARCH),x86) - ISPC_OBJS=$(addprefix objs/, $(ISPC_SRC:.ispc=)_ispc.o) - COMMA=, - ifneq (,$(findstring $(COMMA),$(ISPC_IA_TARGETS))) -@@ -53,11 +53,11 @@ ifeq ($(ARCH),x86) - CXXFLAGS += -m64 - CCFLAGS += -m64 - endif --else ifeq ($(ARCH),arm) -+else ifeq ($(_ARCH),arm) - ISPC_OBJS=$(addprefix objs/, $(ISPC_SRC:.ispc=_ispc.o)) - ISPC_TARGETS=$(ISPC_ARM_TARGETS) - else -- $(error Unknown architecture $(ARCH) from uname -m) -+ $(error Unknown architecture $(_ARCH) from uname -m) - endif - - CPP_OBJS=$(addprefix objs/, $(CPP_SRC:.cpp=.o)) Property changes on: head/devel/ispc/files/patch-examples_common.mk ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/ispc/files/patch-examples_tasksys.cpp =================================================================== --- head/devel/ispc/files/patch-examples_tasksys.cpp (revision 499814) +++ head/devel/ispc/files/patch-examples_tasksys.cpp (revision 499815) @@ -1,11 +1,20 @@ ---- examples/tasksys.cpp.orig 2016-07-08 11:13:52 UTC +--- examples/tasksys.cpp.orig 2019-04-20 16:09:47 UTC +++ examples/tasksys.cpp -@@ -90,6 +90,8 @@ - #define ISPC_USE_CONCRT - #elif defined(__linux__) - #define ISPC_USE_PTHREADS -+ #elif defined(__FreeBSD__) -+ #define ISPC_USE_TBB_TASK_GROUP // ISPC_USE_PTHREADS fails for some reason, need to investigate - #elif defined(__APPLE__) - #define ISPC_USE_GCD - #endif +@@ -88,6 +88,8 @@ + #define ISPC_USE_CONCRT + #elif defined(__linux__) + #define ISPC_USE_PTHREADS ++#elif defined(__FreeBSD__) ++#define ISPC_USE_TBB_TASK_GROUP // ISPC_USE_PTHREADS fails for some reason, need to investigate + #elif defined(__APPLE__) + #define ISPC_USE_GCD + #endif +@@ -101,6 +103,8 @@ + #define ISPC_IS_WINDOWS + #elif defined(__linux__) + #define ISPC_IS_LINUX ++#elif defined(__FreeBSD__) ++#define ISPC_IS_FREEBSD + #elif defined(__APPLE__) + #define ISPC_IS_APPLE + #endif Index: head/devel/ispc/files/patch-src_ispc.h =================================================================== --- head/devel/ispc/files/patch-src_ispc.h (nonexistent) +++ head/devel/ispc/files/patch-src_ispc.h (revision 499815) @@ -0,0 +1,11 @@ +--- src/ispc.h.orig 2019-04-20 16:38:55 UTC ++++ src/ispc.h +@@ -48,6 +48,8 @@ + #define ISPC_IS_WINDOWS + #elif defined(__linux__) + #define ISPC_IS_LINUX ++#elif defined(__FreeBSD__) ++#define ISPC_IS_FREEBSD + #elif defined(__APPLE__) + #define ISPC_IS_APPLE + #endif Property changes on: head/devel/ispc/files/patch-src_ispc.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/ispc/files/patch-src_llvmutil.cpp =================================================================== --- head/devel/ispc/files/patch-src_llvmutil.cpp (revision 499814) +++ head/devel/ispc/files/patch-src_llvmutil.cpp (revision 499815) @@ -1,13 +1,14 @@ 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.orig 2019-04-20 16:08:37 UTC +++ src/llvmutil.cpp -@@ -1550,7 +1550,7 @@ lDumpValue(llvm::Value *v, std::setdump(); + //v->dump(); done.insert(v); if (inst == NULL) Index: head/devel/ispc/files/patch-src_opt.cpp =================================================================== --- head/devel/ispc/files/patch-src_opt.cpp (revision 499814) +++ head/devel/ispc/files/patch-src_opt.cpp (revision 499815) @@ -1,49 +1,65 @@ 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.orig 2019-04-20 16:07:05 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"); \ +@@ -175,7 +175,7 @@ static llvm::Pass *CreatePromoteLocalToP + getenv("FUNC"), 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"); \ +@@ -185,7 +185,7 @@ static llvm::Pass *CreatePromoteLocalToP + getenv("FUNC"), 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) { + #else +@@ -505,7 +505,7 @@ void Optimize(llvm::Module *module, int + #ifndef ISPC_NO_DUMPS if (g->debugPrint) { printf("*** Code going into optimization ***\n"); - module->dump(); + //module->dump(); } + #endif DebugPassManager optPM; - optPM.add(llvm::createVerifierPass(),0); -@@ -932,7 +932,7 @@ Optimize(llvm::Module *module, int optLe - +@@ -892,7 +892,7 @@ void Optimize(llvm::Module *module, int + #ifndef ISPC_NO_DUMPS if (g->debugPrint) { printf("\n*****\nFINAL OUTPUT\n*****\n"); - module->dump(); + //module->dump(); } - + #endif } -@@ -4895,7 +4895,7 @@ bool - DebugPass::runOnModule(llvm::Module &module) { +@@ -1944,11 +1944,11 @@ lExtractUniformsFromOffset(llvm::Value * + llvm::Value *offsetScale, + llvm::Instruction *insertBefore) { + #if 1 +- (*basePtr)->dump(); ++ //(*basePtr)->dump(); + printf("\n"); +- (*offsetVector)->dump(); ++ //(*offsetVector)->dump(); + printf("\n"); +- offsetScale->dump(); ++ //offsetScale->dump(); + printf("-----\n"); + #endif + +@@ -4394,7 +4394,7 @@ char DebugPass::ID = 0; + bool DebugPass::runOnModule(llvm::Module &module) { fprintf(stderr, "%s", str_output); fflush(stderr); - module.dump(); + //module.dump(); return true; } Index: head/devel/ispc/files/patch-src_util.cpp =================================================================== --- head/devel/ispc/files/patch-src_util.cpp (nonexistent) +++ head/devel/ispc/files/patch-src_util.cpp (revision 499815) @@ -0,0 +1,12 @@ +--- src/util.cpp.orig 2019-04-20 16:26:13 UTC ++++ src/util.cpp +@@ -43,7 +43,9 @@ + #include // for alloca() + #endif + #else ++#if !defined(ISPC_IS_FREEBSD) + #include ++#endif + #include + #endif + #include Property changes on: head/devel/ispc/files/patch-src_util.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property