Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jun 2015 00:35:26 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r390681 - head/lang/moscow_ml
Message-ID:  <201506270035.t5R0ZQfZ077996@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Sat Jun 27 00:35:25 2015
New Revision: 390681
URL: https://svnweb.freebsd.org/changeset/ports/390681

Log:
  - Fix build on 10.1: disable -fno-defer-pop flag which is not known by clang
  
  Makefile says this flag is crucial for gcc to disable certain
  optimization, but I assume clang doesn't have this optimization as
  it doesn't support the flag. clang >= 3.6 handles unknown flags
  with a mere warnings, so the modification is only needed for clang < 3.6
  
  Submitted by:	pkg-fallout
  Approved by:	portmgr blanket

Modified:
  head/lang/moscow_ml/Makefile

Modified: head/lang/moscow_ml/Makefile
==============================================================================
--- head/lang/moscow_ml/Makefile	Fri Jun 26 23:57:43 2015	(r390680)
+++ head/lang/moscow_ml/Makefile	Sat Jun 27 00:35:25 2015	(r390681)
@@ -16,7 +16,7 @@ LIB_DEPENDS=	libgmp.so:${PORTSDIR}/math/
 
 RESTRICTED=	Restrictions on for-profit distribution
 
-USES=		perl5
+USES=		compiler:features perl5
 ALL_TARGET=	world
 MAKE_ARGS=	MOSMLHOME="${MOSMLHOME}" DOCSDIR="${DOCSDIR}" \
 		LD_RUN_PATH="${PREFIX}/lib/mosml"
@@ -28,7 +28,13 @@ SUB_FILES=	pkg-message
 
 OPTIONS_DEFINE=	DOCS EXAMPLES
 
+.include <bsd.port.pre.mk>
+
 post-patch: .SILENT
+.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 36
+	${FIND} ${WRKSRC} -name Makefile | ${XARGS} \
+		${REINPLACE_CMD} -e "s,-fno-defer-pop,,"
+.endif
 	${FIND} ${WRKSRC} -name Makefile | ${XARGS} \
 		${REINPLACE_CMD} -e "s,-O2,${CFLAGS} -I${LOCALBASE}/include,"
 	${FIND} ${WRKDIR}/mosml/examples -name Makefile -o \
@@ -69,4 +75,4 @@ post-install:
 		${STAGEDIR}${PREFIX}/lib/mosml/header
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mosml/lib*.so
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506270035.t5R0ZQfZ077996>