Use the __clang__ preprocessor symbol to check for clang, since --version
might barf. From joerg@
This commit is contained in:
parent
1a388484b9
commit
622f49cc74
@ -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 @@ HOST_CFLAGS+=-O2 -no-cpp-precomp
|
||||
.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
|
||||
|
Loading…
Reference in New Issue
Block a user