diff options
author | imp <imp@FreeBSD.org> | 2011-02-22 04:07:15 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2011-02-22 04:07:15 +0000 |
commit | 10febaa758fec4de02dcf512007d321eb340cbca (patch) | |
tree | 277bcfc4b2dc7b294dc0b3116f3c24590df124d8 /Makefile.inc1 | |
parent | b52bdf56d488423c8356201e5c37e794002db13d (diff) | |
download | FreeBSD-src-10febaa758fec4de02dcf512007d321eb340cbca.zip FreeBSD-src-10febaa758fec4de02dcf512007d321eb340cbca.tar.gz |
Select building CLANG based on ${TARGET_ARCH} and existence of
WITH{,OUT}_CLANG. We default to yes on some archs, no on others,
unless WITHOUT_CLANG or WITH_CLANG is defined respectively.
Diffstat (limited to 'Makefile.inc1')
-rw-r--r-- | Makefile.inc1 | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index de00716..ad46fbe 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -42,6 +42,20 @@ TARGET_ARCH=${TARGET} .include <bsd.own.mk> .include <bsd.arch.inc.mk> +# Clang is a special case. We have to use it to bootstrap the target, not +# where we're building from. +.if ${TARGET_ARCH} == i386 || ${TARGET_ARCH} == amd64 || \ + ${TARGET_ARCH} == arm || ${TARGET_ARCH} == powerpc64 || \ + ${TARGET_ARCH} == powerpc +.if !defined(WITHOUT_CLANG) +MK_CLANG=yes +.endif +.else +.if !defined(WITH_CLANG) +MK_CLANG=no +.endif +.endif + # We must do share/info early so that installation of info `dir' # entries works correctly. Do it first since it is less likely to # grow dependencies on include and lib than vice versa. @@ -970,11 +984,11 @@ _gensnmptree= usr.sbin/bsnmpd/gensnmptree _crunchgen= usr.sbin/crunch/crunchgen .endif -# XXX: There is no way to specify bootstrap tools depending on MK-flags -# with different per-architecture default values. Always build tblgen. +.if ${MK_CLANG} != "no" _clang_tblgen= \ lib/clang/libllvmsupport \ usr.bin/clang/tblgen +.endif .if ${MK_CDDL} != "no" _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ |