svn commit: r431857 - in head/devel: . ispc ispc/files
Alexey Dokuchaev
danfe at FreeBSD.org
Thu Jan 19 11:37:46 UTC 2017
Author: danfe
Date: Thu Jan 19 11:37:44 2017
New Revision: 431857
URL: https://svnweb.freebsd.org/changeset/ports/431857
Log:
Add a port of Intel's compiler for high-performance SIMD programming.
Because GitHub releases (tarballs) are not fetched with correct modification
time, set TIMESTAMP to 1467976432 which corresponds to commit 87d0c9a tagged
as this release.
PR: 214543
Submitted by: Yuri Victorovich
Added:
head/devel/ispc/
head/devel/ispc/Makefile (contents, props changed)
head/devel/ispc/distinfo (contents, props changed)
head/devel/ispc/files/
head/devel/ispc/files/patch-Makefile (contents, props changed)
head/devel/ispc/files/patch-examples_common.mk (contents, props changed)
head/devel/ispc/files/patch-examples_tasksys.cpp (contents, props changed)
head/devel/ispc/pkg-descr (contents, props changed)
Modified:
head/devel/Makefile
Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile Thu Jan 19 11:20:21 2017 (r431856)
+++ head/devel/Makefile Thu Jan 19 11:37:44 2017 (r431857)
@@ -1105,6 +1105,7 @@
SUBDIR += ipython
SUBDIR += ireport
SUBDIR += isl
+ SUBDIR += ispc
SUBDIR += it-eric6
SUBDIR += itext
SUBDIR += ivykis
Added: head/devel/ispc/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/ispc/Makefile Thu Jan 19 11:37:44 2017 (r431857)
@@ -0,0 +1,50 @@
+# Created by: Yuri Victorovich <yuri at rawbw.com>
+# $FreeBSD$
+
+PORTNAME= ispc
+PORTVERSION= 1.9.1
+DISTVERSIONPREFIX= v
+CATEGORIES= devel
+
+MAINTAINER= yuri at rawbw.com
+COMMENT= Intel's compiler for high-performance SIMD programming
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+BUILD_DEPENDS= clang${CLANG_VERSION}:lang/clang${CLANG_VERSION}
+
+USE_GITHUB= yes
+
+USES= bison gmake python:build shebangfix
+ALL_TARGET= default
+MAKE_ENV= LLVM_HOME="${LOCALBASE}"
+CLANG_VERSION= 38
+SHEBANG_FILES= *.py
+
+MAKE_ARGS= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${CLANG_VERSION} \
+ CLANG=clang${CLANG_VERSION} CXX=clang++${CLANG_VERSION}
+
+PLIST_FILES= bin/ispc
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}| ; s|@$$(C|$$(C|' \
+ ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e '/alloca\.h/d' ${WRKSRC}/util.cpp
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/ispc ${STAGEDIR}${PREFIX}/bin
+
+do-test:
+ @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 <bsd.port.mk>
Added: head/devel/ispc/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/ispc/distinfo Thu Jan 19 11:37:44 2017 (r431857)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1467976432
+SHA256 (ispc-ispc-v1.9.1_GH0.tar.gz) = c52910a007f1b0c732dd1cb981e7c22f3b9b575f0b097a49f4e43fc7a3e7e976
+SIZE (ispc-ispc-v1.9.1_GH0.tar.gz) = 19276043
Added: head/devel/ispc/files/patch-Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/ispc/files/patch-Makefile Thu Jan 19 11:37:44 2017 (r431857)
@@ -0,0 +1,22 @@
+--- Makefile.orig 2016-07-08 11:13:52 UTC
++++ Makefile
+@@ -241,16 +241,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:
Added: head/devel/ispc/files/patch-examples_common.mk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/ispc/files/patch-examples_common.mk Thu Jan 19 11:37:44 2017 (r431857)
@@ -0,0 +1,39 @@
+--- 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))
Added: head/devel/ispc/files/patch-examples_tasksys.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/ispc/files/patch-examples_tasksys.cpp Thu Jan 19 11:37:44 2017 (r431857)
@@ -0,0 +1,11 @@
+--- examples/tasksys.cpp.orig 2016-07-08 11:13:52 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
Added: head/devel/ispc/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/ispc/pkg-descr Thu Jan 19 11:37:44 2017 (r431857)
@@ -0,0 +1,7 @@
+ispc is a compiler for a variant of the C programming language, with
+extensions for single program, multiple data programming. Under the SPMD
+model, the programmer writes a program that generally appears to be a
+regular serial program, though the execution model is actually that a
+number of program instances execute in parallel on the hardware.
+
+WWW: https://ispc.github.io/
More information about the svn-ports-all
mailing list