[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 65/208: curl-compilers.m4: fix unknown-warning-opti
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 65/208: curl-compilers.m4: fix unknown-warning-option on Apple clang |
Date: |
Wed, 09 Aug 2017 17:34:22 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.55.0
in repository gnurl.
commit e5d6aa8d613e892b513fa8224aa96d2a5008274f
Author: Marcel Raad <address@hidden>
AuthorDate: Fri Jun 23 01:28:17 2017 +0200
curl-compilers.m4: fix unknown-warning-option on Apple clang
Since 5598b0bd63f690c151074494ce47ef872f004ab4, clang -v is used to
detect the clang version. The version number was expected to come after
the word "version". For Apple clang, this doesn't work as it has its
own versioning scheme.
The version number is now first searched after the string
"based on LLVM". This works for Apple clang before version 7, and also
for e.g. Ubuntu's clang up to version 3.7. If it's not found and the
version string contains "Apple LLVM version", clang version 3.7 is
assumed, which is the version that comes with Xcode 7. Otherwise, the
version number is still expected after the word "version", which works
for very old Apple clang versions.
Ref: https://trac.macports.org/wiki/XcodeVersionInfo
Fixes https://github.com/curl/curl/issues/1606
Closes https://github.com/curl/curl/pull/1607
---
m4/curl-compilers.m4 | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index a1801df97..dcd96ed54 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -84,7 +84,16 @@ AC_DEFUN([CURL_CHECK_COMPILER_CLANG], [
if test "$curl_cv_have_def___clang__" = "yes"; then
AC_MSG_RESULT([yes])
compiler_id="CLANG"
- clangver=`$CC -v 2>&1 | grep version | "$SED" 's/.*version
\(@<:@0-9@:>@*\.@<:@0-9@:>@*\).*/\1/'`
+ fullclangver=`$CC -v 2>&1 | grep version`
+ clangver=`echo $fullclangver | grep "based on LLVM " | "$SED" 's/.*(based
on LLVM \(@<:@0-9@:>@*\.@<:@0-9@:>@*\).*)/\1/'`
+ if test -z "$clangver"; then
+ if echo $fullclangver | grep "Apple LLVM version " >/dev/null; then
+ dnl Starting with XCode 7 / clang 3.7, Apple clang won't tell its
upstream version
+ clangver=`3.7`
+ else
+ clangver=`echo $fullclangver | "$SED" 's/.*version
\(@<:@0-9@:>@*\.@<:@0-9@:>@*\).*/\1/'`
+ fi
+ fi
clangvhi=`echo $clangver | cut -d . -f1`
clangvlo=`echo $clangver | cut -d . -f2`
compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null`
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 205/208: docs/comments: Update to secure URL versions, (continued)
- [GNUnet-SVN] [gnurl] 205/208: docs/comments: Update to secure URL versions, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 56/208: travis: enable typecheck-gcc warnings, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 55/208: typecheck-gcc: add support for CURLINFO_OFF_T, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 199/208: tftp: reject file name lengths that don't fit, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 111/208: asyn-thread.c: fix unused variable warnings on macOS, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 190/208: FTP: skip unnecessary CWD when in nocwd mode, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 63/208: CURLINFO_REDIRECT_URL.3: mention the CURLOPT_MAXREDIRS case, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 157/208: darwinssl: fix variable type mistake (regression), gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 143/208: travis: enable warnings also in release mode, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 01/208: includes: remove curl/curlbuild.h and curl/curlrules.h, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 65/208: curl-compilers.m4: fix unknown-warning-option on Apple clang,
gnunet <=
- [GNUnet-SVN] [gnurl] 90/208: gtls: fix build when sizeof(long) < sizeof(void *), gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 120/208: test1452: add telnet negotiation, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 96/208: test1451: add SMB support to the testbed, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 26/208: HTTPS-Proxy: don't offer h2 for https proxy connections, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 155/208: checksrc: escape open brace in regex, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 147/208: rtspd: fix MSVC level 4 warning, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 64/208: progress: fix "time spent", broke in adef394ac, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 162/208: splay: fix signed/unsigned mismatch warning, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 204/208: configure: fix recv/send/select detection on Android, gnunet, 2017/08/09
- [GNUnet-SVN] [gnurl] 186/208: darwin: silence compiler warnings, gnunet, 2017/08/09