mirror of
https://git.freebsd.org/ports.git
synced 2025-04-29 01:56:37 -04:00
While here, patch this port's build scripts to actually build the opencl NIF (Native Implemented Function) - the build system didn't know about FreeBSD and failed when building cl_nif.so, but the error went unnoticed. Without this object, erlang-cl cannot load any CL function (in our case, we want to use libOpenCL), which rather defeats the purpose of this port. Once we build and install cl_nif.so, we have to depend on devel/ocl-icd to pull in libOpenCL. PR: 239178 Approved by: maintainer-timeout (erlang@)
16 lines
344 B
Text
16 lines
344 B
Text
--- c_src/Makefile.orig 2018-09-26 08:28:15 UTC
|
|
+++ c_src/Makefile
|
|
@@ -59,6 +59,13 @@ LD_SHARED := $(CC) -shared
|
|
LDFLAGS += -lOpenCL
|
|
endif
|
|
|
|
+ifeq ($(OSNAME), FreeBSD)
|
|
+LINUX = Yes
|
|
+CFLAGS += -O3 -fPIC
|
|
+LD_SHARED := $(CC) -shared
|
|
+LDFLAGS += -lOpenCL
|
|
+endif
|
|
+
|
|
ifeq ($(OSNAME), Darwin)
|
|
MAC_OS_X = Yes
|
|
ifeq ($(WORDSIZE), 32)
|