diff mbox

[RFC] configure: Enable -Werror for MinGW builds, too

Message ID 1465373606-18486-1-git-send-email-thuth@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Huth June 8, 2016, 8:13 a.m. UTC
MinGW seems to compile currently without warnings, so it should
be safe to enable -Werror now for this environment, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 ... 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(-)

Comments

Daniel P. Berrangé June 8, 2016, 8:45 a.m. UTC | #1
On Wed, Jun 08, 2016 at 10:13:26AM +0200, Thomas Huth wrote:
> MinGW seems to compile currently without warnings, so it should
> be safe to enable -Werror now for this environment, too.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  ... 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.

> 
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 4627d2c..2e5b818 100755
> --- a/configure
> +++ b/configure
> @@ -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"

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>

Regards,
Daniel
Stefan Hajnoczi June 8, 2016, 2:09 p.m. UTC | #2
On Wed, Jun 08, 2016 at 10:13:26AM +0200, Thomas Huth wrote:
> MinGW seems to compile currently without warnings, so it should
> be safe to enable -Werror now for this environment, too.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  ... 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.

Tested-by: Stefan Hajnoczi <stefanha@redhat.com>
Peter Maydell June 8, 2016, 6:55 p.m. UTC | #3
On 8 June 2016 at 15:09, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> On Wed, Jun 08, 2016 at 10:13:26AM +0200, Thomas Huth wrote:
>> MinGW seems to compile currently without warnings, so it should
>> be safe to enable -Werror now for this environment, too.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  ... 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.
>
> Tested-by: Stefan Hajnoczi <stefanha@redhat.com>

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
Stefan Weil June 8, 2016, 7:52 p.m. UTC | #4
Am 08.06.2016 um 20:55 schrieb Peter Maydell:
> On 8 June 2016 at 15:09, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>> On Wed, Jun 08, 2016 at 10:13:26AM +0200, Thomas Huth wrote:
>>> MinGW seems to compile currently without warnings, so it should
>>> be safe to enable -Werror now for this environment, too.
>>>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>> ---
>>>  ... 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.
>>
>> Tested-by: Stefan Hajnoczi <stefanha@redhat.com>
> 
> 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
diff mbox

Patch

diff --git a/configure b/configure
index 4627d2c..2e5b818 100755
--- a/configure
+++ b/configure
@@ -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"