Skip to contentSkip to conversation

configure: Enable -Werror for MinGW builds, too

RFC PATCH In review Thomas Huth 5 participants 5 messages Jun 8, 2016

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 configure: Enable -Werror for MinGW builds, too

MinGW seems to compile currently without warnings, so it should be safe to enable -Werror now for this environment, too.

---
... at least it compiles without errors for me here. I hope that's also true for different versions of MinGW ... would be great if everybody who has such a compiler installed could give it a try!

 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 4627d2c..2e5b818 100755
@@ -1393,7 +1393,7 @@ z_version=$(cut -f3 -d. $source_path/VERSION)
 
 if test -z "$werror" ; then
     if test -d "$source_path/.git" -a \
-        "$linux" = "yes" ; then
+        \( "$linux" = "yes" -o "$mingw32" = "yes" \) ; then
         werror="yes"
     else
         werror="no"
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Thomas Huth

MinGW seems to compile currently without warnings, so it should be safe to enable -Werror now for this environment, too.

---
... at least it compiles without errors for me here. I hope that's also true for different versions of MinGW ... would be great if everybody who has such a compiler installed could give it a try!

Heh, I have created exactly the same patch locally myself a few months back after noticed that Mingw was now warning-free. I never got around to sending it for some reason :-) I confirm that it is still warning free today, on Fedora 23, x86_64 host.

Quoted 9 lines
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +0 -0
index 4627d2c..2e5b818 100755

configure z_version=$(cut -f3 -d. $source_path/VERSION) · line 1399

Quoted 8 lines
configure +1 -1
@@ -1393,7 +1393,7 @@ z_version=$(cut -f3 -d. $source_path/VERSION)
 
 if test -z "$werror" ; then
     if test -d "$source_path/.git" -a \
-        "$linux" = "yes" ; then
+        \( "$linux" = "yes" -o "$mingw32" = "yes" \) ; then
         werror="yes"
     else
         werror="no"

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
Tested-by on v1 1/1
#2 lore raw
In reply to Thomas Huth
Quoted 11 lines · Thomas Huth

MinGW seems to compile currently without warnings, so it should be safe to enable -Werror now for this environment, too.

---
... at least it compiles without errors for me here. I hope that's also true for different versions of MinGW ... would be great if everybody who has such a compiler installed could give it a try!

 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

mingw 5.2.0-1.fc23 does not produce any warnings anymore.

#3 lore raw
Quoted 10 lines · Stefan Hajnoczi
Quoted 9 lines · Thomas Huth

MinGW seems to compile currently without warnings, so it should be safe to enable -Werror now for this environment, too.

---
... at least it compiles without errors for me here. I hope that's also true for different versions of MinGW ... would be great if everybody who has such a compiler installed could give it a try!

Quoted 6 lines
Quoted 2 lines
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

mingw 5.2.0-1.fc23 does not produce any warnings anymore.

My w32/w64 builds need -Wno-unused-local-typedefs to build with -Werror, but that's the fault of the glib headers I build against and I already configure like that in order to use -Werror.

We should check whether we can enable -Werror for OSX too.

thanks
-- PMM

#4 lore raw

Am 08.06.2016 um 20:55 schrieb Peter Maydell:

Quoted 18 lines · Stefan Hajnoczi
Quoted 10 lines · Thomas Huth
Quoted 9 lines

MinGW seems to compile currently without warnings, so it should be safe to enable -Werror now for this environment, too.

---
... at least it compiles without errors for me here. I hope that's also true for different versions of MinGW ... would be great if everybody who has such a compiler installed could give it a try!

Quoted 6 lines
Quoted 2 lines
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

mingw 5.2.0-1.fc23 does not produce any warnings anymore.

Quoted 8 lines

My w32/w64 builds need -Wno-unused-local-typedefs to build with -Werror, but that's the fault of the glib headers I build against and I already configure like that in order to use -Werror.

We should check whether we can enable -Werror for OSX too.

thanks
-- PMM

The last time when I tried OS X there were some deprecation warnings. If those are fixed now we can enable -Werror for all target platforms (we could do that anyway because in case of problems it's always possible to disable it for individual builds).

Stefan