All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Improve FreeBSD and macOS jobs in the Cirrus-CI
@ 2020-07-28  7:44 Thomas Huth
  2020-07-28  7:44 ` [PATCH v2 1/4] configure: Fix atomic64 test for --enable-werror on macOS Thomas Huth
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Thomas Huth @ 2020-07-28  7:44 UTC (permalink / raw)
  To: qemu-devel, Alex Bennée
  Cc: Peter Maydell, Christian Schoenebeck, Ed Maste, Li-Wen Hsu,
	Daniel P . Berrangé

Our configure script does not enable -Werror on macOS and FreeBSD
by default yet. That's bad in the CI, since we might miss compiler
warnings and thus bugs this way. So after fixing a problem in the
configure script in the first patch, we now turn on -Werror here
in the second and third patch. The fourth patch is just a cosmetical
one, since Cirrus-CI seems to upgrade all jobs automatically to
Cataline these days.

v2:
 - Split the -Werror enablement patch into two, one for FreeBSD and
   one for macOS
 - Use -Wno-error=deprecated-declarations instead of --disable-sasl
   on macOS to work-around the deprecation messages from Apple.

Thomas Huth (4):
  configure: Fix atomic64 test for --enable-werror on macOS
  cirrus.yml: Compile FreeBSD with -Werror
  cirrus.yml: Compile macOS with -Werror
  cirrus.yml: Update the macOS jobs to Catalina

 .cirrus.yml | 13 ++++++++-----
 configure   | 10 +++++-----
 2 files changed, 13 insertions(+), 10 deletions(-)

-- 
2.18.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/4] configure: Fix atomic64 test for --enable-werror on macOS
  2020-07-28  7:44 [PATCH v2 0/4] Improve FreeBSD and macOS jobs in the Cirrus-CI Thomas Huth
@ 2020-07-28  7:44 ` Thomas Huth
  2020-07-28  7:44 ` [PATCH v2 2/4] cirrus.yml: Compile FreeBSD with -Werror Thomas Huth
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2020-07-28  7:44 UTC (permalink / raw)
  To: qemu-devel, Alex Bennée
  Cc: Peter Maydell, Christian Schoenebeck, Ed Maste, Li-Wen Hsu,
	Daniel P . Berrangé

When using --enable-werror for the macOS builders in the Cirrus-CI,
the atomic64 test is currently failing, and config.log shows a bunch
of error messages like this:

 config-temp/qemu-conf.c:6:7: error: implicit declaration of function
 '__atomic_load_8' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  y = __atomic_load_8(&x, 0);
      ^
 config-temp/qemu-conf.c:6:7: error: this function declaration is not a
 prototype [-Werror,-Wstrict-prototypes]

Seems like these __atomic_*_8 functions are available in one of the
libraries there, so that the test links and passes there when not
using --enable-werror. But there does not seem to be a valid prototype
for them in any of the header files, so that the test fails when using
--enable-werror.

Fix it by using the "official" built-in functions instead (see e.g.
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html).
We are not using the *_8 variants in QEMU anyway.

Suggested-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 configure | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 2acc4d1465..6fbc72c794 100755
--- a/configure
+++ b/configure
@@ -5919,11 +5919,11 @@ int main(void)
 {
   uint64_t x = 0, y = 0;
 #ifdef __ATOMIC_RELAXED
-  y = __atomic_load_8(&x, 0);
-  __atomic_store_8(&x, y, 0);
-  __atomic_compare_exchange_8(&x, &y, x, 0, 0, 0);
-  __atomic_exchange_8(&x, y, 0);
-  __atomic_fetch_add_8(&x, y, 0);
+  y = __atomic_load_n(&x, __ATOMIC_RELAXED);
+  __atomic_store_n(&x, y, __ATOMIC_RELAXED);
+  __atomic_compare_exchange_n(&x, &y, x, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+  __atomic_exchange_n(&x, y, __ATOMIC_RELAXED);
+  __atomic_fetch_add(&x, y, __ATOMIC_RELAXED);
 #else
   typedef char is_host64[sizeof(void *) >= sizeof(uint64_t) ? 1 : -1];
   __sync_lock_test_and_set(&x, y);
-- 
2.18.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/4] cirrus.yml: Compile FreeBSD with -Werror
  2020-07-28  7:44 [PATCH v2 0/4] Improve FreeBSD and macOS jobs in the Cirrus-CI Thomas Huth
  2020-07-28  7:44 ` [PATCH v2 1/4] configure: Fix atomic64 test for --enable-werror on macOS Thomas Huth
