1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

curl-compilers.m4: disable warning spam with Cygwin's clang

When building with Cygwin or MinGW, libtool uses a wrapper executable
instead of a wrapper script [1], which is written in C and throws
missing-variable-declarations warnings. Don't enable these warnings on
Cygwin and MinGW in order to avoid warnings for every executable built,
which spams the test suite output when using Cygwin's clang.

[1] https://www.gnu.org/software/libtool/manual/html_node/Wrapper-executables.html

Closes https://github.com/curl/curl/pull/1665
This commit is contained in:
Marcel Raad 2017-07-08 17:44:34 +02:00
parent af0216251b
commit deadb2348f
No known key found for this signature in database
GPG Key ID: 33C416EFAE4D6F02

View File

@ -903,7 +903,15 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
# #
dnl Only clang 3.2 or later dnl Only clang 3.2 or later
if test "$compiler_num" -ge "302"; then if test "$compiler_num" -ge "302"; then
case $host_os in
cygwin* | mingw*)
dnl skip missing-variable-declarations warnings for cygwin and
dnl mingw because the libtool wrapper executable causes them
;;
*)
tmp_CFLAGS="$tmp_CFLAGS -Wmissing-variable-declarations" tmp_CFLAGS="$tmp_CFLAGS -Wmissing-variable-declarations"
;;
esac
fi fi
# #
dnl Only clang 3.6 or later dnl Only clang 3.6 or later