Module Name: src
Committed By: christos
Date: Sun Oct 21 00:26:24 UTC 2018
Modified Files:
src/tools: Makefile.gnuhost
Log Message:
detect clang instead of bundling it with Darwin
To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/tools/Makefile.gnuhost
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tools/Makefile.gnuhost
diff -u src/tools/Makefile.gnuhost:1.49 src/tools/Makefile.gnuhost:1.50
--- src/tools/Makefile.gnuhost:1.49 Sun Oct 14 06:23:32 2018
+++ src/tools/Makefile.gnuhost Sat Oct 20 20:26:24 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.gnuhost,v 1.49 2018/10/14 10:23:32 martin Exp $
+# $NetBSD: Makefile.gnuhost,v 1.50 2018/10/21 00:26:24 christos Exp $
#
# Rules used when building a GNU host package. Expects MODULE to be set.
#
@@ -19,7 +19,8 @@
# Disable use of pre-compiled headers on Darwin.
BUILD_OSTYPE!= uname -s
-.if ${BUILD_OSTYPE} == "Darwin"
+HOST_COMPILER_CLANG != if ${HOST_CC} --version | grep -q -s clang; then echo yes; else echo no; fi
+.if ${HOST_COMPILER_CLANG} == "yes"
HOST_CFLAGS+=-O2 -no-cpp-precomp
.endif