kern.mk (232322) | kern.mk (232473) |
---|---|
1# $FreeBSD: head/sys/conf/kern.mk 232322 2012-02-29 22:58:51Z dim $ | 1# $FreeBSD: head/sys/conf/kern.mk 232473 2012-03-03 18:58:15Z dim $ |
2 3# 4# Warning flags for compiling the kernel and components of the kernel: 5# 6CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ 7 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ 8 -Wundef -Wno-pointer-sign -fformat-extensions \ 9 -Wmissing-include-dirs -fdiagnostics-show-option \ 10 ${CWARNEXTRA} 11# 12# The following flags are next up for working on: 13# -Wextra 14 15# Disable a few warnings for clang, since there are several places in the 16# kernel where fixing them is more trouble than it is worth, or where there is 17# a false positive. | 2 3# 4# Warning flags for compiling the kernel and components of the kernel: 5# 6CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ 7 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ 8 -Wundef -Wno-pointer-sign -fformat-extensions \ 9 -Wmissing-include-dirs -fdiagnostics-show-option \ 10 ${CWARNEXTRA} 11# 12# The following flags are next up for working on: 13# -Wextra 14 15# Disable a few warnings for clang, since there are several places in the 16# kernel where fixing them is more trouble than it is worth, or where there is 17# a false positive. |
18.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" | 18.if ${CC:T:Mclang} == "clang" || (defined(MK_CLANG_IS_CC) && ${MK_CLANG_IS_CC} != "no") |
19NO_WCONSTANT_CONVERSION= -Wno-constant-conversion 20NO_WARRAY_BOUNDS= -Wno-array-bounds 21NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative 22NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow 23NO_WUNUSED_VALUE= -Wno-unused-value 24NO_WSELF_ASSIGN= -Wno-self-assign 25NO_WFORMAT_SECURITY= -Wno-format-security 26# Several other warnings which might be useful in some cases, but not severe --- 18 unchanged lines hidden (view full) --- 45# Setting -mno-mmx implies -mno-3dnow 46# Setting -mno-sse implies -mno-sse2, -mno-sse3 and -mno-ssse3 47# 48# clang: 49# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2, 50# -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 51# 52.if ${MACHINE_CPUARCH} == "i386" | 19NO_WCONSTANT_CONVERSION= -Wno-constant-conversion 20NO_WARRAY_BOUNDS= -Wno-array-bounds 21NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative 22NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow 23NO_WUNUSED_VALUE= -Wno-unused-value 24NO_WSELF_ASSIGN= -Wno-self-assign 25NO_WFORMAT_SECURITY= -Wno-format-security 26# Several other warnings which might be useful in some cases, but not severe --- 18 unchanged lines hidden (view full) --- 45# Setting -mno-mmx implies -mno-3dnow 46# Setting -mno-sse implies -mno-sse2, -mno-sse3 and -mno-ssse3 47# 48# clang: 49# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2, 50# -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 51# 52.if ${MACHINE_CPUARCH} == "i386" |
53.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang" | 53.if ${CC:T:Mclang} != "clang" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no") |
54CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse 55.else 56CFLAGS+= -mno-aes -mno-avx 57.endif 58CFLAGS+= -mno-mmx -msoft-float 59INLINE_LIMIT?= 8000 60.endif 61 --- 31 unchanged lines hidden (view full) --- 93# Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3 and -mfpmath=387 94# 95# clang: 96# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2, 97# -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 98# (-mfpmath= is not supported) 99# 100.if ${MACHINE_CPUARCH} == "amd64" | 54CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse 55.else 56CFLAGS+= -mno-aes -mno-avx 57.endif 58CFLAGS+= -mno-mmx -msoft-float 59INLINE_LIMIT?= 8000 60.endif 61 --- 31 unchanged lines hidden (view full) --- 93# Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3 and -mfpmath=387 94# 95# clang: 96# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2, 97# -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 98# (-mfpmath= is not supported) 99# 100.if ${MACHINE_CPUARCH} == "amd64" |
101.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang" | 101.if ${CC:T:Mclang} != "clang" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no") |
102CFLAGS+= -mno-sse 103.else 104CFLAGS+= -mno-aes -mno-avx 105.endif 106CFLAGS+= -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float \ 107 -fno-asynchronous-unwind-tables 108INLINE_LIMIT?= 8000 109.endif --- 39 unchanged lines hidden --- | 102CFLAGS+= -mno-sse 103.else 104CFLAGS+= -mno-aes -mno-avx 105.endif 106CFLAGS+= -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float \ 107 -fno-asynchronous-unwind-tables 108INLINE_LIMIT?= 8000 109.endif --- 39 unchanged lines hidden --- |