[PATCH] rpm: ensure -Werror is disabled for mingw builds

Daniel P. Berrangé posted 1 patch 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20240605124715.422511-1-berrange@redhat.com
libvirt.spec.in | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[PATCH] rpm: ensure -Werror is disabled for mingw builds
Posted by Daniel P. Berrangé 3 months ago
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 libvirt.spec.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 0f3c882f05..1d3240ee6f 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1485,8 +1485,9 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec)
   -Dtests=disabled \
   -Dudev=disabled \
   -Dwireshark_dissector=disabled \
-  -Dyajl=disabled
-    %mingw_ninja
+  -Dyajl=disabled \
+  %{?enable_werror}
+%mingw_ninja
 %endif
 
 %install
-- 
2.43.0
Re: [PATCH] rpm: ensure -Werror is disabled for mingw builds
Posted by Pavel Hrdina 3 months ago
On Wed, Jun 05, 2024 at 01:47:15PM +0100, Daniel P. Berrangé wrote:
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  libvirt.spec.in | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index 0f3c882f05..1d3240ee6f 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -1485,8 +1485,9 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec)
>    -Dtests=disabled \
>    -Dudev=disabled \
>    -Dwireshark_dissector=disabled \
> -  -Dyajl=disabled
> -    %mingw_ninja
> +  -Dyajl=disabled \
> +  %{?enable_werror}
> +%mingw_ninja
>  %endif

I would note in commit message that this copies the behavior of
non-mingw build and it is disabled for non RHEL distro.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>