mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
lang/nim: fix build on powerpc64 elfv1
Now newer GCC is required.
This commit is contained in:
parent
afd61a07c0
commit
9ad316662e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=548743
@ -1,4 +1,4 @@
|
||||
# Created by: Neal Nelson <ports@nicandneal.net>
|
||||
Created by: Neal Nelson <ports@nicandneal.net>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= nim
|
||||
@ -18,7 +18,7 @@ BROKEN_sparc64= fails to build: build.sh: clang: not found
|
||||
|
||||
TEST_DEPENDS= node>=0:www/node
|
||||
|
||||
USES= compiler tar:xz
|
||||
USES= compiler:c11 tar:xz
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
TOOLS_DESC= Build and install nim tools
|
||||
@ -36,15 +36,17 @@ MAKE_JOBS_UNSAFE= yes
|
||||
|
||||
TLIST= nimfind nimgrep nimpretty nimsuggest testament
|
||||
|
||||
.if ${ARCH} == "powerpc64"
|
||||
. if defined(PPC_ABI) && ${PPC_ABI} == ELFv1
|
||||
.if ${CHOSEN_COMPILER_TYPE} == "gcc"
|
||||
EXTRA_PATCHES= ${PATCHDIR}/elfv1-patch-build.sh
|
||||
. endif
|
||||
.else
|
||||
EXTRA_PATCHES= ${PATCHDIR}/clang-patch-build.sh
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
.if defined(PPC_ABI) && ${PPC_ABI} == ELFv1
|
||||
@${REINPLACE_CMD} -e '/cc =/s/clang/gcc/' ${WRKSRC}/config/nim.cfg
|
||||
@${REINPLACE_CMD} -e s/%%GCC_DEFAULT%%/${GCC_DEFAULT}/ \
|
||||
${WRKSRC}/build.sh ${WRKSRC}/config/nim.cfg
|
||||
.endif
|
||||
|
||||
do-build:
|
||||
|
11
lang/nim/files/clang-patch-build.sh
Normal file
11
lang/nim/files/clang-patch-build.sh
Normal file
@ -0,0 +1,11 @@
|
||||
--- config/nim.cfg.orig 2020-04-03 17:22:53 UTC
|
||||
+++ config/nim.cfg
|
||||
@@ -8,7 +8,7 @@
|
||||
# Environment variables can be accessed like so:
|
||||
# gcc.path %= "$CC_PATH"
|
||||
|
||||
-cc = gcc
|
||||
+cc = clang
|
||||
|
||||
# additional options always passed to the compiler:
|
||||
--parallel_build: "0" # 0 to auto-detect number of processors
|
@ -6,10 +6,20 @@
|
||||
myos="freebsd"
|
||||
- CC="clang"
|
||||
+ if [ "$ucpu" = "powerpc" ] ; then
|
||||
+ CC="gcc"
|
||||
+ CC="gcc%%GCC_DEFAULT%%"
|
||||
+ else
|
||||
+ CC="clang"
|
||||
+ fi
|
||||
LINK_FLAGS="$LINK_FLAGS -lm"
|
||||
;;
|
||||
*openbsd* )
|
||||
--- config/nim.cfg.orig 2020-09-15 13:59:31 UTC
|
||||
+++ config/nim.cfg
|
||||
@@ -9,6 +9,7 @@
|
||||
# gcc.path %= "$CC_PATH"
|
||||
|
||||
cc = gcc
|
||||
+gcc.exe = "gcc%%GCC_DEFAULT%%"
|
||||
|
||||
# additional options always passed to the compiler:
|
||||
--parallel_build: "0" # 0 to auto-detect number of processors
|
||||
|
@ -1,15 +1,6 @@
|
||||
--- config/nim.cfg.orig 2020-04-03 17:22:53 UTC
|
||||
--- config/nim.cfg.orig 2020-09-15 13:59:31 UTC
|
||||
+++ config/nim.cfg
|
||||
@@ -8,7 +8,7 @@
|
||||
# Environment variables can be accessed like so:
|
||||
# gcc.path %= "$CC_PATH"
|
||||
|
||||
-cc = gcc
|
||||
+cc = clang
|
||||
|
||||
# additional options always passed to the compiler:
|
||||
--parallel_build: "0" # 0 to auto-detect number of processors
|
||||
@@ -118,12 +118,6 @@ path="$lib/pure"
|
||||
@@ -118,12 +119,6 @@ path="$lib/pure"
|
||||
clang.options.linker = "-ldl"
|
||||
clang.cpp.options.linker = "-ldl"
|
||||
tcc.options.linker = "-ldl"
|
||||
|
Loading…
Reference in New Issue
Block a user