@ 2020-07-28  7:44 ` Thomas Huth
  2020-07-28 10:05   ` Daniel P. Berrangé
  2020-07-28  7:44 ` [PATCH v2 3/4] cirrus.yml: Compile macOS " Thomas Huth
  2020-07-28  7:44 ` [PATCH v2 4/4] cirrus.yml: Update the macOS jobs to Catalina Thomas Huth
  3 siblings, 1 reply; 8+ messages in thread
From: Thomas Huth @ 2020-07-28  7:44 UTC (permalink / raw)
  To: qemu-devel, Alex Bennée
  Cc: Peter Maydell, Christian Schoenebeck, Ed Maste, Li-Wen Hsu,
	Daniel P . Berrangé

Compiler warnings currently go unnoticed in our FreeBSD builds, since
-Werror is only enabled for Linux and MinGW builds by default. So let's
enable them here now, too.

Reviewed-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .cirrus.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index f287d23c5b..b50da72eec 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -12,7 +12,7 @@ freebsd_12_task:
   script:
     - mkdir build
     - cd build
-    - ../configure || { cat config.log; exit 1; }
+    - ../configure --enable-werror || { cat config.log; exit 1; }
     - gmake -j8
     - gmake V=1 check
 
-- 
2.18.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 3/4] cirrus.yml: Compile macOS with -Werror
  2020-07-28  7:44 [PATCH v2 0/4] Improve FreeBSD and macOS jobs in the Cirrus-CI Thomas Huth
  2020-07-28  7:44 ` [PATCH v2 1/4] configure: Fix atomic64 test for --enable-werror on macOS Thomas Huth
  2020-07-28  7:44 ` [PATCH v2 2/4] cirrus.yml: Compile FreeBSD with -Werror Thomas Huth
@ 2020-07-28  7:44 ` Thomas Huth
  2020-07-28 10:04   ` Daniel P. Berrangé
  2020-07-28  7:44 ` [PATCH v2 4/4] cirrus.yml: Update the macOS jobs to Catalina Thomas Huth
  3 siblings, 1 reply; 8+ messages in thread
From: Thomas Huth @ 2020-07-28  7:44 UTC (permalink / raw)
  To: qemu-devel, Alex Bennée
  Cc: Peter Maydell, Christian Schoenebeck, Ed Maste, Li-Wen Hsu,
	Daniel P . Berrangé

Compiler warnings currently go unnoticed in our macOS builds, since -Werror
is only enabled for Linux and MinGW builds by default. So let's enable them
here now, too.
Unfortunately, the sasl header is marked as deprecated in the macOS headers
and thus generates a lot of deprecation warnings. Thus we have to also use
-Wno-error=deprecated-declarations to be able to compile the code here.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .cirrus.yml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index b50da72eec..86a059c12f 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -24,7 +24,9 @@ macos_task:
   script:
     - mkdir build
     - cd build
-    - ../configure --python=/usr/local/bin/python3 || { cat config.log; exit 1; }
+    - ../configure --python=/usr/local/bin/python3 --enable-werror
+                   --extra-cflags='-Wno-error=deprecated-declarations'
+                   || { cat config.log; exit 1; }
     - gmake -j$(sysctl -n hw.ncpu)
     - gmake check
 
@@ -37,6 +39,7 @@ macos_xcode_task:
   script:
     - mkdir build
     - cd build
-    - ../configure --cc=clang || { cat config.log; exit 1; }
+    - ../configure --extra-cflags='-Wno-error=deprecated-declarations'
+                   --enable-werror --cc=clang || { cat config.log; exit 1; }
     - gmake -j$(sysctl -n hw.ncpu)
     - gmake check
-- 
2.18.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 4/4] cirrus.yml: Update the macOS jobs to Catalina
  2020-07-28  7:44 [PATCH v2 0/4] Improve FreeBSD and macOS jobs in the Cirrus-CI Thomas Huth
                   ` (2 preceding siblings ...)
  2020-07-28  7:44 ` [PATCH v2 3/4] cirrus.yml: Compile macOS " Thomas Huth
@ 2020-07-28  7:44 ` Thomas Huth
  2020-07-28 10:04   ` Daniel P. Berrangé
  3 siblings, 1 reply; 8+ messages in thread
From: Thomas Huth @ 2020-07-28  7:44 UTC (permalink / raw)
  To: qemu-devel, Alex Bennée
  Cc: Peter Maydell, Christian Schoenebeck, Ed Maste, Li-Wen Hsu,
	Daniel P . Berrangé

When looking at the CI jobs on cirrus-ci.com, it seems like the mojave-based
images have been decomissioned a while ago already, since apparently all our
jobs get automatically upgraded to catalina. So let's update our YML script
accordingly to avoid confusion.

Reviewed-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .cirrus.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index 86a059c12f..0742aaf8a3 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -18,7 +18,7 @@ freebsd_12_task:
 
 macos_task:
   osx_instance:
-    image: mojave-base
+    image: catalina-base
   install_script:
     - brew install pkg-config python gnu-sed glib pixman make sdl2 bash
   script:
@@ -33,7 +33,7 @@ macos_task:
 macos_xcode_task:
   osx_instance:
     # this is an alias for the latest Xcode
-    image: mojave-xcode
+    image: catalina-xcode
   install_script:
     - brew install pkg-config gnu-sed glib pixman make sdl2 bash
   script:
-- 
2.18.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 3/4] cirrus.yml: Compile macOS with -Werror
  2020-07-28  7:44 ` [PATCH v2 3/4] cirrus.yml: Compile macOS " Thomas Huth
