mirror of
https://github.com/curl/curl.git
synced 2026-06-05 14:54:14 +03:00
build: fix -Wtrampolines picky warning for gcc 4.x versions
Caused an error when using cmake with gcc 4.4 and 4.5. Also 4.3 when using autotools. Seen with GNU 4.4.0 in CeGCC 0.59.1: ``` cc1: error: unrecognized command line option "-Wtrampolines" ``` `-Wtrampolines` requires gcc 4.6 or upper. Ref: https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Warning-Options.html Ref: https://master.dl.sourceforge.net/project/cegcc/cegcc/0.59.1/cegcc_mingw32ce_snowleopard_r1397.tar.bz2 Closes #15962
This commit is contained in:
parent
fdc588dc10
commit
95658f9ca3
2 changed files with 3 additions and 2 deletions
|
|
@ -1030,7 +1030,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [type-limits old-style-declaration])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-parameter-type empty-body])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [clobbered ignored-qualifiers])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [conversion trampolines])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [conversion])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sign-conversion])
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-error=sign-conversion"
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [vla])
|
||||
|
|
@ -1055,6 +1055,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
dnl Only gcc 4.6 or later
|
||||
if test "$compiler_num" -ge "406"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [double-promotion])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [trampolines])
|
||||
fi
|
||||
#
|
||||
dnl only gcc 4.8 or later
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue