Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Apr 2021 11:08:32 GMT
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: f32309564547 - stable/13 - Don't add -Winline for WARNS=6
Message-ID:  <202104221108.13MB8WFa088777@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by arichardson:

URL: https://cgit.FreeBSD.org/src/commit/?id=f3230956454747d4ef4f6d065fd7a5c269d6250d

commit f3230956454747d4ef4f6d065fd7a5c269d6250d
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2021-03-22 11:55:45 +0000
Commit:     Alex Richardson <arichardson@FreeBSD.org>
CommitDate: 2021-04-22 09:44:51 +0000

    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
    
    (cherry picked from commit c8c62548bffb83f3d25e062929c45d66fea755f1)
---
 lib/librt/Makefile                          | 2 +-
 lib/libthr/Makefile                         | 1 -
 share/mk/bsd.sys.mk                         | 3 +--
 stand/i386/boot2/Makefile                   | 3 +--
 stand/i386/isoboot/Makefile                 | 2 +-
 sys/conf/kern.mk                            | 1 -
 sys/conf/kern.pre.mk                        | 3 +--
 tools/regression/capsicum/syscalls/Makefile | 2 +-
 8 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/lib/librt/Makefile b/lib/librt/Makefile
index 389e0280a6bc..6a751b7a3aa3 100644
--- a/lib/librt/Makefile
+++ b/lib/librt/Makefile
@@ -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
diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile
index c77b6b565a87..1a5dfa18dca7 100644
--- a/lib/libthr/Makefile
+++ b/lib/libthr/Makefile
@@ -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
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index fad487cf5630..6341800d5c70 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -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		\
diff --git a/stand/i386/boot2/Makefile b/stand/i386/boot2/Makefile
index 8758261ad45f..d5ad0f6bd12c 100644
--- a/stand/i386/boot2/Makefile
+++ b/stand/i386/boot2/Makefile
@@ -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 \
diff --git a/stand/i386/isoboot/Makefile b/stand/i386/isoboot/Makefile
index 67936e16176a..7732882b1e5c 100644
--- a/stand/i386/isoboot/Makefile
+++ b/stand/i386/isoboot/Makefile
@@ -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}
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index b0a26cd1680c..3f14a42ab226 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -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			\
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 75f59a90484d..bb52d1b9fbc4 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -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 \
diff --git a/tools/regression/capsicum/syscalls/Makefile b/tools/regression/capsicum/syscalls/Makefile
index 5d3422656281..2380193d7d7a 100644
--- a/tools/regression/capsicum/syscalls/Makefile
+++ b/tools/regression/capsicum/syscalls/Makefile
@@ -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}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104221108.13MB8WFa088777>