View | Details | Raw Unified | Return to bug 241974 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-4 lines)
Lines 16-22 Link Here
16
BROKEN_armv6=		fails to compile: crt1.c: undefined reference to main
16
BROKEN_armv6=		fails to compile: crt1.c: undefined reference to main
17
BROKEN_armv7=		fails to compile: crt1.c: undefined reference to main
17
BROKEN_armv7=		fails to compile: crt1.c: undefined reference to main
18
BROKEN_mips64=		fails to build: build.sh: clang: not found
18
BROKEN_mips64=		fails to build: build.sh: clang: not found
19
BROKEN_powerpc64=	fails to build: build.sh: clang: not found
20
BROKEN_sparc64=		fails to build: build.sh: clang: not found
19
BROKEN_sparc64=		fails to build: build.sh: clang: not found
21
20
22
TOOLS_DESC=	Build and install nimgrep and nimsuggest
21
TOOLS_DESC=	Build and install nimgrep and nimsuggest
Lines 32-40 Link Here
32
TLIST=	nimgrep nimsuggest
31
TLIST=	nimgrep nimsuggest
33
32
34
post-patch:
33
post-patch:
35
.if ${COMPILER_TYPE} == clang
36
	@${REINPLACE_CMD} -e '/cc =/s/gcc/clang/' ${WRKSRC}/config/nim.cfg
37
.endif
38
34
39
do-build:
35
do-build:
40
	cd ${WRKSRC} && ${SETENV} CC="${CC}" LINKER="${CC}" \
36
	cd ${WRKSRC} && ${SETENV} CC="${CC}" LINKER="${CC}" \
(-)files/patch-build.sh (+15 lines)
Line 0 Link Here
1
--- build.sh.orig	2019-10-24 12:53:39 UTC
2
+++ build.sh
3
@@ -84,7 +84,11 @@
4
     ;;
5
   *freebsd* )
6
     myos="freebsd"
7
-    CC="clang"
8
+    if [ "$ucpu" = "powerpc" ] ; then
9
+      CC="gcc"
10
+	else
11
+      CC="clang"
12
+    fi
13
     LINK_FLAGS="$LINK_FLAGS -lm"
14
     ;;
15
   *openbsd* )
(-)files/patch-config-nim.cfg (-4 / +21 lines)
Lines 1-15 Link Here
1
--- config/nim.cfg.orig	2019-07-22 09:41:23 UTC
1
--- config/nim.cfg.orig	2019-07-22 09:41:23 UTC
2
+++ config/nim.cfg
2
+++ config/nim.cfg
3
@@ -8,7 +8,7 @@
3
@@ -8,7 +8,11 @@
4
 # Environment variables can be accessed like so:
4
 # Environment variables can be accessed like so:
5
 #  gcc.path %= "$CC_PATH"
5
 #  gcc.path %= "$CC_PATH"
6
 
6
 
7
-cc = gcc
7
-cc = gcc
8
+cc = clang
8
+@if powerpc64:
9
+  cc = gcc
10
+@else:
11
+  cc = clang
12
+@end
9
 
13
 
10
 # additional options always passed to the compiler:
14
 # additional options always passed to the compiler:
11
 --parallel_build: "0" # 0 to auto-detect number of processors
15
 --parallel_build: "0" # 0 to auto-detect number of processors
12
@@ -105,12 +105,6 @@ path="$lib/pure"
16
@@ -105,12 +109,6 @@
13
     clang.cpp.options.linker = "-ldl"
17
     clang.cpp.options.linker = "-ldl"
14
     tcc.options.linker = "-ldl"
18
     tcc.options.linker = "-ldl"
15
   @end
19
   @end
Lines 22-28 Link Here
22
   @if haiku:
26
   @if haiku:
23
     gcc.options.linker = "-Wl,--as-needed -lnetwork"
27
     gcc.options.linker = "-Wl,--as-needed -lnetwork"
24
     gcc.cpp.options.linker = "-Wl,--as-needed -lnetwork"
28
     gcc.cpp.options.linker = "-Wl,--as-needed -lnetwork"
25
@@ -132,7 +126,7 @@ path="$lib/pure"
29
@@ -132,7 +130,7 @@
26
 @end
30
 @end
27
 
31
 
28
 @if nintendoswitch:
32
 @if nintendoswitch:
Lines 31-33 Link Here
31
   switch_gcc.options.linker = "-g -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE"
35
   switch_gcc.options.linker = "-g -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE"
32
   switch_gcc.cpp.options.linker = "-g -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE"
36
   switch_gcc.cpp.options.linker = "-g -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE"
33
   switch_gcc.options.always = "-g -Wall -O2 -ffunction-sections -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -D__SWITCH__"
37
   switch_gcc.options.always = "-g -Wall -O2 -ffunction-sections -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -D__SWITCH__"
38
@@ -154,7 +152,11 @@
39
 @end
40
 
41
 @if macosx or freebsd:
42
-  cc = clang
43
+  @if powerpc64:
44
+    cc = gcc
45
+  @else:
46
+    cc = clang
47
+  @end
48
   tlsEmulation:on
49
   gcc.options.always = "-w"
50
   gcc.cpp.options.always = "-w -fpermissive"

Return to bug 241974