Mercurial > hg > nginx
changeset 7273:ceab908790c4
Configure: fixed clang version detection (closes #1539).
While 325b3042edd6 fixed it on MINIX, it broke it on systems
that output the word "version" on several lines with "cc -v".
The fix is to only consider "clang version" or "LLVM version"
as clang version, but this time only using sed(1).
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 24 Apr 2018 14:04:59 +0300 |
parents | fa0e093b64d7 |
children | 66aa2c1e82e6 |
files | auto/cc/clang |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/auto/cc/clang Tue May 08 19:35:56 2018 +0300 +++ b/auto/cc/clang Tue Apr 24 14:04:59 2018 +0300 @@ -6,7 +6,8 @@ NGX_CLANG_VER=`$CC -v 2>&1 | grep 'version' 2>&1 \ - | sed -e 's/^.* version \(.*\)/\1/'` + | sed -n -e 's/^.*clang version \(.*\)/\1/p' \ + -e 's/^.*LLVM version \(.*\)/\1/p'` echo " + clang version: $NGX_CLANG_VER"