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).
This commit is contained in:
parent
999298523e
commit
ab72ce6b1b
@ -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} MAKEOBJDIRPREFIX=${WORLDTMP} \
|
||||
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}
|
||||
|
||||
|
@ -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."
|
||||
|
@ -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
|
||||
|
||||
|
5
tools/build/options/WITHOUT_WARNS
Normal file
5
tools/build/options/WITHOUT_WARNS
Normal file
@ -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.
|
Loading…
Reference in New Issue
Block a user