Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153218802
D22568.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D22568.diff
View Options
Index: head/lang/nim/Makefile
===================================================================
--- head/lang/nim/Makefile
+++ head/lang/nim/Makefile
@@ -16,7 +16,6 @@
BROKEN_armv6= fails to compile: crt1.c: undefined reference to main
BROKEN_armv7= fails to compile: crt1.c: undefined reference to main
BROKEN_mips64= fails to build: build.sh: clang: not found
-BROKEN_powerpc64= fails to build: build.sh: clang: not found
BROKEN_sparc64= fails to build: build.sh: clang: not found
TOOLS_DESC= Build and install nimgrep and nimsuggest
@@ -31,9 +30,15 @@
TLIST= nimgrep nimsuggest
+.if ${ARCH} == "powerpc64"
+. if defined(PPC_ABI) && ${PPC_ABI} == ELFv1
+EXTRA_PATCHES= ${PATCHDIR}/elfv1-patch-build.sh
+. endif
+.endif
+
post-patch:
-.if ${COMPILER_TYPE} == clang
- @${REINPLACE_CMD} -e '/cc =/s/gcc/clang/' ${WRKSRC}/config/nim.cfg
+.if defined(PPC_ABI) && ${PPC_ABI} == ELFv1
+ @${REINPLACE_CMD} -e '/cc =/s/clang/gcc/' ${WRKSRC}/config/nim.cfg
.endif
do-build:
Index: head/lang/nim/files/elfv1-patch-build.sh
===================================================================
--- head/lang/nim/files/elfv1-patch-build.sh
+++ head/lang/nim/files/elfv1-patch-build.sh
@@ -0,0 +1,15 @@
+--- build.sh.orig 2019-10-24 12:53:39 UTC
++++ build.sh
+@@ -84,7 +84,11 @@
+ ;;
+ *freebsd* )
+ myos="freebsd"
+- CC="clang"
++ if [ "$ucpu" = "powerpc" ] ; then
++ CC="gcc"
++ else
++ CC="clang"
++ fi
+ LINK_FLAGS="$LINK_FLAGS -lm"
+ ;;
+ *openbsd* )
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 9:20 PM (5 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31865502
Default Alt Text
D22568.diff (1 KB)
Attached To
Mode
D22568: lang/nim: fix build on powerpc64 nim now works on powerpc64. It just needs replacing clang with gcc on elfv1 PR: 241974
Attached
Detach File
Event Timeline
Log In to Comment