summaryrefslogtreecommitdiff
path: root/tools/Makefile.gnuhost
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2018-10-21 00:26:24 +0000
committerchristos <christos@NetBSD.org>2018-10-21 00:26:24 +0000
commitacae09ddcb1c0a4531f728459bbcfd2f63452d39 (patch)
treeafc410595f909c1119937b059cf81c9603dfb899 /tools/Makefile.gnuhost
parent4cff44514e0f388387cd20e01d429b5813035629 (diff)
detect clang instead of bundling it with Darwin
Diffstat (limited to 'tools/Makefile.gnuhost')
-rw-r--r--tools/Makefile.gnuhost5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/Makefile.gnuhost b/tools/Makefile.gnuhost
index 5d5a0fe7680..318bf375d04 100644
--- a/tools/Makefile.gnuhost
+++ b/tools/Makefile.gnuhost
@@ -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