Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

src: Use the __clang__ preprocessor symbol to check for clang, s...



details:   https://anonhg.NetBSD.org/src/rev/14880aa3b877
branches:  trunk
changeset: 318260:14880aa3b877
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Apr 17 02:03:56 2018 +0000
description:
Use the __clang__ preprocessor symbol to check for clang, since --version
might barf. From joerg@

diffstat:

 tools/Makefile.gnuhost |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 1c3a600b14d1 -r 14880aa3b877 tools/Makefile.gnuhost
--- a/tools/Makefile.gnuhost    Mon Apr 16 22:33:28 2018 +0000
+++ b/tools/Makefile.gnuhost    Tue Apr 17 02:03:56 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.gnuhost,v 1.46 2018/04/15 21:50:38 christos Exp $
+#      $NetBSD: Makefile.gnuhost,v 1.47 2018/04/17 02:03:56 christos Exp $
 #
 # Rules used when building a GNU host package.  Expects MODULE to be set.
 #
@@ -24,7 +24,7 @@
 .endif
 
 # GCC build exceeds the clang default bracket nesting level of 256.
-HOST_COMPILER_CLANG != if ${HOST_CC} --version 2>&1 | grep -q -s clang; then echo yes; else echo no; fi
+HOST_COMPILER_CLANG != if echo __clang__ | ${HOST_CC} -E - | grep -q clang; then echo no; else echo yes; fi
 .if ${HOST_COMPILER_CLANG} == "yes"
 HOST_CFLAGS+= -fbracket-depth=512
 HOST_CXXFLAGS+= -fbracket-depth=512



Home | Main Index | Thread Index | Old Index