svn commit: r504395 - head/math/openlibm

Piotr Kubaj pkubaj at FreeBSD.org
Mon Jun 17 07:17:11 UTC 2019


Author: pkubaj
Date: Mon Jun 17 07:17:10 2019
New Revision: 504395
URL: https://svnweb.freebsd.org/changeset/ports/504395

Log:
  math/openlibm: fix build with GCC-based architectures
  
  The port needs to respect CC and use a new compiler.
  
  PR:		238613
  Approved by:	iblis at hs.ntnu.edu.tw (maintainer), mat (mentor)
  Differential Revision:	https://reviews.freebsd.org/D20670

Modified:
  head/math/openlibm/Makefile

Modified: head/math/openlibm/Makefile
==============================================================================
--- head/math/openlibm/Makefile	Mon Jun 17 06:44:24 2019	(r504394)
+++ head/math/openlibm/Makefile	Mon Jun 17 07:17:10 2019	(r504395)
@@ -17,9 +17,8 @@ BROKEN_armv6=		fails to compile: a parameter list with
 BROKEN_armv7=		fails to compile: a parameter list without types is only allowed in a function definition
 BROKEN_mips=		fails to compile: No rule to make target mips/Make.files
 BROKEN_mips64=		fails to compile: No rule to make target mips64/Make.files
-BROKEN_powerpc64=	fails to build: gmake: clang: Command not found
 
-USES=	gmake
+USES=	compiler:c11 gmake
 USE_GITHUB=	yes
 GH_ACCOUNT=	JuliaMath
 GH_PROJECT=	openlibm
@@ -28,8 +27,16 @@ USE_LDCONFIG=	yes
 
 .include <bsd.port.pre.mk>
 
-MAKE_ENV+=	prefix=${PREFIX}
+MAKE_ENV+=	prefix=${PREFIX} ${MAKE_ENV_${CHOSEN_COMPILER_TYPE}}
+MAKE_ENV_gcc=	USEGCC=1 USECLANG=0
+MAKE_ENV_clang=	USEGCC=0 USECLANG=1
 
 TEST_TARGET=	check
 
+post-patch:
+	${REINPLACE_CMD} -e 's/USEGCC =/USEGCC ?=/g' \
+		-e 's/USECLANG =/USECLANG ?=/g' \
+		-e '/TOOLPREFIX)gcc/s/$$/${GCC_DEFAULT}/g' \
+		${WRKSRC}/Make.inc
+		
 .include <bsd.port.post.mk>


More information about the svn-ports-all mailing list