From owner-svn-src-head@FreeBSD.ORG Wed Jun 9 19:57:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3E9E10656CD; Wed, 9 Jun 2010 19:57:20 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF96C8FC16; Wed, 9 Jun 2010 19:57:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o59JvKtw025127; Wed, 9 Jun 2010 19:57:20 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o59JvKbu025122; Wed, 9 Jun 2010 19:57:20 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201006091957.o59JvKbu025122@svn.freebsd.org> From: Roman Divacky Date: Wed, 9 Jun 2010 19:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208964 - in head: . etc/mtree lib share/mk usr.bin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2010 19:57:21 -0000 Author: rdivacky Date: Wed Jun 9 19:57:20 2010 New Revision: 208964 URL: http://svn.freebsd.org/changeset/base/208964 Log: Hook clang into the build on i386/amd64/powerpc. Approved by: ed (mentor) Modified: head/Makefile.inc1 head/etc/mtree/BSD.include.dist head/lib/Makefile head/share/mk/bsd.own.mk head/usr.bin/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jun 9 19:32:20 2010 (r208963) +++ head/Makefile.inc1 Wed Jun 9 19:57:20 2010 (r208964) @@ -956,6 +956,13 @@ _gensnmptree= usr.sbin/bsnmpd/gensnmptre _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. +_clang_tblgen= \ + lib/clang/libllvmsupport \ + lib/clang/libllvmsystem \ + usr.bin/clang/tblgen + .if ${MK_CDDL} != "no" _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge @@ -963,6 +970,7 @@ _dtrace_tools= cddl/usr.bin/sgsmsg cddl/ bootstrap-tools: .for _tool in \ + ${_clang_tblgen} \ ${_dtrace_tools} \ ${_strfile} \ ${_gperf} \ Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Wed Jun 9 19:32:20 2010 (r208963) +++ head/etc/mtree/BSD.include.dist Wed Jun 9 19:57:20 2010 (r208964) @@ -83,6 +83,10 @@ scsi .. .. + clang + 2.0 + .. + .. crypto .. dev Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Wed Jun 9 19:32:20 2010 (r208963) +++ head/lib/Makefile Wed Jun 9 19:57:20 2010 (r208964) @@ -108,7 +108,8 @@ SUBDIR= ${SUBDIR_ORDERED} \ libwrap \ liby \ libz \ - ${_bind} + ${_bind} \ + ${_clang} .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) _csu=csu/${MACHINE_ARCH}-elf @@ -137,6 +138,10 @@ _libsdp= libsdp _libbsnmp= libbsnmp .endif +.if ${MK_CLANG} != "no" +_clang= clang +.endif + .if ${MK_GPIB} != "no" _libgpib= libgpib .endif Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Wed Jun 9 19:32:20 2010 (r208963) +++ head/share/mk/bsd.own.mk Wed Jun 9 19:57:20 2010 (r208964) @@ -288,6 +288,18 @@ _no_fdt= FDT .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". # .for var in \ @@ -314,6 +326,7 @@ _no_fdt= FDT BZIP2 \ CALENDAR \ CDDL \ + ${_clang_yes} \ CPP \ CRYPT \ CTM \ @@ -417,6 +430,7 @@ MK_${var}:= yes BIND_LIBS \ BIND_SIGCHASE \ BIND_XML \ + ${_clang_no} \ ${_no_fdt} \ HESIOD \ IDEA @@ -497,6 +511,7 @@ MK_GROFF:= no .endif .if ${MK_TOOLCHAIN} == "no" +MK_CLANG:= no MK_GDB:= no .endif Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Wed Jun 9 19:32:20 2010 (r208963) +++ head/usr.bin/Makefile Wed Jun 9 19:57:20 2010 (r208964) @@ -35,6 +35,7 @@ SUBDIR= alias \ ${_chkey} \ chpass \ cksum \ + ${_clang} \ cmp \ col \ ${_colcrt} \ @@ -279,6 +280,10 @@ _cpio= cpio _calendar= calendar .endif +.if ${MK_CLANG} != "no" +_clang= clang +.endif + .if ${MK_HESIOD} != "no" _hesinfo= hesinfo .endif