@ 2020-07-28 10:04   ` Daniel P. Berrangé
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel P. Berrangé @ 2020-07-28 10:04 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Peter Maydell, Ed Maste, Christian Schoenebeck, qemu-devel,
	Alex Bennée, Li-Wen Hsu

On Tue, Jul 28, 2020 at 09:44:04AM +0200, Thomas Huth wrote:
> Compiler warnings currently go unnoticed in our macOS builds, since -Werror
> is only enabled for Linux and MinGW builds by default. So let's enable them
> here now, too.
> Unfortunately, the sasl header is marked as deprecated in the macOS headers
> and thus generates a lot of deprecation warnings. Thus we have to also use
> -Wno-error=deprecated-declarations to be able to compile the code here.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  .cirrus.yml | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

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

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 4/4] cirrus.yml: Update the macOS jobs to Catalina
  2020-07-28  7:44 ` [PATCH v2 4/4] cirrus.yml: Update the macOS jobs to Catalina Thomas Huth
@ 2020-07-28 10:04   ` Daniel P. Berrangé
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel P. Berrangé @ 2020-07-28 10:04 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Peter Maydell, Ed Maste, Christian Schoenebeck, qemu-devel,
	Alex Bennée, Li-Wen Hsu

On Tue, Jul 28, 2020 at 09:44:05AM +0200, Thomas Huth wrote:
> When looking at the CI jobs on cirrus-ci.com, it seems like the mojave-based
> images have been decomissioned a while ago already, since apparently all our
> jobs get automatically upgraded to catalina. So let's update our YML script
> accordingly to avoid confusion.
> 
> Reviewed-by: Ed Maste <emaste@freebsd.org>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  .cirrus.yml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

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


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/4] cirrus.yml: Compile FreeBSD with -Werror
  2020-07-28  7:44 ` [PATCH v2 2/4] cirrus.yml: Compile FreeBSD with -Werror Thomas Huth
@ 2020-07-28 10:05   ` Daniel P. Berrangé
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel P. Berrangé @ 2020-07-28 10:05 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Peter Maydell, Ed Maste, Christian Schoenebeck, qemu-devel,
	Alex Bennée, Li-Wen Hsu

On Tue, Jul 28, 2020 at 09:44:03AM +0200, Thomas Huth wrote:
> Compiler warnings currently go unnoticed in our FreeBSD builds, since
> -Werror is only enabled for Linux and MinGW builds by default. So let's
> enable them here now, too.
> 
> Reviewed-by: Ed Maste <emaste@freebsd.org>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  .cirrus.yml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-07-28 10:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28  7:44 [PATCH v2 0/4] Improve FreeBSD and macOS jobs in the Cirrus-CI Thomas Huth
2020-07-28  7:44 ` [PATCH v2 1/4] configure: Fix atomic64 test for --enable-werror on macOS Thomas Huth
2020-07-28  7:44 ` [PATCH v2 2/4] cirrus.yml: Compile FreeBSD with -Werror Thomas Huth
2020-07-28 10:05   ` Daniel P. Berrangé
2020-07-28  7:44 ` [PATCH v2 3/4] cirrus.yml: Compile macOS " Thomas Huth
2020-07-28 10:04   ` Daniel P. Berrangé
2020-07-28  7:44 ` [PATCH v2 4/4] cirrus.yml: Update the macOS jobs to Catalina Thomas Huth
2020-07-28 10:04   ` Daniel P. Berrangé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.