Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 May 2014 16:37:54 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r265830 - in head: . share/mk tools/build/options
Message-ID:  <201405101637.s4AGbsEM006325@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Sat May 10 16:37:53 2014
New Revision: 265830
URL: http://svnweb.freebsd.org/changeset/base/265830

Log:
  Migrate NO_WARN to MK_WARN. Support legacy NO_WARN usage. Remove a
  check for EARLY_BUILD because it isn't necessary (MK_WARN=no will
  always be defined for that).

Added:
  head/tools/build/options/WITHOUT_WARNS   (contents, props changed)
Modified:
  head/Makefile.inc1
  head/share/mk/bsd.opts.mk
  head/share/mk/bsd.sys.mk

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Sat May 10 16:37:44 2014	(r265829)
+++ head/Makefile.inc1	Sat May 10 16:37:53 2014	(r265830)
@@ -248,7 +248,7 @@ BMAKE=		MAKEOBJDIRPREFIX=${WORLDTMP} \
 		SSP_CFLAGS= \
 		MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \
 		-DNO_PIC MK_PROFILE=no -DNO_SHARED \
-		-DNO_CPU_CFLAGS -DNO_WARNS MK_CTF=no -DEARLY_BUILD MK_TESTS=no
+		-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no -DEARLY_BUILD MK_TESTS=no
 
 # build-tools stage
 TMAKE=		MAKEOBJDIRPREFIX=${OBJTREE} \
@@ -258,7 +258,7 @@ TMAKE=		MAKEOBJDIRPREFIX=${OBJTREE} \
 		BOOTSTRAPPING=${OSRELDATE} \
 		SSP_CFLAGS= \
 		-DNO_LINT \
-		-DNO_CPU_CFLAGS -DNO_WARNS MK_CTF=no -DEARLY_BUILD MK_TESTS=no
+		-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no -DEARLY_BUILD MK_TESTS=no
 
 # cross-tools stage
 XMAKE=		TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
@@ -277,7 +277,7 @@ KTMAKE=		TOOLS_PREFIX=${WORLDTMP} MAKEOB
 		SSP_CFLAGS= \
 		MK_HTML=no MK_INFO=no -DNO_LINT MK_MAN=no \
 		-DNO_PIC MK_PROFILE=no -DNO_SHARED \
-		-DNO_CPU_CFLAGS -DNO_WARNS MK_CTF=no -DEARLY_BUILD
+		-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no -DEARLY_BUILD
 
 # world stage
 WMAKEENV=	${CROSSENV} \
@@ -609,7 +609,7 @@ build32:
 	    WORLDTMP=${WORLDTMP} \
 	    MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \
 	    MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \
-	    DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS -DNO_WARNS MK_CTF=no \
+	    DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
 	    -DEARLY_BUILD build-tools
 .endfor
 	cd ${.CURDIR}; \
@@ -1846,7 +1846,7 @@ XDEV_CPUTYPE?=${TARGET_CPUTYPE}
 
 NOFUN=-DNO_FSCHG MK_HTML=no MK_INFO=no -DNO_LINT \
 	MK_MAN=no MK_NLS=no MK_PROFILE=no \
-	MK_KERBEROS=no MK_RESCUE=no MK_TESTS=no -DNO_WARNS \
+	MK_KERBEROS=no MK_RESCUE=no MK_TESTS=no MK_WARNS=no \
 	TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \
 	CPUTYPE=${XDEV_CPUTYPE}
 

Modified: head/share/mk/bsd.opts.mk
==============================================================================
--- head/share/mk/bsd.opts.mk	Sat May 10 16:37:44 2014	(r265829)
+++ head/share/mk/bsd.opts.mk	Sat May 10 16:37:53 2014	(r265830)
@@ -56,7 +56,8 @@ __DEFAULT_YES_OPTIONS = \
     PROFILE \
     SSP \
     SYMVER \
-    TOOLCHAIN
+    TOOLCHAIN \
+    WARNS
 
 __DEFAULT_NO_OPTIONS = \
     CTF \
@@ -76,7 +77,8 @@ __DEFAULT_NO_OPTIONS = \
     DEBUG_FILES \
     INSTALLLIB \
     MAN \
-    PROFILE
+    PROFILE \
+    WARNS
 .if defined(NO_${var})
 # This warning may be premature...
 #.warning "NO_${var} is defined, but deprecated. Please use MK_${var}=no instead."

Modified: head/share/mk/bsd.sys.mk
==============================================================================
--- head/share/mk/bsd.sys.mk	Sat May 10 16:37:44 2014	(r265829)
+++ head/share/mk/bsd.sys.mk	Sat May 10 16:37:53 2014	(r265830)
@@ -4,7 +4,7 @@
 # sources.
 
 # Enable various levels of compiler warning checks.  These may be
-# overridden (e.g. if using a non-gcc compiler) by defining NO_WARNS.
+# overridden (e.g. if using a non-gcc compiler) by defining MK_WARNS=no.
 
 # for GCC:   http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Warning-Options.html
 
@@ -134,9 +134,8 @@ CFLAGS+=	${SSP_CFLAGS}
 .endif # SSP && !IA64 && !ARM && !MIPS
 
 # Allow user-specified additional warning flags, plus compiler specific flag overrides.
-# Unless we're early in the build, in which case don't (which is lame, this should
-# be handled by NO_WARNS which needs to migrate to something else.
-.if !defined(NO_WARNS) && !defined(EARLY_BUILD)
+# Unless we've overriden this...
+.if ${MK_WARNS} != "no"
 CFLAGS+=	${CWARNFLAGS} ${CWARNFLAGS.${COMPILER_TYPE}}
 .endif
 

Added: head/tools/build/options/WITHOUT_WARNS
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/build/options/WITHOUT_WARNS	Sat May 10 16:37:53 2014	(r265830)
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set this to not add warning flags to the compiler invocations.
+Useful as a temporary workaround when code enters the tree
+which triggers warnings in environments that differ from the
+original develoepr.



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