Module Name:    src
Committed By:   adam
Date:           Wed May 18 13:08:14 UTC 2011

Modified Files:
        src/share/mk: bsd.own.mk

Log Message:
Add support for LLVM/Clang


To generate a diff of this commit:
cvs rdiff -u -r1.664 -r1.665 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.664 src/share/mk/bsd.own.mk:1.665
--- src/share/mk/bsd.own.mk:1.664	Mon May  9 14:36:48 2011
+++ src/share/mk/bsd.own.mk	Wed May 18 13:08:14 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.664 2011/05/09 14:36:48 haad Exp $
+#	$NetBSD: bsd.own.mk,v 1.665 2011/05/18 13:08:14 adam Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -47,7 +47,7 @@
 TOOLCHAIN_MISSING?=	no
 
 # default to GCC4
-.if !defined(HAVE_GCC) && !defined(HAVE_PCC)
+.if !defined(HAVE_GCC) && !defined(HAVE_PCC) && !defined(HAVE_LLVM)
 HAVE_GCC=	4
 .endif
 
@@ -207,6 +207,14 @@
 OBJC=		false
 .endif
 
+.if defined(HAVE_LLVM) && ${USETOOLS_LLVM:Uyes} == "yes"
+CC=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
+CPP=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
+CXX=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++
+FC=		false
+OBJC=		${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
+.endif
+
 #
 # Make sure DESTDIR is set, so that builds with these tools always
 # get appropriate -nostdinc, -nostdlib, etc. handling.  The default is

Reply via email to