summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-06-03 20:35:41 +0000
committerdim <dim@FreeBSD.org>2012-06-03 20:35:41 +0000
commita0a31e8b37066f40c455b46339ef12ec8a9ad5e0 (patch)
tree37e981a92a2453b2d59fd54246a225fcf318f59f /Makefile.inc1
parentc875946e795a2d59b25dfe0f44ff168c598074d7 (diff)
downloadFreeBSD-src-a0a31e8b37066f40c455b46339ef12ec8a9ad5e0.zip
FreeBSD-src-a0a31e8b37066f40c455b46339ef12ec8a9ad5e0.tar.gz
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. MFC after: 1 week
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc111
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 3cfebc2..be411a8 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -242,7 +242,7 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \
SSP_CFLAGS= \
-DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \
-DNO_PIC -DNO_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} \
@@ -252,7 +252,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} \
@@ -487,7 +487,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
@@ -829,7 +830,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)
@@ -837,7 +838,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)
OpenPOWER on IntegriCloud