From a7c1868996f596987e2e9e045beb734b1cad74ba Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Wed, 16 Sep 2009 15:44:36 +0200 Subject: [PATCH] Some -Werror related cleanup. Instead of enabling WARNS_WERROR by default, enable -Werror by default in bsd.sys.mk and if the platform is i386. Get rid of WARNS_WERROR completely. --- etc/defaults/make.conf | 4 ---- share/man/man5/make.conf.5 | 16 +--------------- share/mk/bsd.sys.mk | 4 ++-- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/etc/defaults/make.conf b/etc/defaults/make.conf index 065de824ef..3a08915fbc 100644 --- a/etc/defaults/make.conf +++ b/etc/defaults/make.conf @@ -68,10 +68,6 @@ BDECFLAGS= -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \ -Wmissing-prototypes -Wnested-externs -Wpointer-arith \ -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings # -# WARNS_WERROR causes -Werror to be added when WARNS is in effect. -# Set NO_WERROR to disable. -WARNS_WERROR= yes -# # To compile just the kernel with special optimizations, you should use # this instead of CFLAGS (which is not applicable to kernel builds anyway). # There is very little to gain by using higher optimization levels, and doing diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index c0e0f2f962..ca0bd78b31 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -25,7 +25,7 @@ .\" $FreeBSD: src/share/man/man5/make.conf.5,v 1.12.2.30 2003/05/18 17:05:55 brueffer Exp $ .\" $DragonFly: src/share/man/man5/make.conf.5,v 1.38 2008/11/03 00:25:45 pavalos Exp $ .\" -.Dd August 11, 2009 +.Dd September 16, 2009 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -196,18 +196,6 @@ Set this to the flag to pass the command. If set to a blank value, components will be installed with debugging symbols. -.It Va WARNS_WERROR -Causes -.Fl Werror -to be added to -.Va CWARNFLAGS -when WARNS is in effect. -.Va WARNS_WERROR -is enabled by default. -Set -.Va NO_WERROR -to disable -.Fl Werror . .It Va WANT_HESIOD .Pq Vt bool Set this to build @@ -224,8 +212,6 @@ Set this if you don't want .Fl Werror to be added to .Va CWARNFLAGS . -See also -.Va WARNS_WERROR . .It Va STATIC_LOCALES .Pq Vt str Set to a list of locales to build into statically-linked binaries. diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index a008d668c2..37fd0d4886 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -24,7 +24,7 @@ CFLAGS += -std=${CSTD} . if defined(WARNS) . if ${WARNS} >= 1 CWARNFLAGS += -Wsystem-headers -. if defined(WARNS_WERROR) && !defined(NO_WERROR) +. if !defined(NO_WERROR) && ${MACHINE_ARCH} == "i386" CWARNFLAGS += -Werror . endif . endif @@ -55,7 +55,7 @@ WFORMAT = 1 . if defined(WFORMAT) . if ${WFORMAT} > 0 CWARNFLAGS += -Wformat=2 -Wno-format-extra-args -. if defined(WARNS_WERROR) && !defined(NO_WERROR) +. if !defined(NO_WERROR) && ${MACHINE_ARCH} == "i386" CWARNFLAGS += -Werror . endif . endif -- 2.41.0