Rename NO_WERROR -> MK_WERROR=no
As suggested in D27598. This also supports MK_WERROR.clang=no and MK_WERROR.gcc=no to support the existing NO_WERROR.<compiler> uses. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D27601
This commit is contained in:
parent
94ffff68c8
commit
7fa2f2a62f
2
Makefile
2
Makefile
@ -459,7 +459,7 @@ MMAKE= ${MMAKEENV} ${MAKE} \
|
||||
OBJROOT='$${OBJTOP}/' \
|
||||
MAKEOBJDIRPREFIX= \
|
||||
MAN= -DNO_SHARED \
|
||||
-DNO_CPU_CFLAGS -DNO_WERROR \
|
||||
-DNO_CPU_CFLAGS MK_WERROR=no \
|
||||
-DNO_SUBDIR \
|
||||
DESTDIR= PROGNAME=${MYMAKE:T}
|
||||
|
||||
|
@ -731,7 +731,7 @@ BSARGS= DESTDIR= \
|
||||
SSP_CFLAGS= \
|
||||
MK_HTML=no NO_LINT=yes MK_MAN=no MK_MAN_UTILS=yes \
|
||||
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
|
||||
-DNO_CPU_CFLAGS -DNO_WERROR MK_CTF=no \
|
||||
-DNO_CPU_CFLAGS MK_WERROR=no MK_CTF=no \
|
||||
MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \
|
||||
MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no \
|
||||
MK_INCLUDES=yes
|
||||
@ -752,7 +752,7 @@ TMAKE= \
|
||||
BWPHASE=${.TARGET:C,^_,,} \
|
||||
SSP_CFLAGS= \
|
||||
-DNO_LINT \
|
||||
-DNO_CPU_CFLAGS -DNO_WERROR MK_CTF=no \
|
||||
-DNO_CPU_CFLAGS MK_WERROR=no MK_CTF=no \
|
||||
MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \
|
||||
MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no
|
||||
|
||||
@ -780,7 +780,7 @@ KTMAKE= \
|
||||
SSP_CFLAGS= \
|
||||
MK_HTML=no -DNO_LINT MK_MAN=no \
|
||||
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
|
||||
-DNO_CPU_CFLAGS MK_RETPOLINE=no -DNO_WERROR MK_CTF=no
|
||||
-DNO_CPU_CFLAGS MK_RETPOLINE=no MK_WERROR=no MK_CTF=no
|
||||
|
||||
# world stage
|
||||
WMAKEENV= ${CROSSENV} \
|
||||
@ -2748,7 +2748,7 @@ NXBMAKEARGS+= \
|
||||
MK_SENDMAIL=no \
|
||||
MK_SVNLITE=no \
|
||||
MK_TESTS=no \
|
||||
-DNO_WERROR \
|
||||
MK_WERROR=no \
|
||||
MK_ZFS=no
|
||||
|
||||
.if make(native-xtools*) && \
|
||||
@ -3367,7 +3367,7 @@ XDEV_CPUTYPE?=${TARGET_CPUTYPE}
|
||||
|
||||
NOFUN=-DNO_FSCHG MK_HTML=no -DNO_LINT \
|
||||
MK_MAN=no MK_NLS=no MK_PROFILE=no \
|
||||
MK_KERBEROS=no MK_RESCUE=no MK_TESTS=no -DNO_WERROR \
|
||||
MK_KERBEROS=no MK_RESCUE=no MK_TESTS=no MK_WERROR=no \
|
||||
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
|
||||
CPUTYPE=${XDEV_CPUTYPE}
|
||||
|
||||
|
@ -104,7 +104,7 @@ build${libcompat}: .PHONY
|
||||
OBJROOT='$${OBJTOP}/' \
|
||||
MAKEOBJDIRPREFIX= \
|
||||
DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS \
|
||||
MK_CTF=no MK_RETPOLINE=no -DNO_WERROR \
|
||||
MK_CTF=no MK_RETPOLINE=no MK_WERROR=no \
|
||||
${_t}
|
||||
.endfor
|
||||
.endfor
|
||||
|
@ -9,6 +9,6 @@ GTESTS+= gmock_stress_test
|
||||
LIBADD+= pthread gtest gmock
|
||||
|
||||
# The next release will resolve a number of build warnings issues.
|
||||
NO_WERROR=
|
||||
MK_WERROR= no
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -32,6 +32,6 @@ SRCS.gmock_link_test= \
|
||||
LIBADD= gmock_main gmock gtest
|
||||
|
||||
# The next release will resolve a number of build warnings issues.
|
||||
NO_WERROR=
|
||||
MK_WERROR= no
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -41,6 +41,6 @@ LIBADD+= gtest
|
||||
LIBADD.gtest_stress_test+= pthread
|
||||
|
||||
# The next release will resolve a number of build warnings issues.
|
||||
NO_WERROR=
|
||||
MK_WERROR= no
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -39,6 +39,6 @@ LIBADD.googletest-port-test+= pthread
|
||||
LIBADD.gtest_unittest+= pthread
|
||||
|
||||
# The next release will resolve a number of build warnings issues.
|
||||
NO_WERROR=
|
||||
MK_WERROR= no
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -10,6 +10,6 @@ SHLIB_MAJOR= 7
|
||||
MAN= libalias.3
|
||||
SRCS= alias.c alias_db.c alias_proxy.c alias_util.c alias_mod.c
|
||||
INCS= alias.h
|
||||
NO_WERROR=
|
||||
MK_WERROR= no
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
NO_WERROR=
|
||||
MK_WERROR= no
|
||||
WARNS?= 2
|
||||
|
||||
CFLAGS.h_raw+= -fstack-protector-all -Wstack-protector
|
||||
|
@ -15,7 +15,7 @@ CFLAGS+= -I${SRCTOP}/contrib/libcxxrt
|
||||
|
||||
# gcc has incompatible internal declarations for __divtc3 and __multc3, but has
|
||||
# no option to silence its warning, so make warnings non-fatal.
|
||||
NO_WERROR.gcc=
|
||||
MK_WERROR.gcc= no
|
||||
|
||||
.include "Makefile.inc"
|
||||
|
||||
|
@ -26,7 +26,7 @@ SYMBOL_MAPS+= ${.CURDIR}/SymbolDefault.map
|
||||
|
||||
# gcc has incompatible internal declarations for __divtc3 and __multc3, but has
|
||||
# no option to silence its warning, so make warnings non-fatal.
|
||||
NO_WERROR.gcc=
|
||||
MK_WERROR.gcc= no
|
||||
|
||||
LIBCSRCDIR= ${SRCTOP}/lib/libc
|
||||
LIBMSRCDIR= ${SRCTOP}/lib/msun/src
|
||||
|
@ -156,7 +156,7 @@ is spelled
|
||||
so that it may be overridden on the command line or in
|
||||
.Xr make.conf 5 .
|
||||
.It
|
||||
.Dq Li "NO_WERROR= yes"
|
||||
.Dq Li "MK_WERROR=no"
|
||||
should not be used,
|
||||
it defeats the purpose of
|
||||
.Va WARNS .
|
||||
|
@ -492,7 +492,7 @@ and not via
|
||||
or
|
||||
.Pa /etc/src.conf
|
||||
or the command line.
|
||||
.It Va NO_WERROR
|
||||
.It Va WITHOUT_WERROR
|
||||
If defined, compiler warnings will not cause the build to halt,
|
||||
even if the makefile says otherwise.
|
||||
.It Va WITH_CTF
|
||||
|
@ -417,7 +417,7 @@ PROGS_CXX PROG and PROG_CXX in one Makefile. To define
|
||||
- LINKS
|
||||
- MAN
|
||||
- MLINKS
|
||||
- NO_WERROR
|
||||
- MK_WERROR=no
|
||||
- PROGNAME
|
||||
- SRCS
|
||||
- STRIP
|
||||
|
@ -47,7 +47,9 @@ CFLAGS+= ${CRUNCH_CFLAGS}
|
||||
|
||||
.if ${MK_ASSERT_DEBUG} == "no"
|
||||
CFLAGS+= -DNDEBUG
|
||||
NO_WERROR=
|
||||
# XXX: shouldn't we ensure that !asserts marks potentially unused variables as
|
||||
# __unused instead of disabling -Werror globally?
|
||||
MK_WERROR= no
|
||||
.endif
|
||||
|
||||
.if defined(DEBUG_FLAGS)
|
||||
|
@ -65,7 +65,8 @@ __DEFAULT_YES_OPTIONS = \
|
||||
SSP \
|
||||
TESTS \
|
||||
TOOLCHAIN \
|
||||
WARNS
|
||||
WARNS \
|
||||
WERROR
|
||||
|
||||
__DEFAULT_NO_OPTIONS = \
|
||||
BIND_NOW \
|
||||
@ -103,7 +104,8 @@ __DEFAULT_DEPENDENT_OPTIONS = \
|
||||
INSTALLLIB \
|
||||
MAN \
|
||||
PROFILE \
|
||||
WARNS
|
||||
WARNS \
|
||||
WERROR
|
||||
.if defined(NO_${var})
|
||||
.error "NO_${var} is defined, but deprecated. Please use MK_${var}=no instead."
|
||||
MK_${var}:=no
|
||||
|
@ -15,7 +15,9 @@ CFLAGS+=${COPTS}
|
||||
|
||||
.if ${MK_ASSERT_DEBUG} == "no"
|
||||
CFLAGS+= -DNDEBUG
|
||||
NO_WERROR=
|
||||
# XXX: shouldn't we ensure that !asserts marks potentially unused variables as
|
||||
# __unused instead of disabling -Werror globally?
|
||||
MK_WERROR= no
|
||||
.endif
|
||||
|
||||
.if defined(DEBUG_FLAGS)
|
||||
|
@ -23,7 +23,7 @@ PROGS += ${PROGS_CXX}
|
||||
.if defined(PROG)
|
||||
# just one of many
|
||||
PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE CSTD CXXSTD DPSRCS MAN \
|
||||
NO_SHARED NO_WERROR PROGNAME SRCS STRIP WARNS
|
||||
NO_SHARED MK_WERROR PROGNAME SRCS STRIP WARNS
|
||||
PROG_VARS += CFLAGS CXXFLAGS DEBUG_FLAGS DPADD INTERNALPROG LDADD LIBADD \
|
||||
LINKS LDFLAGS MLINKS ${PROG_OVERRIDE_VARS}
|
||||
.for v in ${PROG_VARS:O:u}
|
||||
|
@ -41,9 +41,9 @@ WARNS= ${DEFAULTWARNS}
|
||||
.if defined(WARNS)
|
||||
.if ${WARNS} >= 1
|
||||
CWARNFLAGS+= -Wsystem-headers
|
||||
.if !defined(NO_WERROR) && !defined(NO_WERROR.${COMPILER_TYPE})
|
||||
.if ${MK_WERROR} != "no" && ${MK_WERROR.${COMPILER_TYPE}:Uyes} != "no"
|
||||
CWARNFLAGS+= -Werror
|
||||
.endif # !NO_WERROR && !NO_WERROR.${COMPILER_TYPE}
|
||||
.endif # ${MK_WERROR} != "no" && ${MK_WERROR.${COMPILER_TYPE}:Uyes} != "no"
|
||||
.endif # WARNS >= 1
|
||||
.if ${WARNS} >= 2
|
||||
CWARNFLAGS+= -Wall -Wno-format-y2k
|
||||
@ -120,9 +120,9 @@ CWARNFLAGS+= -Wformat=2 -Wno-format-extra-args
|
||||
.if ${WARNS} <= 3
|
||||
CWARNFLAGS.clang+= -Wno-format-nonliteral
|
||||
.endif # WARNS <= 3
|
||||
.if !defined(NO_WERROR) && !defined(NO_WERROR.${COMPILER_TYPE})
|
||||
.if ${MK_WERROR} != "no" && ${MK_WERROR.${COMPILER_TYPE}:Uyes} != "no"
|
||||
CWARNFLAGS+= -Werror
|
||||
.endif # !NO_WERROR && !NO_WERROR.${COMPILER_TYPE}
|
||||
.endif # ${MK_WERROR} != "no" && ${MK_WERROR.${COMPILER_TYPE}:Uyes} != "no"
|
||||
.endif # WFORMAT > 0
|
||||
.endif # WFORMAT
|
||||
.if defined(NO_WFORMAT) || defined(NO_WFORMAT.${COMPILER_TYPE})
|
||||
|
@ -42,7 +42,7 @@ BSARGS= DESTDIR= \
|
||||
SSP_CFLAGS= \
|
||||
MK_HTML=no NO_LINT=yes MK_MAN=no \
|
||||
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
|
||||
-DNO_CPU_CFLAGS -DNO_WERROR MK_CTF=no \
|
||||
-DNO_CPU_CFLAGS MK_WERROR=no MK_CTF=no \
|
||||
MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \
|
||||
MK_LLDB=no MK_TESTS=no \
|
||||
MK_INCLUDES=yes
|
||||
|
4
tools/build/options/WITHOUT_WERROR
Normal file
4
tools/build/options/WITHOUT_WERROR
Normal file
@ -0,0 +1,4 @@
|
||||
.\" $FreeBSD$
|
||||
Set this to not treat compiler warnings as errors.
|
||||
Useful as a temporary workaround when working on fixing compiler warnings.
|
||||
When set, warnings are still printed in the build log but do not fail the build.
|
@ -9,7 +9,7 @@ PROG= drill
|
||||
SRCS= drill.c drill_util.c error.c root.c work.c \
|
||||
chasetrace.c dnssec.c securetrace.c
|
||||
CFLAGS+= -I${LDNSDIR}
|
||||
NO_WERROR= true
|
||||
MK_WERROR= no
|
||||
MAN= drill.1
|
||||
|
||||
LIBADD= ldns crypto
|
||||
|
@ -17,6 +17,4 @@ LIBADD+= cap_pwd
|
||||
CFLAGS+=-DWITH_CASPER
|
||||
.endif
|
||||
|
||||
#NO_WERROR?= YES
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -1,6 +1,5 @@
|
||||
# $FreeBSD$
|
||||
|
||||
#NO_WERROR=
|
||||
PROG= truss
|
||||
SRCS= main.c setup.c syscalls.c
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# $FreeBSD$
|
||||
|
||||
NO_WERROR= true
|
||||
MK_WERROR= no
|
||||
NO_WTHREAD_SAFETY= true
|
||||
PACKAGE= unbound
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user