Don't add -Winline for WARNS=6
This warning is very rarely useful (inline is a hint and not mandatory). This flag results in many warnings being printed when compiling C++ code that uses the standard library with GCC. This flag was originally added in back in r94332 but the flag is a no-op in Clang ("This diagnostic flag exists for GCC compatibility, and has no effect in Clang"). Removing it should make the GCC build output slightly more readable. Reviewed By: jrtc27, imp Differential Revision: https://reviews.freebsd.org/D29235
This commit is contained in:
parent
6ccdee8ab5
commit
c8c62548bf
@ -8,7 +8,7 @@ CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}
|
||||
.ifndef NO_THREAD_STACK_UNWIND
|
||||
CFLAGS+=-fexceptions
|
||||
.endif
|
||||
CFLAGS+=-Winline -Wall
|
||||
CFLAGS+=-Wall
|
||||
LIBADD= pthread
|
||||
|
||||
WARNS?= 2
|
||||
|
@ -25,7 +25,6 @@ CFLAGS+=-I${.CURDIR}/sys
|
||||
CFLAGS+=-I${SRCTOP}/libexec/rtld-elf
|
||||
CFLAGS+=-I${SRCTOP}/libexec/rtld-elf/${MACHINE_CPUARCH}
|
||||
CFLAGS+=-I${SRCTOP}/lib/libthread_db
|
||||
CFLAGS+=-Winline
|
||||
|
||||
CFLAGS.thr_stack.c+= -Wno-cast-align
|
||||
CFLAGS.rtld_malloc.c+= -Wno-cast-align
|
||||
|
@ -60,7 +60,7 @@ CWARNFLAGS+= -Wcast-align
|
||||
.endif # !NO_WCAST_ALIGN !NO_WCAST_ALIGN.${COMPILER_TYPE}
|
||||
.endif # WARNS >= 4
|
||||
.if ${WARNS} >= 6
|
||||
CWARNFLAGS+= -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls\
|
||||
CWARNFLAGS+= -Wchar-subscripts -Wnested-externs -Wredundant-decls\
|
||||
-Wold-style-definition
|
||||
.if !defined(NO_WMISSING_VARIABLE_DECLARATIONS)
|
||||
CWARNFLAGS.clang+= -Wmissing-variable-declarations
|
||||
@ -147,7 +147,6 @@ CWARNFLAGS+= -Wno-error=address \
|
||||
-Wno-error=deprecated-declarations \
|
||||
-Wno-error=enum-compare \
|
||||
-Wno-error=extra \
|
||||
-Wno-error=inline \
|
||||
-Wno-error=logical-not-parentheses \
|
||||
-Wno-error=strict-aliasing \
|
||||
-Wno-error=uninitialized \
|
||||
|
@ -31,8 +31,7 @@ CFLAGS+=-fomit-frame-pointer \
|
||||
-I${LDRSRC} \
|
||||
-Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \
|
||||
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
|
||||
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
|
||||
-Winline
|
||||
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings
|
||||
|
||||
CFLAGS.gcc+= -Os \
|
||||
-fno-asynchronous-unwind-tables \
|
||||
|
@ -29,7 +29,7 @@ CFLAGS+=-DBOOTPROG=\"isoboot\" \
|
||||
-Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \
|
||||
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
|
||||
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
|
||||
-Winline -Wno-pointer-sign
|
||||
-Wno-pointer-sign
|
||||
|
||||
CFLAGS.gcc+= --param max-inline-insns-single=100
|
||||
CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL}
|
||||
|
@ -48,7 +48,6 @@ CWARNEXTRA?= -Wno-error=address \
|
||||
-Wno-error=attributes \
|
||||
-Wno-error=cast-qual \
|
||||
-Wno-error=enum-compare \
|
||||
-Wno-error=inline \
|
||||
-Wno-error=maybe-uninitialized \
|
||||
-Wno-error=misleading-indentation \
|
||||
-Wno-error=nonnull-compare \
|
||||
|
@ -192,7 +192,7 @@ NORMAL_FWO= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} -o ${.TARGET} \
|
||||
# for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS)
|
||||
ZSTD_C= ${CC} -c -DZSTD_HEAPMODE=1 -I$S/contrib/zstd/lib/freebsd ${CFLAGS} \
|
||||
-I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} \
|
||||
-Wno-inline -Wno-missing-prototypes ${PROF} -U__BMI__ \
|
||||
-Wno-missing-prototypes ${PROF} -U__BMI__ \
|
||||
-DZSTD_NO_INTRINSICS \
|
||||
${.IMPSRC}
|
||||
# https://github.com/facebook/zstd/commit/812e8f2a [zstd 1.4.1]
|
||||
@ -222,7 +222,6 @@ CDDL_CFLAGS= \
|
||||
${CFLAGS} \
|
||||
-Wno-cast-qual \
|
||||
-Wno-duplicate-decl-specifier \
|
||||
-Wno-inline \
|
||||
-Wno-missing-braces \
|
||||
-Wno-missing-prototypes \
|
||||
-Wno-nested-externs \
|
||||
|
@ -6,7 +6,7 @@ CFLAGS= -O2 -pipe -std=gnu99 -fstack-protector
|
||||
CFLAGS+= -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter
|
||||
CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type
|
||||
CFLAGS+= -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter
|
||||
CFLAGS+= -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
|
||||
CFLAGS+= -Wcast-align -Wchar-subscripts -Wnested-externs -Wredundant-decls
|
||||
CFLAGS+= -Wold-style-definition -Wno-pointer-sign
|
||||
|
||||
all: ${SYSCALLS} ${SYSCALLS:=.t}
|
||||
|
Loading…
Reference in New Issue
Block a user