Skip to content

Commit

Permalink
Configure: fixed clang detection on MINIX.
Browse files Browse the repository at this point in the history
As per POSIX, basic regular expressions have no alternations, and the
interpretation of the "\|" construct is undefined.  At least on MINIX
and Solaris grep interprets "\|" as literal "|", and not as an alternation
as GNU grep does.  Removed such constructs introduced in f1daa0356a1d.
This fixes clang detection on MINIX.
  • Loading branch information
mdounin committed Nov 23, 2017
1 parent 3656f2e commit 7a7fc70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion auto/cc/clang
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# clang


NGX_CLANG_VER=`$CC -v 2>&1 | grep '\(clang\|LLVM\) version' 2>&1 \
NGX_CLANG_VER=`$CC -v 2>&1 | grep 'version' 2>&1 \
| sed -e 's/^.* version \(.*\)/\1/'`

echo " + clang version: $NGX_CLANG_VER"
Expand Down
6 changes: 5 additions & 1 deletion auto/cc/name
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ elif `$CC -v 2>&1 | grep 'gcc version' >/dev/null 2>&1`; then
NGX_CC_NAME=gcc
echo " + using GNU C compiler"

elif `$CC -v 2>&1 | grep '\(clang\|LLVM\) version' >/dev/null 2>&1`; then
elif `$CC -v 2>&1 | grep 'clang version' >/dev/null 2>&1`; then
NGX_CC_NAME=clang
echo " + using Clang C compiler"

elif `$CC -v 2>&1 | grep 'LLVM version' >/dev/null 2>&1`; then
NGX_CC_NAME=clang
echo " + using Clang C compiler"

Expand Down

0 comments on commit 7a7fc70

Please sign in to comment.