summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-01-30 18:17:17 +0000
committerdim <dim@FreeBSD.org>2015-01-30 18:17:17 +0000
commitccde4975e682f6415957a5fe36397a63d090e1c8 (patch)
tree075a5bb91b795d3bf9824d94d1e401ed049b87f2
parent44d11c5c5e917931cd0e9827d66dd0d9ddc2e200 (diff)
downloadFreeBSD-src-ccde4975e682f6415957a5fe36397a63d090e1c8.zip
FreeBSD-src-ccde4975e682f6415957a5fe36397a63d090e1c8.tar.gz
For clang, disable -Wcast-qual warnings for specific aesni files, since
clang 3.6.0 will emit a number of such warnings for those files, and they are partially contributed code.
-rw-r--r--sys/conf/files.amd644
-rw-r--r--sys/conf/kern.mk1
-rw-r--r--sys/modules/aesni/Makefile3
3 files changed, 6 insertions, 2 deletions
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index bbbe827..996a0cf 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -131,12 +131,12 @@ crypto/aesni/aeskeys_amd64.S optional aesni
crypto/aesni/aesni.c optional aesni
aesni_ghash.o optional aesni \
dependency "$S/crypto/aesni/aesni_ghash.c" \
- compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \
+ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \
no-implicit-rule \
clean "aesni_ghash.o"
aesni_wrap.o optional aesni \
dependency "$S/crypto/aesni/aesni_wrap.c" \
- compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \
+ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \
no-implicit-rule \
clean "aesni_wrap.o"
crypto/blowfish/bf_enc.c optional crypto | ipsec
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index b964151..c031b3a 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -23,6 +23,7 @@ NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow
NO_WSELF_ASSIGN= -Wno-self-assign
NO_WUNNEEDED_INTERNAL_DECL= -Wno-unneeded-internal-declaration
NO_WSOMETIMES_UNINITIALIZED= -Wno-error-sometimes-uninitialized
+NO_WCAST_QUAL= -Wno-cast-qual
# Several other warnings which might be useful in some cases, but not severe
# enough to error out the whole kernel build. Display them anyway, so there is
# some incentive to fix them eventually.
diff --git a/sys/modules/aesni/Makefile b/sys/modules/aesni/Makefile
index 6fdfc7e..bfba745 100644
--- a/sys/modules/aesni/Makefile
+++ b/sys/modules/aesni/Makefile
@@ -22,3 +22,6 @@ aesni_wrap.o: aesni_wrap.c
${CTFCONVERT_CMD}
.include <bsd.kmod.mk>
+
+CWARNFLAGS.aesni_ghash.c= ${NO_WCAST_QUAL}
+CWARNFLAGS.aesni_wrap.c= ${NO_WCAST_QUAL}
OpenPOWER on IntegriCloud