Commit Graph

91 Commits

Author SHA1 Message Date
Daniel Stenberg f8548e84ad
configure: use -Wno-varargs on clang 3.9[.X] debug builds
... to avoid a clang bug
2017-09-08 23:16:16 +02:00
Daniel Stenberg b5cc7dd360
m4/curl-compilers.m4: use proper quotes around string, not backticks
... when setting clang version to assume 3.7

Caused a lot of "integer expression expected" warnings by configure.
2017-08-16 00:05:11 +02:00
Marcel Raad deadb2348f
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
2017-07-10 10:16:29 +02:00
Marcel Raad e5d6aa8d61
curl-compilers.m4: fix unknown-warning-option on Apple clang
Since 5598b0bd63, 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
2017-06-24 11:10:38 +02:00
Marcel Raad 5bdf835c0b
curl-compilers.m4: enable comma clang warning
It usually warns when using commas instead of semicolons or other
operators by accident.

Closes https://github.com/curl/curl/pull/1578
2017-06-16 22:32:13 +02:00
Marcel Raad 32ec3063df
curl-compilers.m4: enable missing-variable-declarations clang warning
It usually warns when forgetting to declare TU-local variables static.

Closes https://github.com/curl/curl/pull/1578
2017-06-16 22:32:05 +02:00
Marcel Raad b5c5909f30
curl-compilers.m4: enable double-promotion warning
Enable -Wdouble-promotion for both GCC and clang. It warns on implicit
promotion from float to double.

Closes https://github.com/curl/curl/pull/1578
2017-06-16 22:31:57 +02:00
Marcel Raad 783ce023a5
curl-compilers.m4: enable vla warning for clang
Previously, that warning was only implicitly active in C90 mode.
Enable it unconditionally as already done for GCC.

Closes https://github.com/curl/curl/pull/1578
2017-06-16 22:31:48 +02:00
Marcel Raad 5e796c5e94
curl-compilers.m4: escape square brackets in regex
Otherwise, they are removed in the final configure file.
Also changed sed to "$SED" like in most other calls in this file.
2017-06-01 17:47:37 +02:00
Marcel Raad 5598b0bd63
curl-compilers.m4: fix compiler_num for clang
"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 https://github.com/curl/curl/issues/1522
Closes https://github.com/curl/curl/pull/1523
2017-06-01 08:48:05 +02:00
Marcel Raad 314a7fa3ce
curl-compilers.m4: enable -Wshift-sign-overflow for clang
clang 2.9+ supports -Wshift-sign-overflow, which warns about undefined
behavior on signed left shifts when shifting by too many places.

Ref: https://github.com/curl/curl/issues/1516
Closes https://github.com/curl/curl/pull/1517
2017-05-31 10:06:53 +02:00
Marcel Raad 71d2d37005
curl-compilers.m4: accept -Og and -Ofast GCC flags
-Og, introduced in GCC 4.8, optimizes for debugging experience.
-Ofast, introduced in GCC 4.7, builds on -O3 and enables further
optimizations breaking strict standards compliance.
When specified in CFLAGS, these were always overridden by -O0 or -O2.
Fix this by adding them to flags_opt_all.

Ref: https://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
Ref: https://github.com/curl/curl/pull/1404#issuecomment-296401570
Closes https://github.com/curl/curl/pull/1440
2017-04-24 10:56:56 +02:00
Marcel Raad 9168e2470d
curl-compilers.m4: turn implicit function declarations into errors
This adds -Werror-implicit-function-declaration for GCC 2.95+ so that
these errors are visible at the point where they occur instead of only
at link time.
Implicit function declarations are illegal in C99 and C++ anyway, and
the same warning has been turned into an error for ICC in commit
3072c5b8a1.

Ref: https://gcc.gnu.org/onlinedocs/gcc-2.95.2/gcc_2.html#SEC8
Ref: https://curl.haxx.se/mail/lib-2017-04/0001.html
Closes https://github.com/curl/curl/pull/1419
2017-04-15 21:17:56 +02:00
Daniel Stenberg 27302abb94 s/cURL/curl
We're mostly saying just "curl" in lower case these days so here's a big
cleanup to adapt to this reality. A few instances are left as the
project could still formally be considered called cURL.
2016-11-07 10:36:23 +01:00
Kamil Dudka b2dcf0347f curl-compilers.m4: improve detection of GCC's -fvisibility= flag
Some builds of GCC produce output on both stdout and stderr when --help
--verbose is used.  The 2>&1 redirection caused them to be arbitrarily
interleaved with each other because of stream buffering.  Consequently,
grep failed to match the fvisibility= string in the mixed output, even
though the string was present in GCC's standard output.

This led to silently disabling symbol hiding in some builds of curl.
2016-06-21 12:58:24 +02:00
Dan Fandrich 093f9cd38d URLs: Change more haxx.se URLs from http: to https: 2016-02-03 01:45:21 +01:00
Daniel Stenberg 4af40b3646 URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
Daniel Stenberg 092f33d6bf configure: use icc options without space
The latest version(s) of the icc compiler no longer accept the extra
space in the -we (warning enable), -wd (warning disable), etc.

