mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Remove -Werror from all the default cflags.
I've recently been coming round in general to the idea that -Werror is fine for developers and centralised binary builds, but has too many unanticipated failure modes in the field (with everyone's different versions of compilers, headers etc) to leave turned on for the 'just download and build' source tarball that's supposed to work everywhere. On main, I've already made the change to hide it behind a cmake 'strict' setting. In particular, I've just done pre-release build tests with various versions of GTK, which reminded me that the GTK 2 installation on Ubuntu 20.04 fails to build at -Werror, because GTK's own header files have a warning-generating inconsistency. (glib/gtypes.h declares GTimeVal as deprecated, and then gtk/gtktooltips.h uses it anyway.) Clearly this is the kind of thing that ought not to break the build of a client application!
This commit is contained in:
parent
17371e0df0
commit
f3ee4dbe20
@ -10,7 +10,7 @@
|
||||
AC_INIT(putty, X.XX)
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_CONFIG_HEADERS([uxconfig.h:uxconfig.in])
|
||||
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
|
||||
AM_INIT_AUTOMAKE([-Wall foreign])
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
@ -198,7 +198,7 @@ AS_IF([test AS_VAR_GET(x_cv_linux_so_peercred) = yes],
|
||||
|
||||
if test "x$GCC" = "xyes"; then
|
||||
:
|
||||
AC_SUBST(WARNINGOPTS, ['-Wall -Werror -Wpointer-arith -Wvla'])
|
||||
AC_SUBST(WARNINGOPTS, ['-Wall -Wpointer-arith -Wvla'])
|
||||
else
|
||||
:
|
||||
AC_SUBST(WARNINGOPTS, [])
|
||||
|
@ -549,7 +549,7 @@ if (defined $makefiles{'clangcl'}) {
|
||||
(join " ", map {"-I$dirpfx$_"} @srcdirs) .
|
||||
" /D_WINDOWS /D_WIN32_WINDOWS=0x500 /DWINVER=0x500 ".
|
||||
"/D_CRT_SECURE_NO_WARNINGS /D_WINSOCK_DEPRECATED_NO_WARNINGS").
|
||||
" -Werror \$(PLATFORMCFLAGS)\n".
|
||||
" \$(PLATFORMCFLAGS)\n".
|
||||
"LFLAGS = /incremental:no /dynamicbase /nxcompat\n".
|
||||
&splitline("RCPPFLAGS = ".(join " ", map {"-I$dirpfx$_"} @srcdirs).
|
||||
" -DWIN32 -D_WIN32 -DWINVER=0x0400")." \$(RCFL)\n".
|
||||
@ -1425,7 +1425,7 @@ if (defined $makefiles{'gtk'}) {
|
||||
"\n".
|
||||
"unexport CFLAGS # work around a weird issue with krb5-config\n".
|
||||
"\n".
|
||||
&splitline("CFLAGS = -O2 -Wall -Werror -std=gnu99 -Wvla -g " .
|
||||
&splitline("CFLAGS = -O2 -Wall -std=gnu99 -Wvla -g " .
|
||||
(join " ", map {"-I$dirpfx$_"} @srcdirs) .
|
||||
" \$(shell \$(GTK_CONFIG) --cflags)").
|
||||
" -D _FILE_OFFSET_BITS=64\n".
|
||||
@ -1506,7 +1506,7 @@ if (defined $makefiles{'unix'}) {
|
||||
"\n".
|
||||
"unexport CFLAGS # work around a weird issue with krb5-config\n".
|
||||
"\n".
|
||||
&splitline("CFLAGS = -O2 -Wall -Werror -std=gnu99 -Wvla -g " .
|
||||
&splitline("CFLAGS = -O2 -Wall -std=gnu99 -Wvla -g " .
|
||||
(join " ", map {"-I$dirpfx$_"} @srcdirs)).
|
||||
" -D _FILE_OFFSET_BITS=64\n".
|
||||
"ULDFLAGS = \$(LDFLAGS)\n".
|
||||
@ -1748,7 +1748,7 @@ if (defined $makefiles{'osx'}) {
|
||||
print
|
||||
"CC = \$(TOOLPATH)gcc\n".
|
||||
"\n".
|
||||
&splitline("CFLAGS = -O2 -Wall -Werror -std=gnu99 -Wvla -g " .
|
||||
&splitline("CFLAGS = -O2 -Wall -std=gnu99 -Wvla -g " .
|
||||
(join " ", map {"-I$dirpfx$_"} @srcdirs))."\n".
|
||||
"MLDFLAGS = -framework Cocoa\n".
|
||||
"ULDFLAGS =\n".
|
||||
|
Loading…
Reference in New Issue
Block a user