1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-22 04:17:44 +00:00

Fix build with gcc by adding some compiler flags.

PR:		ports/191426
Submitted by:	Marco Steinbach (maintainer)
This commit is contained in:
Adam Weinberger 2014-07-05 23:55:31 +00:00
parent f31f5d544f
commit 027a94a680
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=360850
2 changed files with 12 additions and 6 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= sendip
PORTVERSION= 2.5
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= net-mgmt ipv6
MASTER_SITES= http://www.earth.li/projectpurple/files/
@ -14,15 +14,21 @@ LICENSE= GPLv2
BUILD_DEPENDS= help2man:${PORTSDIR}/misc/help2man
USES= gmake perl5
USES= gmake perl5 compiler
USE_LDCONFIG= yes
.include <bsd.port.pre.mk>
.if ${COMPILER_TYPE} == clang
CFLAGS+= -Wno-empty-body -Wno-constant-conversion
.endif
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/sendip
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/sendip
.for slib in ipv4.so ipv6.so icmp.so tcp.so udp.so rip.so ripng.so ntp.so \
bgp.so
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/sendip/${slib}
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/sendip/${slib}
.endfor
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -19,7 +19,7 @@
-CFLAGS= -fPIC -fsigned-char -pipe -Wall -Wpointer-arith -Wwrite-strings \
- -Wstrict-prototypes -Wnested-externs -Winline -Werror -g -Wcast-align \
- -DSENDIP_LIBS=\"$(LIBDIR)\"
+CFLAGS+= -fPIC -fsigned-char -pipe -Wall -Wpointer-arith -Wwrite-strings -Wno-empty-body -Wno-constant-conversion \
+CFLAGS+= -fPIC -fsigned-char -pipe -Wall -Wpointer-arith -Wwrite-strings \
+ -Wstrict-prototypes -Wnested-externs -Winline -Werror -Wcast-align \
+ -DSENDIP_LIBS=\"${LIBDIR}\"
#-Wcast-align causes problems on solaris, but not serious ones