svn commit: r518529 - in head/lang/nim: . files
Piotr Kubaj
pkubaj at FreeBSD.org
Wed Nov 27 19:55:15 UTC 2019
Author: pkubaj
Date: Wed Nov 27 19:55:14 2019
New Revision: 518529
URL: https://svnweb.freebsd.org/changeset/ports/518529
Log:
lang/nim: Remove BROKEN for powerpc64
Fix build on powerpc64 elfv1 and elfv2.
PR: 241974
Submitted by: hamiltcl at verizon.net
Approved by: ports at nicandneal.net (maintainer), tcberner (mentor)
Differential Revision: https://reviews.freebsd.org/D22568
Added:
head/lang/nim/files/elfv1-patch-build.sh (contents, props changed)
Modified:
head/lang/nim/Makefile
Modified: head/lang/nim/Makefile
==============================================================================
--- head/lang/nim/Makefile Wed Nov 27 19:47:30 2019 (r518528)
+++ head/lang/nim/Makefile Wed Nov 27 19:55:14 2019 (r518529)
@@ -16,7 +16,6 @@ BROKEN_aarch64= fails to compile: crt1.c: undefined r
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 @@ USES= compiler tar:xz
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:
Added: head/lang/nim/files/elfv1-patch-build.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/nim/files/elfv1-patch-build.sh Wed Nov 27 19:55:14 2019 (r518529)
@@ -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* )
More information about the svn-ports-head
mailing list