File: non-linux.patch

package info (click to toggle)
erlang-cl 1.2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 704 kB
  • sloc: ansic: 6,712; erlang: 3,637; lisp: 490; makefile: 191
file content (62 lines) | stat: -rw-r--r-- 1,587 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
--- a/c_src/Makefile
+++ b/c_src/Makefile
@@ -25,7 +25,7 @@
 MAC_OS_X  = No
 WIN32_GCC = No
 WIN32_CL  = No
-LINUX     = No
+GNU       = No
 
 
 ERL       = erl
@@ -46,14 +46,23 @@
 WORDSIZE = $(shell $(ERL) -noshell -eval "io:format([126,119,126,110],[erlang:system_info(wordsize)*8])" -s erlang halt)
 
 ifeq ($(OSNAME)$(WSLcross), Linux)
-LINUX = Yes
+GNU = Yes
+endif
+ifeq ($(OSNAME), GNU/kFreeBSD)
+GNU = Yes
+endif
+ifeq ($(OSNAME), GNU/Hurd)
+GNU = Yes
+endif
+
+ifeq ($(GNU), Yes)
 CFLAGS += -I/usr/include/nvidia-current
 CFLAGS += -I/opt/AMDAPP/include
 ifeq ($(WORDSIZE), 32)
-CFLAGS += -O3 -fPIC -m32
+CFLAGS += -O3 -fPIC
 endif
 ifeq ($(WORDSIZE), 64)
-CFLAGS += -O3 -fPIC -m64
+CFLAGS += -O3 -fPIC
 endif
 LD_SHARED	:= $(CC) -shared
 LDFLAGS	        += -lOpenCL
--- a/rebar.config
+++ b/rebar.config
@@ -6,8 +6,8 @@
 {provider_hooks, [{post, [{ct, edoc}, {ct, dialyzer}]}]}.
 
 {pre_hooks,
- [{"(linux|darwin|solaris|win32)", compile, "make -C c_src"},
-  {"(freebsd)", compile, "gmake -C c_src"}
+ [{"(gnu|linux|darwin|solaris|win32)", compile, "make -C c_src"},
+  {"(freebsd(?!-gnu))", compile, "gmake -C c_src"}
  ]}.
 
 %% Assumes bash (even on windows)
@@ -22,8 +22,8 @@
   {"", clean, "rm -rf logs"},
   {"", clean, "rm -rf doc/*.html"},
   {"", clean, "rm -rf ebin/*"},
-  {"(linux|darwin|solaris|win32)", clean, "make -C c_src clean"},
-  {"(freebsd)", clean, "gmake -C c_src clean"}
+  {"(gnu|linux|darwin|solaris|win32)", clean, "make -C c_src clean"},
+  {"(freebsd(?!-gnu))", clean, "gmake -C c_src clean"}
  ]}.
 
 %% Make old-rebar avoid building cl_drv.so