Reported-by: Elmira A Semenova
Bug: http://curl.haxx.se/mail/lib-2013-09/0182.html
2013-09-27 10:57:20 +02:00
Daniel Stenberg 09634f46fb configure: improve CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH
The compiler test used a variable before it was assigned when it tried
to see how it acts on a mismatching prototype, which could cause a false
positive.
2013-09-07 11:15:18 +02:00
Yang Tse 70b5173410 configure: use XC_LIBTOOL for portability across libtool versions 2013-03-08 13:27:45 +01:00
Yang Tse 9d1effad05 configure: autotools compatibility fixes - step I
Fix proper macro expansion order across autotools versions for
C compiler and preprocessor program checks.
2013-01-20 20:23:20 +01:00
Yang Tse 57fa576a35 configure: check if compiler halts on function prototype mismatch 2012-12-16 18:51:51 +01:00
Daniel Stenberg c277bd6ce7 autoconf: don't force-disable compiler debug option
When nothing is told to configure, we should not enforce switching off
debug options with -g0 (or similar). We instead don't use -g at all in
that situaion and therefore allow the user's CFLAGS settings possibly
dictate what to do.
2012-11-16 13:06:49 +01:00
Yang Tse 60d5a16b99 curl-compilers.m4: remove -Wstrict-aliasing=3 from clang
Currently it is unknown if there is any version of clang that
actually supports -Wstrict-aliasing. What is known is that there
are several that don't support it.
2012-06-29 16:40:23 +02:00
Yang Tse f1474db360 curl-compilers.m4: -Wstrict-aliasing=3 for warning enabled gcc and clang builds 2012-06-26 21:24:30 +02:00
Yang Tse bd12c44d35 curl-compilers.m4: -Wno-pedantic-ms-format for Windows gcc 4.5 builds
When building a Windows target with gcc 4.5 or newer and strict compiler
warnings enabled use -Wno-pedantic-ms-format in addition to other flags.
2012-04-16 22:12:02 +02:00
Jonathan Nieder 8b63b48627 headers: surround GCC attribute names with double underscores
This protects from attribute names being defined by third party's code.

Improvement: http://curl.haxx.se/mail/lib-2012-04/0127.html
2012-04-14 15:06:57 +02:00
Yang Tse 9e24b9c7af build adjustments: CURL_HIDDEN_SYMBOLS no longer defined in config files
configure script now provides conditional definitions for Makefile.am
that result in CURL_HIDDEN_SYMBOLS being defined by resulting makefiles
when appropriate.

Additionally, configure script option for symbol hiding control is now
named --enable-symbol-hiding --disable-symbol-hiding. While still valid,
old option name --enable-hidden-symbols --disable-hidden-symbols will
be deprecated in some future release.
2012-04-11 19:33:54 +02:00
Yang Tse 3ef6418b61 curl-compilers.m4: serial number bump 2011-08-08 18:25:01 +02:00
Yang Tse 56ef3e295f curl-compilers.m4: CURL_CONVERT_INCLUDE_TO_ISYSTEM adjustments:
Add CURL_CHECK_COMPILER as a requirement.

Ensure macro does nothing unless GNU_C or CLANG compiler is used.

This should allow usage of this macro in unforeseen placements.
2011-08-08 17:50:16 +02:00
Yang Tse fba00c9f7b xlc: avoid preprocessor definition usage when linking 2011-06-04 04:27:09 +02:00
Yang Tse dd5d3518e4 configure: undo using autobuilds to temporarily verify strict aliasing warnings. 2010-12-02 19:09:15 +01:00
Yang Tse 1c4fa240be configure: use autobuilds to temporarily verify strict aliasing warnings.
Temporarily, When cross-compiling with gcc 3.0 or later, enable strict aliasing
rules and warnings. Given that cross-compiled targets autobuilds do not run the
2010-11-18 17:12:15 +01:00
Yang Tse 7cebf22d57 serial number bump 2010-11-09 01:40:25 +01:00
Daniel Stenberg 2309b4e330 remove the CVSish $Id$ lines 2010-03-24 11:02:54 +01:00
Daniel Johnson 3cd5b1cfb0 Fix warnings for clang 2010-03-22 19:44:45 +01:00
Yang Tse d9291eb4b8 replaced intel compiler option -no-ansi-alias with -fno-strict-aliasing 2010-03-17 10:44:28 +00:00
Daniel Stenberg f5d8c0befc Daniel Johnson provided fixes for building with the clang compiler 2010-03-05 22:53:30 +00:00
Dan Fandrich d3e35d49ae Added a few more compiler warning options for gcc. 2009-06-17 02:26:39 +00:00
Yang Tse 065047dc62 Added --enable-curldebug configure option to enable and disable building
with the low-level curl debug memory tracking 'feature' to allow decoupled
setting from --enable-debug.
2009-06-09 17:59:28 +00:00
Yang Tse f3e6a582d4 remove outdated comment 2009-05-15 09:35:46 +00:00
Yang Tse 7a928b40f3 Proper naming for the experimental compiler test and moved to *-compilers.m4 2009-05-07 13:58:15 +00:00
Yang Tse cfda3e6a48 Moved *_CHECK_COMPILER_HALT_ON_ERROR and *_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE to *-compilers.m4 along with other *_CHECK_COMPILER_* 2009-05-07 11:06:48 +00:00
Yang Tse f6b55fae79 remove compiler options used while debugging the icc 9.1 optimizer issue 2009-04-17 07:48:37 +00:00
Yang Tse 9bb1854398 Set HP-UX compiler warning level back to the one that exposes
the socklen_t issue on this platform.
2009-04-15 22:54:25 +00:00
Yang Tse c36f0e71b6 attempting to keep lines below 80 chars 2008-11-18 20:13:55 +00:00
Dan Fandrich 820011dedc Added more compiler warning options for gcc 4.3 2008-11-17 21:11:10 +00:00
Yang Tse d104216bbe icc adjustments:
Select ANSI C89 dialect plus GNU extensions, again.
2008-10-25 04:18:48 +00:00
Yang Tse 71edaf4d01 some more temporary magic for the icc seg-fault issue 2008-10-24 12:23:24 +00:00
Yang Tse 2b77d50776 icc permanent adjustment:
Select precise floating-point model, otherwise doubles are less than 64-bit wide

icc test adjustment:

  Select c89 dialect
2008-10-24 11:27:09 +00:00