Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102650636
D27601.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
10 KB
Referenced Files
None
Subscribers
None
D27601.diff
View Options
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -459,7 +459,7 @@
OBJROOT='$${OBJTOP}/' \
MAKEOBJDIRPREFIX= \
MAN= -DNO_SHARED \
- -DNO_CPU_CFLAGS -DNO_WERROR \
+ -DNO_CPU_CFLAGS MK_WERROR=no \
-DNO_SUBDIR \
DESTDIR= PROGNAME=${MYMAKE:T}
diff --git a/Makefile.inc1 b/Makefile.inc1
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -731,7 +731,7 @@
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 @@
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 @@
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 @@
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 @@
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}
diff --git a/Makefile.libcompat b/Makefile.libcompat
--- a/Makefile.libcompat
+++ b/Makefile.libcompat
@@ -104,7 +104,7 @@
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
diff --git a/lib/googletest/tests/gmock/Makefile b/lib/googletest/tests/gmock/Makefile
--- a/lib/googletest/tests/gmock/Makefile
+++ b/lib/googletest/tests/gmock/Makefile
@@ -9,6 +9,6 @@
LIBADD+= pthread gtest gmock
# The next release will resolve a number of build warnings issues.
-NO_WERROR=
+MK_WERROR= no
.include <bsd.test.mk>
diff --git a/lib/googletest/tests/gmock_main/Makefile b/lib/googletest/tests/gmock_main/Makefile
--- a/lib/googletest/tests/gmock_main/Makefile
+++ b/lib/googletest/tests/gmock_main/Makefile
@@ -32,6 +32,6 @@
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>
diff --git a/lib/googletest/tests/gtest/Makefile b/lib/googletest/tests/gtest/Makefile
--- a/lib/googletest/tests/gtest/Makefile
+++ b/lib/googletest/tests/gtest/Makefile
@@ -41,6 +41,6 @@
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>
diff --git a/lib/googletest/tests/gtest_main/Makefile b/lib/googletest/tests/gtest_main/Makefile
--- a/lib/googletest/tests/gtest_main/Makefile
+++ b/lib/googletest/tests/gtest_main/Makefile
@@ -39,6 +39,6 @@
LIBADD.gtest_unittest+= pthread
# The next release will resolve a number of build warnings issues.
-NO_WERROR=
+MK_WERROR= no
.include <bsd.test.mk>
diff --git a/lib/libalias/libalias/Makefile b/lib/libalias/libalias/Makefile
--- a/lib/libalias/libalias/Makefile
+++ b/lib/libalias/libalias/Makefile
@@ -10,6 +10,6 @@
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>
diff --git a/lib/libc/tests/ssp/Makefile b/lib/libc/tests/ssp/Makefile
--- a/lib/libc/tests/ssp/Makefile
+++ b/lib/libc/tests/ssp/Makefile
@@ -2,7 +2,7 @@
.include <bsd.own.mk>
-NO_WERROR=
+MK_WERROR= no
WARNS?= 2
CFLAGS.h_raw+= -fstack-protector-all -Wstack-protector
diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile
--- a/lib/libcompiler_rt/Makefile
+++ b/lib/libcompiler_rt/Makefile
@@ -15,7 +15,7 @@
# 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"
diff --git a/lib/libgcc_s/Makefile b/lib/libgcc_s/Makefile
--- a/lib/libgcc_s/Makefile
+++ b/lib/libgcc_s/Makefile
@@ -26,7 +26,7 @@
# 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
diff --git a/share/man/man5/style.Makefile.5 b/share/man/man5/style.Makefile.5
--- a/share/man/man5/style.Makefile.5
+++ b/share/man/man5/style.Makefile.5
@@ -156,7 +156,7 @@
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 .
diff --git a/share/man/man7/build.7 b/share/man/man7/build.7
--- a/share/man/man7/build.7
+++ b/share/man/man7/build.7
@@ -492,7 +492,7 @@
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
diff --git a/share/mk/bsd.README b/share/mk/bsd.README
--- a/share/mk/bsd.README
+++ b/share/mk/bsd.README
@@ -417,7 +417,7 @@
- LINKS
- MAN
- MLINKS
- - NO_WERROR
+ - MK_WERROR=no
- PROGNAME
- SRCS
- STRIP
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -47,7 +47,9 @@
.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)
diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk
--- a/share/mk/bsd.opts.mk
+++ b/share/mk/bsd.opts.mk
@@ -65,7 +65,8 @@
SSP \
TESTS \
TOOLCHAIN \
- WARNS
+ WARNS \
+ WERROR
__DEFAULT_NO_OPTIONS = \
BIND_NOW \
@@ -103,7 +104,8 @@
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
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -15,7 +15,9 @@
.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)
diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk
--- a/share/mk/bsd.progs.mk
+++ b/share/mk/bsd.progs.mk
@@ -23,7 +23,7 @@
.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}
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -41,9 +41,9 @@
.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 @@
.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})
diff --git a/targets/pseudo/bootstrap-tools/Makefile b/targets/pseudo/bootstrap-tools/Makefile
--- a/targets/pseudo/bootstrap-tools/Makefile
+++ b/targets/pseudo/bootstrap-tools/Makefile
@@ -42,7 +42,7 @@
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
diff --git a/tools/build/options/WITHOUT_WERROR b/tools/build/options/WITHOUT_WERROR
new file mode 100644
--- /dev/null
+++ b/tools/build/options/WITHOUT_WERROR
@@ -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.
diff --git a/usr.bin/drill/Makefile b/usr.bin/drill/Makefile
--- a/usr.bin/drill/Makefile
+++ b/usr.bin/drill/Makefile
@@ -9,7 +9,7 @@
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
diff --git a/usr.bin/kdump/Makefile b/usr.bin/kdump/Makefile
--- a/usr.bin/kdump/Makefile
+++ b/usr.bin/kdump/Makefile
@@ -17,6 +17,4 @@
CFLAGS+=-DWITH_CASPER
.endif
-#NO_WERROR?= YES
-
.include <bsd.prog.mk>
diff --git a/usr.bin/truss/Makefile b/usr.bin/truss/Makefile
--- a/usr.bin/truss/Makefile
+++ b/usr.bin/truss/Makefile
@@ -1,6 +1,5 @@
# $FreeBSD$
-#NO_WERROR=
PROG= truss
SRCS= main.c setup.c syscalls.c
diff --git a/usr.sbin/unbound/Makefile.inc b/usr.sbin/unbound/Makefile.inc
--- a/usr.sbin/unbound/Makefile.inc
+++ b/usr.sbin/unbound/Makefile.inc
@@ -1,6 +1,6 @@
# $FreeBSD$
-NO_WERROR= true
+MK_WERROR= no
NO_WTHREAD_SAFETY= true
PACKAGE= unbound
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 8:38 AM (21 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14656027
Default Alt Text
D27601.diff (10 KB)
Attached To
Mode
D27601: Rename NO_WERROR -> MK_WERROR=no
Attached
Detach File
Event Timeline
Log In to Comment