Source-Changes-HG archive

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

[src/trunk]: src/tools Use the __clang__ preprocessor symbol to check for cla...



details:   https://anonhg.NetBSD.org/src/rev/3df3289fcc09
branches:  trunk
changeset: 831848:3df3289fcc09
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 c6e190290a4b -r 3df3289fcc09 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