Skip to content

Commit

Permalink
curl-compilers.m4: fix compiler_num for clang
Browse files Browse the repository at this point in the history
"clang -dumpversion" always returns "4.2.1", the GCC version that clang
was initially compatible to. Use "clang -v" instead, which returns the
actual clang version.

Fixes #1522
Closes #1523
  • Loading branch information
MarcelRaad committed Jun 1, 2017
1 parent c5de7f5 commit 5598b0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion m4/curl-compilers.m4
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_CLANG], [
if test "$curl_cv_have_def___clang__" = "yes"; then
AC_MSG_RESULT([yes])
compiler_id="CLANG"
clangver=`$CC -dumpversion`
clangver=`$CC -v 2>&1 | grep version | sed "s/.*version \([0-9]*\.[0-9]*\).*/\1/"`
clangvhi=`echo $clangver | cut -d . -f1`
clangvlo=`echo $clangver | cut -d . -f2`
compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null`
Expand Down

0 comments on commit 5598b0b

Please sign in to comment.