Conditionalize the inclusion of the -fnested-functions flag on GCC.

Approved by:		portmgr (tier-2 blanket)
Differential Revision:	D22026
This commit is contained in:
Mark Linimon 2019-10-15 12:43:44 +00:00
parent 43e2927063
commit 3ce27bc490
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=514519

View file

@ -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 detectlamespf.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>