svn commit: r514519 - head/mail/milter-callback

Mark Linimon linimon at FreeBSD.org
Tue Oct 15 12:43:45 UTC 2019


Author: linimon
Date: Tue Oct 15 12:43:44 2019
New Revision: 514519
URL: https://svnweb.freebsd.org/changeset/ports/514519

Log:
  Conditionalize the inclusion of the -fnested-functions flag on GCC.
  
  Approved by:		portmgr (tier-2 blanket)
  Differential Revision:	D22026

Modified:
  head/mail/milter-callback/Makefile

Modified: head/mail/milter-callback/Makefile
==============================================================================
--- head/mail/milter-callback/Makefile	Tue Oct 15 12:30:45 2019	(r514518)
+++ head/mail/milter-callback/Makefile	Tue Oct 15 12:43:44 2019	(r514519)
@@ -14,7 +14,7 @@ LICENSE=	GPLv3
 
 LIB_DEPENDS=	libspf2.so:mail/libspf2
 
-USES=		tar:xz
+USES=		compiler tar:xz
 USE_RC_SUBR=	milter-callback
 USE_GCC=	any
 
@@ -26,14 +26,14 @@ SRC_FILES=	cache.c commonprocs.c cpit.c dealwithmxes.c
 
 CFLAGS+=	-DFREEBSD -DHAVE_NS_TYPE -DWITH_SPF -I${LOCALBASE}/include \
 		-I${WRKSRC} -std=gnu99
-CFLAGS_mips=	-fnested-functions
-CFLAGS_mips64=	-fnested-functions
-CFLAGS_powerpc=	-fnested-functions
-CFLAGS_powerpcspe=	-fnested-functions
-CFLAGS_powerpc64=	-fnested-functions
-CFLAGS_sparc64=	-fnested-functions
 LDFLAGS+=	-lmilter -lthr -L${LOCALBASE}/lib -lspf2
 
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42
+CFLAGS+=	-fnested-functions
+.endif
+
 do-build:
 .for f in ${SRC_FILES}
 	${CC} ${CFLAGS} -c ${WRKSRC}/${f} -o ${WRKSRC}/${f:C/\.c/.o/}
@@ -57,4 +57,4 @@ do-install:
 	${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf \
 		${STAGEDIR}${PREFIX}/etc/mail/${PORTNAME}.conf.sample
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>


More information about the svn-ports-head mailing list