Hook clang into the build on i386/amd64/powerpc.

Approved by:	ed (mentor)
This commit is contained in:
Roman Divacky 2010-06-09 19:57:20 +00:00
parent 47c832c3dd
commit 6513cfc82f
5 changed files with 38 additions and 1 deletions

View File

@ -956,6 +956,13 @@ _gensnmptree= usr.sbin/bsnmpd/gensnmptree
_crunchgen= usr.sbin/crunch/crunchgen _crunchgen= usr.sbin/crunch/crunchgen
.endif .endif
# XXX: There is no way to specify bootstrap tools depending on MK-flags
# with different per-architecture default values. Always build tblgen.
_clang_tblgen= \
lib/clang/libllvmsupport \
lib/clang/libllvmsystem \
usr.bin/clang/tblgen
.if ${MK_CDDL} != "no" .if ${MK_CDDL} != "no"
_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
@ -963,6 +970,7 @@ _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
bootstrap-tools: bootstrap-tools:
.for _tool in \ .for _tool in \
${_clang_tblgen} \
${_dtrace_tools} \ ${_dtrace_tools} \
${_strfile} \ ${_strfile} \
${_gperf} \ ${_gperf} \

View File

@ -83,6 +83,10 @@
scsi scsi
.. ..
.. ..
clang
2.0
..
..
crypto crypto
.. ..
dev dev

View File

@ -108,7 +108,8 @@ SUBDIR= ${SUBDIR_ORDERED} \
libwrap \ libwrap \
liby \ liby \
libz \ libz \
${_bind} ${_bind} \
${_clang}
.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
_csu=csu/${MACHINE_ARCH}-elf _csu=csu/${MACHINE_ARCH}-elf
@ -137,6 +138,10 @@ _libsdp= libsdp
_libbsnmp= libbsnmp _libbsnmp= libbsnmp
.endif .endif
.if ${MK_CLANG} != "no"
_clang= clang
.endif
.if ${MK_GPIB} != "no" .if ${MK_GPIB} != "no"
_libgpib= libgpib _libgpib= libgpib
.endif .endif

View File

@ -287,6 +287,18 @@ _no_fdt= FDT
_no_fdt= FDT _no_fdt= FDT
.endif .endif
#
# Default behaviour of MK_CLANG depends on the architecture.
#
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \
${MACHINE_ARCH} == "powerpc"
_clang_yes=CLANG
_clang_no=
.else
_clang_yes=
_clang_no=CLANG
.endif
# #
# MK_* options which default to "yes". # MK_* options which default to "yes".
# #
@ -314,6 +326,7 @@ _no_fdt= FDT
BZIP2 \ BZIP2 \
CALENDAR \ CALENDAR \
CDDL \ CDDL \
${_clang_yes} \
CPP \ CPP \
CRYPT \ CRYPT \
CTM \ CTM \
@ -417,6 +430,7 @@ MK_${var}:= yes
BIND_LIBS \ BIND_LIBS \
BIND_SIGCHASE \ BIND_SIGCHASE \
BIND_XML \ BIND_XML \
${_clang_no} \
${_no_fdt} \ ${_no_fdt} \
HESIOD \ HESIOD \
IDEA IDEA
@ -497,6 +511,7 @@ MK_GROFF:= no
.endif .endif
.if ${MK_TOOLCHAIN} == "no" .if ${MK_TOOLCHAIN} == "no"
MK_CLANG:= no
MK_GDB:= no MK_GDB:= no
.endif .endif

View File

@ -35,6 +35,7 @@ SUBDIR= alias \
${_chkey} \ ${_chkey} \
chpass \ chpass \
cksum \ cksum \
${_clang} \
cmp \ cmp \
col \ col \
${_colcrt} \ ${_colcrt} \
@ -279,6 +280,10 @@ _cpio= cpio
_calendar= calendar _calendar= calendar
.endif .endif
.if ${MK_CLANG} != "no"
_clang= clang
.endif
.if ${MK_HESIOD} != "no" .if ${MK_HESIOD} != "no"
_hesinfo= hesinfo _hesinfo= hesinfo
.endif .endif