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.
This commit is contained in:
Dimitry Andric 2015-01-30 18:17:17 +00:00
parent b7c2ba84c9
commit c234c2de73
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277940
3 changed files with 6 additions and 2 deletions

View File

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

View File

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

View File

@ -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}