svn commit: r236851 - in stable/9: . share/mk
Dimitry Andric
dim at FreeBSD.org
Sun Jun 10 13:28:15 UTC 2012
Author: dim
Date: Sun Jun 10 13:28:14 2012
New Revision: 236851
URL: http://svn.freebsd.org/changeset/base/236851
Log:
MFC r236528:
During buildworld and buildkernel, define EARLY_BUILD in the earlier
stages (build-tools, cross-tools, etc) of the build, so we can detect in
bsd.*.mk whether to pass compiler-specific flags to ${CC}.
In particular, this commit will allow using WITH_CLANG_IS_CC when the
base compiler is still gcc, and when ${CC}, ${CXX} and ${CPP} are left
at their defaults. The early stages will then be built using gcc, and
no clang-specific flags will be passed to it. The later stages will be
built as usual.
The EARLY_BUILD define can also serve other uses, such as building the
world stage C++ executables with libc++ instead of libstdc++: during the
early build stages, we cannot assume libc++ is already available, so we
must still build with libstdc++ at that time.
Modified:
stable/9/Makefile.inc1 (contents, props changed)
stable/9/share/mk/bsd.sys.mk (contents, props changed)
Directory Properties:
stable/9/share/mk/ (props changed)
Modified: stable/9/Makefile.inc1
==============================================================================
--- stable/9/Makefile.inc1 Sun Jun 10 13:15:13 2012 (r236850)
+++ stable/9/Makefile.inc1 Sun Jun 10 13:28:14 2012 (r236851)
@@ -240,7 +240,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
SSP_CFLAGS= \
-DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
-DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED \
- -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF
+ -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD
# build-tools stage
TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
@@ -250,7 +250,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \
BOOTSTRAPPING=${OSRELDATE} \
SSP_CFLAGS= \
-DNO_LINT \
- -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF
+ -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD
# cross-tools stage
XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
@@ -492,7 +492,8 @@ build32:
.for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic
cd ${.CURDIR}/${_dir}; \
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \
- DIRPRFX=${_dir}/ build-tools
+ DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \
+ -DEARLY_BUILD build-tools
.endfor
cd ${.CURDIR}; \
${LIB32WMAKE} -f Makefile.inc1 libraries
@@ -834,7 +835,7 @@ buildkernel:
cd ${KRNLOBJDIR}/${_kernel}; \
PATH=${BPATH}:${PATH} \
MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \
- ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \
+ ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD \
-f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile
# XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case.
.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules)
@@ -842,7 +843,7 @@ buildkernel:
cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \
PATH=${BPATH}:${PATH} \
MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \
- ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF ${target}
+ ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD ${target}
.endfor
.endif
.if !defined(NO_KERNELDEPEND)
Modified: stable/9/share/mk/bsd.sys.mk
==============================================================================
--- stable/9/share/mk/bsd.sys.mk Sun Jun 10 13:15:13 2012 (r236850)
+++ stable/9/share/mk/bsd.sys.mk Sun Jun 10 13:28:14 2012 (r236851)
@@ -61,7 +61,8 @@ CWARNFLAGS+= -Wno-uninitialized
CWARNFLAGS+= -Wno-pointer-sign
# Clang has more warnings enabled by default, and when using -Wall, so if WARNS
# is set to low values, these have to be disabled explicitly.
-.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang"
+.if (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") && \
+ !defined(EARLY_BUILD)
.if ${WARNS} <= 6
CWARNFLAGS+= -Wno-empty-body -Wno-string-plus-int
.endif # WARNS <= 6
@@ -88,7 +89,8 @@ WFORMAT= 1
.if ${WFORMAT} > 0
#CWARNFLAGS+= -Wformat-nonliteral -Wformat-security -Wno-format-extra-args
CWARNFLAGS+= -Wformat=2 -Wno-format-extra-args
-.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang"
+.if (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") && \
+ !defined(EARLY_BUILD)
.if ${WARNS} <= 3
CWARNFLAGS+= -Wno-format-nonliteral
.endif # WARNS <= 3
@@ -109,7 +111,8 @@ CWARNFLAGS+= -Wno-format
CWARNFLAGS+= -Wno-unknown-pragmas
.endif # IGNORE_PRAGMA
-.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang"
+.if (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") && \
+ !defined(EARLY_BUILD)
CLANG_NO_IAS= -no-integrated-as
CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\
-mllvm -enable-load-pre=false -mllvm -simplifycfg-dup-ret
More information about the svn-src-all
mailing list