svn commit: r208076 - in projects/clangbsd-import: . share/mk usr.bin

Ed Schouten ed at FreeBSD.org
Fri May 14 14:34:23 UTC 2010


Author: ed
Date: Fri May 14 14:34:22 2010
New Revision: 208076
URL: http://svn.freebsd.org/changeset/base/208076

Log:
  Only enable Clang by default on amd64 and i386.

Modified:
  projects/clangbsd-import/Makefile.inc1
  projects/clangbsd-import/share/mk/bsd.own.mk
  projects/clangbsd-import/usr.bin/Makefile

Modified: projects/clangbsd-import/Makefile.inc1
==============================================================================
--- projects/clangbsd-import/Makefile.inc1	Fri May 14 14:26:56 2010	(r208075)
+++ projects/clangbsd-import/Makefile.inc1	Fri May 14 14:34:22 2010	(r208076)
@@ -956,12 +956,12 @@ _gensnmptree=	usr.sbin/bsnmpd/gensnmptre
 _crunchgen=	usr.sbin/crunch/crunchgen
 .endif
 
-.if ${MK_TOOLCHAIN} != "no" && ${MK_CLANG} != "no"
+# XXX: There is no way to specify bootstrap tools depending on MK-flags
+# with different per-architecture default values. Always build tblgen.
 _clang_tblgen= \
 	usr.bin/clang/lib/libllvmsupport \
 	usr.bin/clang/lib/libllvmsystem \
 	usr.bin/clang/bin/tblgen
-.endif
 
 .if ${MK_CDDL} != "no"
 _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \

Modified: projects/clangbsd-import/share/mk/bsd.own.mk
==============================================================================
--- projects/clangbsd-import/share/mk/bsd.own.mk	Fri May 14 14:26:56 2010	(r208075)
+++ projects/clangbsd-import/share/mk/bsd.own.mk	Fri May 14 14:34:22 2010	(r208076)
@@ -279,6 +279,17 @@ WITH_IDEA=
 .endif
 
 #
+# Default behaviour of MK_CLANG depends on the architecture.
+#
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
+_clang_yes=CLANG
+_clang_no=
+.else
+_clang_yes=
+_clang_no=CLANG
+.endif
+
+#
 # MK_* options which default to "yes".
 #
 .for var in \
@@ -305,7 +316,7 @@ WITH_IDEA=
     BZIP2 \
     CALENDAR \
     CDDL \
-    CLANG \
+    ${_clang_yes} \
     CPP \
     CRYPT \
     CTM \
@@ -408,6 +419,7 @@ MK_${var}:=	yes
     BIND_LIBS \
     BIND_SIGCHASE \
     BIND_XML \
+    ${_clang_no} \
     HESIOD \
     IDEA
 .if defined(WITH_${var}) && defined(WITHOUT_${var})
@@ -487,6 +499,7 @@ MK_GROFF:=	no
 .endif
 
 .if ${MK_TOOLCHAIN} == "no"
+MK_CLANG:=	no
 MK_GDB:=	no
 .endif
 

Modified: projects/clangbsd-import/usr.bin/Makefile
==============================================================================
--- projects/clangbsd-import/usr.bin/Makefile	Fri May 14 14:26:56 2010	(r208075)
+++ projects/clangbsd-import/usr.bin/Makefile	Fri May 14 14:34:22 2010	(r208076)
@@ -280,6 +280,10 @@ _cpio=		cpio
 _calendar=	calendar
 .endif
 
+.if ${MK_CLANG} != "no"
+_clang=		clang
+.endif
+
 .if ${MK_HESIOD} != "no"
 _hesinfo=	hesinfo
 .endif
@@ -349,9 +353,6 @@ _ul=		ul
 _ar=		ar
 _c89=		c89
 _c99=		c99
-.if ${MK_CLANG} != "no"
-_clang=		clang
-.endif
 _compile_et=	compile_et
 _ctags=		ctags
 _file2c=	file2c


More information about the svn-src-projects mailing list