Welcome! Log In Create A New Profile

Advanced

[nginx] Configure: fixed clang detection on MINIX.

Maxim Dounin
November 23, 2017 08:36AM
details: http://hg.nginx.org/nginx/rev/325b3042edd6
branches:
changeset: 7161:325b3042edd6
user: Maxim Dounin <mdounin@mdounin.ru>
date: Thu Nov 23 16:33:40 2017 +0300
description:
Configure: fixed clang detection on MINIX.

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.

diffstat:

auto/cc/clang | 2 +-
auto/cc/name | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)

diffs (28 lines):

diff --git a/auto/cc/clang b/auto/cc/clang
--- a/auto/cc/clang
+++ b/auto/cc/clang
@@ -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"
diff --git a/auto/cc/name b/auto/cc/name
--- a/auto/cc/name
+++ b/auto/cc/name
@@ -44,7 +44,11 @@ elif `$CC -v 2>&1 | grep 'gcc version' >
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"

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Configure: fixed clang detection on MINIX.

Maxim Dounin 520 November 23, 2017 08:36AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 306
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready