All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/13] Remove GCC < 4.8 checks
@ 2020-12-10 13:47 ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	Marc-André Lureau, qemu-arm, Gerd Hoffmann, Stefan Hajnoczi,
	Paolo Bonzini, Anthony Perard, xen-devel, philmd

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

Since commit efc6c07 ("configure: Add a test for the minimum compiler version"),
QEMU explicitely depends on GCC >= 4.8.

v3:
 - drop first patch replacing QEMU_GNUC_PREREQ with G_GNUC_CHECK_VERSION
 - add last patch to remove QEMU_GNUC_PREREQ
 - tweak commit messages to replace clang 3.8 with clang 3.4
 - fix some extra coding style
 - collect r-b/a-b tags

v2:
 - include reviewed Philippe earlier series
 - drop problematic patch to replace GCC_FMT_ATTR, but tweak the check to be clang
 - replace QEMU_GNUC_PREREQ with G_GNUC_CHECK_VERSION
 - split changes
 - add patches to drop __GNUC__ checks (clang advertizes itself as 4.2.1, unless
   -fgnuc-version=0)

Marc-André Lureau (11):
  compiler.h: remove GCC < 3 __builtin_expect fallback
  qemu-plugin.h: remove GCC < 4
  tests: remove GCC < 4 fallbacks
  virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON
  compiler.h: explicit case for Clang printf attribute
  audio: remove GNUC & MSVC check
  poison: remove GNUC check
  xen: remove GNUC check
  compiler: remove GNUC check
  linux-user: remove GNUC check
  compiler.h: remove QEMU_GNUC_PREREQ

Philippe Mathieu-Daudé (2):
  qemu/atomic: Drop special case for unsupported compiler
  accel/tcg: Remove special case for GCC < 4.6

 include/exec/poison.h              |  2 --
 include/hw/xen/interface/io/ring.h |  9 ------
 include/qemu/atomic.h              | 17 -----------
 include/qemu/compiler.h            | 45 ++++++++----------------------
 include/qemu/qemu-plugin.h         |  9 ++----
 scripts/cocci-macro-file.h         |  1 -
 tools/virtiofsd/fuse_common.h      | 11 +-------
 accel/tcg/cpu-exec.c               |  2 +-
 audio/audio.c                      |  8 +-----
 linux-user/strace.c                |  4 ---
 tests/tcg/arm/fcvt.c               |  8 ++----
 11 files changed, 20 insertions(+), 96 deletions(-)

-- 
2.29.0




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

* [PATCH v3 00/13] Remove GCC < 4.8 checks
@ 2020-12-10 13:47 ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

Since commit efc6c07 ("configure: Add a test for the minimum compiler version"),
QEMU explicitely depends on GCC >= 4.8.

v3:
 - drop first patch replacing QEMU_GNUC_PREREQ with G_GNUC_CHECK_VERSION
 - add last patch to remove QEMU_GNUC_PREREQ
 - tweak commit messages to replace clang 3.8 with clang 3.4
 - fix some extra coding style
 - collect r-b/a-b tags

v2:
 - include reviewed Philippe earlier series
 - drop problematic patch to replace GCC_FMT_ATTR, but tweak the check to be clang
 - replace QEMU_GNUC_PREREQ with G_GNUC_CHECK_VERSION
 - split changes
 - add patches to drop __GNUC__ checks (clang advertizes itself as 4.2.1, unless
   -fgnuc-version=0)

Marc-André Lureau (11):
  compiler.h: remove GCC < 3 __builtin_expect fallback
  qemu-plugin.h: remove GCC < 4
  tests: remove GCC < 4 fallbacks
  virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON
  compiler.h: explicit case for Clang printf attribute
  audio: remove GNUC & MSVC check
  poison: remove GNUC check
  xen: remove GNUC check
  compiler: remove GNUC check
  linux-user: remove GNUC check
  compiler.h: remove QEMU_GNUC_PREREQ

Philippe Mathieu-Daudé (2):
  qemu/atomic: Drop special case for unsupported compiler
  accel/tcg: Remove special case for GCC < 4.6

 include/exec/poison.h              |  2 --
 include/hw/xen/interface/io/ring.h |  9 ------
 include/qemu/atomic.h              | 17 -----------
 include/qemu/compiler.h            | 45 ++++++++----------------------
 include/qemu/qemu-plugin.h         |  9 ++----
 scripts/cocci-macro-file.h         |  1 -
 tools/virtiofsd/fuse_common.h      | 11 +-------
 accel/tcg/cpu-exec.c               |  2 +-
 audio/audio.c                      |  8 +-----
 linux-user/strace.c                |  4 ---
 tests/tcg/arm/fcvt.c               |  8 ++----
 11 files changed, 20 insertions(+), 96 deletions(-)

-- 
2.29.0




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

* [PATCH v3 01/13] qemu/atomic: Drop special case for unsupported compiler
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:47   ` marcandre.lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	qemu-arm, Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini,
	Anthony Perard, xen-devel, philmd

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Since commit efc6c070aca ("configure: Add a test for the
minimum compiler version") the minimum compiler version
required for GCC is 4.8, which has the GCC BZ#36793 bug fixed.

We can safely remove the special case introduced in commit
a281ebc11a6 ("virtio: add missing mb() on notification").

With clang 3.4, __ATOMIC_RELAXED is defined, so the chunk to
remove (which is x86-specific), isn't reached either.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 include/qemu/atomic.h | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h
index c1d211a351..8f4b3a80fb 100644
--- a/include/qemu/atomic.h
+++ b/include/qemu/atomic.h
@@ -241,23 +241,6 @@
 
 #else /* __ATOMIC_RELAXED */
 
-/*
- * We use GCC builtin if it's available, as that can use mfence on
- * 32-bit as well, e.g. if built with -march=pentium-m. However, on
- * i386 the spec is buggy, and the implementation followed it until
- * 4.3 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36793).
- */
-#if defined(__i386__) || defined(__x86_64__)
-#if !QEMU_GNUC_PREREQ(4, 4)
-#if defined __x86_64__
-#define smp_mb()    ({ asm volatile("mfence" ::: "memory"); (void)0; })
-#else
-#define smp_mb()    ({ asm volatile("lock; addl $0,0(%%esp) " ::: "memory"); (void)0; })
-#endif
-#endif
-#endif
-
-
 #ifdef __alpha__
 #define smp_read_barrier_depends()   asm volatile("mb":::"memory")
 #endif
-- 
2.29.0



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

* [PATCH v3 01/13] qemu/atomic: Drop special case for unsupported compiler
@ 2020-12-10 13:47   ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Since commit efc6c070aca ("configure: Add a test for the
minimum compiler version") the minimum compiler version
required for GCC is 4.8, which has the GCC BZ#36793 bug fixed.

We can safely remove the special case introduced in commit
a281ebc11a6 ("virtio: add missing mb() on notification").

With clang 3.4, __ATOMIC_RELAXED is defined, so the chunk to
remove (which is x86-specific), isn't reached either.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 include/qemu/atomic.h | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h
index c1d211a351..8f4b3a80fb 100644
--- a/include/qemu/atomic.h
+++ b/include/qemu/atomic.h
@@ -241,23 +241,6 @@
 
 #else /* __ATOMIC_RELAXED */
 
-/*
- * We use GCC builtin if it's available, as that can use mfence on
- * 32-bit as well, e.g. if built with -march=pentium-m. However, on
- * i386 the spec is buggy, and the implementation followed it until
- * 4.3 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36793).
- */
-#if defined(__i386__) || defined(__x86_64__)
-#if !QEMU_GNUC_PREREQ(4, 4)
-#if defined __x86_64__
-#define smp_mb()    ({ asm volatile("mfence" ::: "memory"); (void)0; })
-#else
-#define smp_mb()    ({ asm volatile("lock; addl $0,0(%%esp) " ::: "memory"); (void)0; })
-#endif
-#endif
-#endif
-
-
 #ifdef __alpha__
 #define smp_read_barrier_depends()   asm volatile("mb":::"memory")
 #endif
-- 
2.29.0



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

* [PATCH v3 02/13] accel/tcg: Remove special case for GCC < 4.6
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:47   ` marcandre.lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	qemu-arm, Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini,
	Anthony Perard, xen-devel, philmd

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Since commit efc6c070aca ("configure: Add a test for the
minimum compiler version") the minimum compiler version
required for GCC is 4.8.

We can safely remove the special case for GCC 4.6 introduced
in commit 0448f5f8b81 ("cpu-exec: Fix compiler warning
(-Werror=clobbered)").
No change for Clang as we don't know.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 accel/tcg/cpu-exec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 58aea605d8..37a88edb6d 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -724,7 +724,7 @@ int cpu_exec(CPUState *cpu)
 
     /* prepare setjmp context for exception handling */
     if (sigsetjmp(cpu->jmp_env, 0) != 0) {
-#if defined(__clang__) || !QEMU_GNUC_PREREQ(4, 6)
+#if defined(__clang__)
         /* Some compilers wrongly smash all local variables after
          * siglongjmp. There were bug reports for gcc 4.5.0 and clang.
          * Reload essential local variables here for those compilers.
-- 
2.29.0



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

* [PATCH v3 02/13] accel/tcg: Remove special case for GCC < 4.6
@ 2020-12-10 13:47   ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Since commit efc6c070aca ("configure: Add a test for the
minimum compiler version") the minimum compiler version
required for GCC is 4.8.

We can safely remove the special case for GCC 4.6 introduced
in commit 0448f5f8b81 ("cpu-exec: Fix compiler warning
(-Werror=clobbered)").
No change for Clang as we don't know.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 accel/tcg/cpu-exec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 58aea605d8..37a88edb6d 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -724,7 +724,7 @@ int cpu_exec(CPUState *cpu)
 
     /* prepare setjmp context for exception handling */
     if (sigsetjmp(cpu->jmp_env, 0) != 0) {
-#if defined(__clang__) || !QEMU_GNUC_PREREQ(4, 6)
+#if defined(__clang__)
         /* Some compilers wrongly smash all local variables after
          * siglongjmp. There were bug reports for gcc 4.5.0 and clang.
          * Reload essential local variables here for those compilers.
-- 
2.29.0



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

* [PATCH v3 03/13] compiler.h: remove GCC < 3 __builtin_expect fallback
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:47   ` marcandre.lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	Marc-André Lureau, qemu-arm, Gerd Hoffmann, Stefan Hajnoczi,
	Paolo Bonzini, Anthony Perard, xen-devel, philmd

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Since commit efc6c07 ("configure: Add a test for the minimum compiler
version"), QEMU explicitely depends on GCC >= 4.8.

(clang >= 3.4 advertizes itself as GCC >= 4.2 compatible and supports
__builtin_expect too)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 include/qemu/compiler.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index c76281f354..226ead6c90 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -44,10 +44,6 @@
 #endif
 
 #ifndef likely
-#if __GNUC__ < 3
-#define __builtin_expect(x, n) (x)
-#endif
-
 #define likely(x)   __builtin_expect(!!(x), 1)
 #define unlikely(x)   __builtin_expect(!!(x), 0)
 #endif
-- 
2.29.0



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

* [PATCH v3 03/13] compiler.h: remove GCC < 3 __builtin_expect fallback
@ 2020-12-10 13:47   ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Since commit efc6c07 ("configure: Add a test for the minimum compiler
version"), QEMU explicitely depends on GCC >= 4.8.

(clang >= 3.4 advertizes itself as GCC >= 4.2 compatible and supports
__builtin_expect too)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 include/qemu/compiler.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index c76281f354..226ead6c90 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -44,10 +44,6 @@
 #endif
 
 #ifndef likely
-#if __GNUC__ < 3
-#define __builtin_expect(x, n) (x)
-#endif
-
 #define likely(x)   __builtin_expect(!!(x), 1)
 #define unlikely(x)   __builtin_expect(!!(x), 0)
 #endif
-- 
2.29.0



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

* [PATCH v3 04/13] qemu-plugin.h: remove GCC < 4
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:47   ` marcandre.lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	Marc-André Lureau, qemu-arm, Gerd Hoffmann, Stefan Hajnoczi,
	Paolo Bonzini, Anthony Perard, xen-devel, philmd

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Since commit efc6c07 ("configure: Add a test for the minimum compiler
version"), QEMU explicitely depends on GCC >= 4.8.

(clang >= 3.4 advertizes itself as GCC >= 4.2 compatible)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
---
 include/qemu/qemu-plugin.h | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
index bab8b0d4b3..5775e82c4e 100644
--- a/include/qemu/qemu-plugin.h
+++ b/include/qemu/qemu-plugin.h
@@ -28,13 +28,8 @@
   #endif
   #define QEMU_PLUGIN_LOCAL
 #else
-  #if __GNUC__ >= 4
-    #define QEMU_PLUGIN_EXPORT __attribute__((visibility("default")))
-    #define QEMU_PLUGIN_LOCAL  __attribute__((visibility("hidden")))
-  #else
-    #define QEMU_PLUGIN_EXPORT
-    #define QEMU_PLUGIN_LOCAL
-  #endif
+  #define QEMU_PLUGIN_EXPORT __attribute__((visibility("default")))
+  #define QEMU_PLUGIN_LOCAL  __attribute__((visibility("hidden")))
 #endif
 
 typedef uint64_t qemu_plugin_id_t;
-- 
2.29.0



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

* [PATCH v3 04/13] qemu-plugin.h: remove GCC < 4
@ 2020-12-10 13:47   ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Since commit efc6c07 ("configure: Add a test for the minimum compiler
version"), QEMU explicitely depends on GCC >= 4.8.

(clang >= 3.4 advertizes itself as GCC >= 4.2 compatible)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
---
 include/qemu/qemu-plugin.h | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
index bab8b0d4b3..5775e82c4e 100644
--- a/include/qemu/qemu-plugin.h
+++ b/include/qemu/qemu-plugin.h
@@ -28,13 +28,8 @@
   #endif
   #define QEMU_PLUGIN_LOCAL
 #else
-  #if __GNUC__ >= 4
-    #define QEMU_PLUGIN_EXPORT __attribute__((visibility("default")))
-    #define QEMU_PLUGIN_LOCAL  __attribute__((visibility("hidden")))
-  #else
-    #define QEMU_PLUGIN_EXPORT
-    #define QEMU_PLUGIN_LOCAL
-  #endif
+  #define QEMU_PLUGIN_EXPORT __attribute__((visibility("default")))
+  #define QEMU_PLUGIN_LOCAL  __attribute__((visibility("hidden")))
 #endif
 
 typedef uint64_t qemu_plugin_id_t;
-- 
2.29.0



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

* [PATCH v3 05/13] tests: remove GCC < 4 fallbacks
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:47   ` marcandre.lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	Marc-André Lureau, qemu-arm, Gerd Hoffmann, Stefan Hajnoczi,
	Paolo Bonzini, Anthony Perard, xen-devel, philmd

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Since commit efc6c07 ("configure: Add a test for the minimum compiler
version"), QEMU explicitely depends on GCC >= 4.8.

(clang >= 3.4 advertizes itself as GCC >= 4.2 compatible)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/arm/fcvt.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/tcg/arm/fcvt.c b/tests/tcg/arm/fcvt.c
index 617626bc63..7ac47b564e 100644
--- a/tests/tcg/arm/fcvt.c
+++ b/tests/tcg/arm/fcvt.c
@@ -73,11 +73,9 @@ static void print_int64(int i, int64_t num)
 
 #ifndef SNANF
 /* Signaling NaN macros, if supported.  */
-# if __GNUC_PREREQ(3, 3)
-#  define SNANF (__builtin_nansf (""))
-#  define SNAN (__builtin_nans (""))
-#  define SNANL (__builtin_nansl (""))
-# endif
+# define SNANF (__builtin_nansf (""))
+# define SNAN (__builtin_nans (""))
+# define SNANL (__builtin_nansl (""))
 #endif
 
 float single_numbers[] = { -SNANF,
-- 
2.29.0



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

* [PATCH v3 05/13] tests: remove GCC < 4 fallbacks
@ 2020-12-10 13:47   ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Since commit efc6c07 ("configure: Add a test for the minimum compiler
version"), QEMU explicitely depends on GCC >= 4.8.

(clang >= 3.4 advertizes itself as GCC >= 4.2 compatible)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/arm/fcvt.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/tcg/arm/fcvt.c b/tests/tcg/arm/fcvt.c
index 617626bc63..7ac47b564e 100644
--- a/tests/tcg/arm/fcvt.c
+++ b/tests/tcg/arm/fcvt.c
@@ -73,11 +73,9 @@ static void print_int64(int i, int64_t num)
 
 #ifndef SNANF
 /* Signaling NaN macros, if supported.  */
-# if __GNUC_PREREQ(3, 3)
-#  define SNANF (__builtin_nansf (""))
-#  define SNAN (__builtin_nans (""))
-#  define SNANL (__builtin_nansl (""))
-# endif
+# define SNANF (__builtin_nansf (""))
+# define SNAN (__builtin_nans (""))
+# define SNANL (__builtin_nansl (""))
 #endif
 
 float single_numbers[] = { -SNANF,
-- 
2.29.0



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

* [PATCH v3 06/13] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:47   ` marcandre.lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	Marc-André Lureau, qemu-arm, Gerd Hoffmann, Stefan Hajnoczi,
	Paolo Bonzini, Anthony Perard, xen-devel, philmd

From: Marc-André Lureau <marcandre.lureau@redhat.com>

This allows to get rid of a check for older GCC version (which was a bit
bogus too since it was falling back on c++ version..)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 tools/virtiofsd/fuse_common.h | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/tools/virtiofsd/fuse_common.h b/tools/virtiofsd/fuse_common.h
index 5aee5193eb..a2484060b6 100644
--- a/tools/virtiofsd/fuse_common.h
+++ b/tools/virtiofsd/fuse_common.h
@@ -809,15 +809,6 @@ void fuse_remove_signal_handlers(struct fuse_session *se);
  *
  * On 32bit systems please add -D_FILE_OFFSET_BITS=64 to your compile flags!
  */
-
-#if defined(__GNUC__) &&                                      \
-    (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 6) && \
-    !defined __cplusplus
-_Static_assert(sizeof(off_t) == 8, "fuse: off_t must be 64bit");
-#else
-struct _fuse_off_t_must_be_64bit_dummy_struct {
-    unsigned _fuse_off_t_must_be_64bit:((sizeof(off_t) == 8) ? 1 : -1);
-};
-#endif
+QEMU_BUILD_BUG_ON(sizeof(off_t) != 8);
 
 #endif /* FUSE_COMMON_H_ */
-- 
2.29.0



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

* [PATCH v3 06/13] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON
@ 2020-12-10 13:47   ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

This allows to get rid of a check for older GCC version (which was a bit
bogus too since it was falling back on c++ version..)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 tools/virtiofsd/fuse_common.h | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/tools/virtiofsd/fuse_common.h b/tools/virtiofsd/fuse_common.h
index 5aee5193eb..a2484060b6 100644
--- a/tools/virtiofsd/fuse_common.h
+++ b/tools/virtiofsd/fuse_common.h
@@ -809,15 +809,6 @@ void fuse_remove_signal_handlers(struct fuse_session *se);
  *
  * On 32bit systems please add -D_FILE_OFFSET_BITS=64 to your compile flags!
  */
-
-#if defined(__GNUC__) &&                                      \
-    (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 6) && \
-    !defined __cplusplus
-_Static_assert(sizeof(off_t) == 8, "fuse: off_t must be 64bit");
-#else
-struct _fuse_off_t_must_be_64bit_dummy_struct {
-    unsigned _fuse_off_t_must_be_64bit:((sizeof(off_t) == 8) ? 1 : -1);
-};
-#endif
+QEMU_BUILD_BUG_ON(sizeof(off_t) != 8);
 
 #endif /* FUSE_COMMON_H_ */
-- 
2.29.0



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

* [PATCH v3 07/13] compiler.h: explicit case for Clang printf attribute
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:47   ` marcandre.lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	Marc-André Lureau, qemu-arm, Gerd Hoffmann, Stefan Hajnoczi,
	Paolo Bonzini, Anthony Perard, xen-devel, philmd

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Since commit efc6c07 ("configure: Add a test for the minimum compiler
version"), QEMU explicitely depends on GCC >= 4.8, we could thus drop
earlier version checks. Except clang advertizes itself as GCC 4.2.1.

Since clang doesn't support gnu_printf, make that case explicitely and
drop GCC version check.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/qemu/compiler.h | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 226ead6c90..6212295e52 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -99,18 +99,18 @@
 #define QEMU_BUILD_BUG_ON_ZERO(x) (sizeof(QEMU_BUILD_BUG_ON_STRUCT(x)) - \
                                    sizeof(QEMU_BUILD_BUG_ON_STRUCT(x)))
 
-#if defined __GNUC__
-# if !QEMU_GNUC_PREREQ(4, 4)
-   /* gcc versions before 4.4.x don't support gnu_printf, so use printf. */
-#  define GCC_FMT_ATTR(n, m) __attribute__((format(printf, n, m)))
-# else
-   /* Use gnu_printf when supported (qemu uses standard format strings). */
-#  define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
-#  if defined(_WIN32)
-    /* Map __printf__ to __gnu_printf__ because we want standard format strings
-     * even when MinGW or GLib include files use __printf__. */
-#   define __printf__ __gnu_printf__
-#  endif
+#if defined(__clang__)
+/* clang doesn't support gnu_printf, so use printf. */
+# define GCC_FMT_ATTR(n, m) __attribute__((format(printf, n, m)))
+#elif defined(__GNUC__)
+/* Use gnu_printf (qemu uses standard format strings). */
+# define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
+# if defined(_WIN32)
+/*
+ * Map __printf__ to __gnu_printf__ because we want standard format strings even
+ * when MinGW or GLib include files use __printf__.
+ */
+#  define __printf__ __gnu_printf__
 # endif
 #else
 #define GCC_FMT_ATTR(n, m)
-- 
2.29.0



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

* [PATCH v3 07/13] compiler.h: explicit case for Clang printf attribute
@ 2020-12-10 13:47   ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Since commit efc6c07 ("configure: Add a test for the minimum compiler
version"), QEMU explicitely depends on GCC >= 4.8, we could thus drop
earlier version checks. Except clang advertizes itself as GCC 4.2.1.

Since clang doesn't support gnu_printf, make that case explicitely and
drop GCC version check.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/qemu/compiler.h | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 226ead6c90..6212295e52 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -99,18 +99,18 @@
 #define QEMU_BUILD_BUG_ON_ZERO(x) (sizeof(QEMU_BUILD_BUG_ON_STRUCT(x)) - \
                                    sizeof(QEMU_BUILD_BUG_ON_STRUCT(x)))
 
-#if defined __GNUC__
-# if !QEMU_GNUC_PREREQ(4, 4)
-   /* gcc versions before 4.4.x don't support gnu_printf, so use printf. */
-#  define GCC_FMT_ATTR(n, m) __attribute__((format(printf, n, m)))
-# else
-   /* Use gnu_printf when supported (qemu uses standard format strings). */
-#  define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
-#  if defined(_WIN32)
-    /* Map __printf__ to __gnu_printf__ because we want standard format strings
-     * even when MinGW or GLib include files use __printf__. */
-#   define __printf__ __gnu_printf__
-#  endif
+#if defined(__clang__)
+/* clang doesn't support gnu_printf, so use printf. */
+# define GCC_FMT_ATTR(n, m) __attribute__((format(printf, n, m)))
+#elif defined(__GNUC__)
+/* Use gnu_printf (qemu uses standard format strings). */
+# define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
+# if defined(_WIN32)
+/*
+ * Map __printf__ to __gnu_printf__ because we want standard format strings even
+ * when MinGW or GLib include files use __printf__.
+ */
+#  define __printf__ __gnu_printf__
 # endif
 #else
 #define GCC_FMT_ATTR(n, m)
-- 
2.29.0



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

* [PATCH v3 08/13] audio: remove GNUC & MSVC check
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:47   ` marcandre.lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	Marc-André Lureau, qemu-arm, Gerd Hoffmann, Stefan Hajnoczi,
	Paolo Bonzini, Anthony Perard, xen-devel, philmd

From: Marc-André Lureau <marcandre.lureau@redhat.com>

QEMU requires either GCC or Clang, which both advertize __GNUC__.
Drop MSVC fallback path.

Note: I intentionally left further cleanups for a later work.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 audio/audio.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/audio/audio.c b/audio/audio.c
index 46578e4a58..d7a00294de 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -122,13 +122,7 @@ int audio_bug (const char *funcname, int cond)
 
 #if defined AUDIO_BREAKPOINT_ON_BUG
 #  if defined HOST_I386
-#    if defined __GNUC__
-        __asm__ ("int3");
-#    elif defined _MSC_VER
-        _asm _emit 0xcc;
-#    else
-        abort ();
-#    endif
+      __asm__ ("int3");
 #  else
         abort ();
 #  endif
-- 
2.29.0



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

* [PATCH v3 08/13] audio: remove GNUC & MSVC check
@ 2020-12-10 13:47   ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

QEMU requires either GCC or Clang, which both advertize __GNUC__.
Drop MSVC fallback path.

Note: I intentionally left further cleanups for a later work.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 audio/audio.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/audio/audio.c b/audio/audio.c
index 46578e4a58..d7a00294de 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -122,13 +122,7 @@ int audio_bug (const char *funcname, int cond)
 
 #if defined AUDIO_BREAKPOINT_ON_BUG
 #  if defined HOST_I386
-#    if defined __GNUC__
-        __asm__ ("int3");
-#    elif defined _MSC_VER
-        _asm _emit 0xcc;
-#    else
-        abort ();
-#    endif
+      __asm__ ("int3");
 #  else
         abort ();
 #  endif
-- 
2.29.0



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

* [PATCH v3 09/13] poison: remove GNUC check
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:47   ` marcandre.lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	Marc-André Lureau, qemu-arm, Gerd Hoffmann, Stefan Hajnoczi,
	Paolo Bonzini, Anthony Perard, xen-devel, philmd

From: Marc-André Lureau <marcandre.lureau@redhat.com>

QEMU requires Clang or GCC, that define and support __GNUC__ extensions

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/exec/poison.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/exec/poison.h b/include/exec/poison.h
index 7b9ac361dc..d7ae1f23e7 100644
--- a/include/exec/poison.h
+++ b/include/exec/poison.h
@@ -3,7 +3,6 @@
 
 #ifndef HW_POISON_H
 #define HW_POISON_H
-#ifdef __GNUC__
 
 #pragma GCC poison TARGET_I386
 #pragma GCC poison TARGET_X86_64
@@ -93,4 +92,3 @@
 #pragma GCC poison CONFIG_SOFTMMU
 
 #endif
-#endif
-- 
2.29.0



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

* [PATCH v3 09/13] poison: remove GNUC check
@ 2020-12-10 13:47   ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

QEMU requires Clang or GCC, that define and support __GNUC__ extensions

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/exec/poison.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/exec/poison.h b/include/exec/poison.h
index 7b9ac361dc..d7ae1f23e7 100644
--- a/include/exec/poison.h
+++ b/include/exec/poison.h
@@ -3,7 +3,6 @@
 
 #ifndef HW_POISON_H
 #define HW_POISON_H
-#ifdef __GNUC__
 
 #pragma GCC poison TARGET_I386
 #pragma GCC poison TARGET_X86_64
@@ -93,4 +92,3 @@
 #pragma GCC poison CONFIG_SOFTMMU
 
 #endif
-#endif
-- 
2.29.0



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

* [PATCH v3 10/13] xen: remove GNUC check
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:47   ` marcandre.lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	Marc-André Lureau, qemu-arm, Gerd Hoffmann, Stefan Hajnoczi,
	Paolo Bonzini, Anthony Perard, xen-devel, philmd

From: Marc-André Lureau <marcandre.lureau@redhat.com>

QEMU requires Clang or GCC, that define and support __GNUC__ extensions

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
---
 include/hw/xen/interface/io/ring.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/include/hw/xen/interface/io/ring.h b/include/hw/xen/interface/io/ring.h
index 5d048b335c..115705f3f4 100644
--- a/include/hw/xen/interface/io/ring.h
+++ b/include/hw/xen/interface/io/ring.h
@@ -206,21 +206,12 @@ typedef struct __name##_back_ring __name##_back_ring_t
 #define RING_HAS_UNCONSUMED_RESPONSES(_r)                               \
     ((_r)->sring->rsp_prod - (_r)->rsp_cons)
 
-#ifdef __GNUC__
 #define RING_HAS_UNCONSUMED_REQUESTS(_r) ({                             \
     unsigned int req = (_r)->sring->req_prod - (_r)->req_cons;          \
     unsigned int rsp = RING_SIZE(_r) -                                  \
         ((_r)->req_cons - (_r)->rsp_prod_pvt);                          \
     req < rsp ? req : rsp;                                              \
 })
-#else
-/* Same as above, but without the nice GCC ({ ... }) syntax. */
-#define RING_HAS_UNCONSUMED_REQUESTS(_r)                                \
-    ((((_r)->sring->req_prod - (_r)->req_cons) <                        \
-      (RING_SIZE(_r) - ((_r)->req_cons - (_r)->rsp_prod_pvt))) ?        \
-     ((_r)->sring->req_prod - (_r)->req_cons) :                         \
-     (RING_SIZE(_r) - ((_r)->req_cons - (_r)->rsp_prod_pvt)))
-#endif
 
 /* Direct access to individual ring elements, by index. */
 #define RING_GET_REQUEST(_r, _idx)                                      \
-- 
2.29.0



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

* [PATCH v3 10/13] xen: remove GNUC check
@ 2020-12-10 13:47   ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

QEMU requires Clang or GCC, that define and support __GNUC__ extensions

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
---
 include/hw/xen/interface/io/ring.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/include/hw/xen/interface/io/ring.h b/include/hw/xen/interface/io/ring.h
index 5d048b335c..115705f3f4 100644
--- a/include/hw/xen/interface/io/ring.h
+++ b/include/hw/xen/interface/io/ring.h
@@ -206,21 +206,12 @@ typedef struct __name##_back_ring __name##_back_ring_t
 #define RING_HAS_UNCONSUMED_RESPONSES(_r)                               \
     ((_r)->sring->rsp_prod - (_r)->rsp_cons)
 
-#ifdef __GNUC__
 #define RING_HAS_UNCONSUMED_REQUESTS(_r) ({                             \
     unsigned int req = (_r)->sring->req_prod - (_r)->req_cons;          \
     unsigned int rsp = RING_SIZE(_r) -                                  \
         ((_r)->req_cons - (_r)->rsp_prod_pvt);                          \
     req < rsp ? req : rsp;                                              \
 })
-#else
-/* Same as above, but without the nice GCC ({ ... }) syntax. */
-#define RING_HAS_UNCONSUMED_REQUESTS(_r)                                \
-    ((((_r)->sring->req_prod - (_r)->req_cons) <                        \
-      (RING_SIZE(_r) - ((_r)->req_cons - (_r)->rsp_prod_pvt))) ?        \
-     ((_r)->sring->req_prod - (_r)->req_cons) :                         \
-     (RING_SIZE(_r) - ((_r)->req_cons - (_r)->rsp_prod_pvt)))
-#endif
 
 /* Direct access to individual ring elements, by index. */
 #define RING_GET_REQUEST(_r, _idx)                                      \
-- 
2.29.0



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

* [PATCH v3 11/13] compiler: remove GNUC check
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:47   ` marcandre.lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	Marc-André Lureau, qemu-arm, Gerd Hoffmann, Stefan Hajnoczi,
	Paolo Bonzini, Anthony Perard, xen-devel, philmd

From: Marc-André Lureau <marcandre.lureau@redhat.com>

QEMU requires Clang or GCC, that define and support __GNUC__ extensions.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 include/qemu/compiler.h | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 6212295e52..5e6cf2c8e8 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -64,14 +64,10 @@
     (offsetof(container, field) + sizeof_field(container, field))
 
 /* Convert from a base type to a parent type, with compile time checking.  */
-#ifdef __GNUC__
 #define DO_UPCAST(type, field, dev) ( __extension__ ( { \
     char __attribute__((unused)) offset_must_be_zero[ \
         -offsetof(type, field)]; \
     container_of(dev, type, field);}))
-#else
-#define DO_UPCAST(type, field, dev) container_of(dev, type, field)
-#endif
 
 #define typeof_field(type, field) typeof(((type *)0)->field)
 #define type_check(t1,t2) ((t1*)0 - (t2*)0)
@@ -102,7 +98,7 @@
 #if defined(__clang__)
 /* clang doesn't support gnu_printf, so use printf. */
 # define GCC_FMT_ATTR(n, m) __attribute__((format(printf, n, m)))
-#elif defined(__GNUC__)
+#else
 /* Use gnu_printf (qemu uses standard format strings). */
 # define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
 # if defined(_WIN32)
@@ -112,8 +108,6 @@
  */
 #  define __printf__ __gnu_printf__
 # endif
-#else
-#define GCC_FMT_ATTR(n, m)
 #endif
 
 #ifndef __has_warning
-- 
2.29.0



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

* [PATCH v3 11/13] compiler: remove GNUC check
@ 2020-12-10 13:47   ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

QEMU requires Clang or GCC, that define and support __GNUC__ extensions.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 include/qemu/compiler.h | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 6212295e52..5e6cf2c8e8 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -64,14 +64,10 @@
     (offsetof(container, field) + sizeof_field(container, field))
 
 /* Convert from a base type to a parent type, with compile time checking.  */
-#ifdef __GNUC__
 #define DO_UPCAST(type, field, dev) ( __extension__ ( { \
     char __attribute__((unused)) offset_must_be_zero[ \
         -offsetof(type, field)]; \
     container_of(dev, type, field);}))
-#else
-#define DO_UPCAST(type, field, dev) container_of(dev, type, field)
-#endif
 
 #define typeof_field(type, field) typeof(((type *)0)->field)
 #define type_check(t1,t2) ((t1*)0 - (t2*)0)
@@ -102,7 +98,7 @@
 #if defined(__clang__)
 /* clang doesn't support gnu_printf, so use printf. */
 # define GCC_FMT_ATTR(n, m) __attribute__((format(printf, n, m)))
-#elif defined(__GNUC__)
+#else
 /* Use gnu_printf (qemu uses standard format strings). */
 # define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
 # if defined(_WIN32)
@@ -112,8 +108,6 @@
  */
 #  define __printf__ __gnu_printf__
 # endif
-#else
-#define GCC_FMT_ATTR(n, m)
 #endif
 
 #ifndef __has_warning
-- 
2.29.0



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

* [PATCH v3 12/13] linux-user: remove GNUC check
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:47   ` marcandre.lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	Marc-André Lureau, qemu-arm, Gerd Hoffmann, Stefan Hajnoczi,
	Paolo Bonzini, Anthony Perard, xen-devel, philmd

From: Marc-André Lureau <marcandre.lureau@redhat.com>

QEMU requires Clang or GCC, that define and support __GNUC__ extensions.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 linux-user/strace.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/linux-user/strace.c b/linux-user/strace.c
index 11fea14fba..e00275fcb5 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -24,7 +24,6 @@ struct syscallname {
                    abi_long, abi_long, abi_long);
 };
 
-#ifdef __GNUC__
 /*
  * It is possible that target doesn't have syscall that uses
  * following flags but we don't want the compiler to warn
@@ -32,9 +31,6 @@ struct syscallname {
  * functions.  It is ok to keep them while not used.
  */
 #define UNUSED __attribute__ ((unused))
-#else
-#define UNUSED
-#endif
 
 /*
  * Structure used to translate flag values into strings.  This is
-- 
2.29.0



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

* [PATCH v3 12/13] linux-user: remove GNUC check
@ 2020-12-10 13:47   ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

QEMU requires Clang or GCC, that define and support __GNUC__ extensions.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 linux-user/strace.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/linux-user/strace.c b/linux-user/strace.c
index 11fea14fba..e00275fcb5 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -24,7 +24,6 @@ struct syscallname {
                    abi_long, abi_long, abi_long);
 };
 
-#ifdef __GNUC__
 /*
  * It is possible that target doesn't have syscall that uses
  * following flags but we don't want the compiler to warn
@@ -32,9 +31,6 @@ struct syscallname {
  * functions.  It is ok to keep them while not used.
  */
 #define UNUSED __attribute__ ((unused))
-#else
-#define UNUSED
-#endif
 
 /*
  * Structure used to translate flag values into strings.  This is
-- 
2.29.0



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

* [PATCH v3 13/13] compiler.h: remove QEMU_GNUC_PREREQ
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:47   ` marcandre.lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	Marc-André Lureau, qemu-arm, Gerd Hoffmann, Stefan Hajnoczi,
	Paolo Bonzini, Anthony Perard, xen-devel, philmd

From: Marc-André Lureau <marcandre.lureau@redhat.com>

When needed, the G_GNUC_CHECK_VERSION() glib macro can be used instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 include/qemu/compiler.h    | 11 -----------
 scripts/cocci-macro-file.h |  1 -
 2 files changed, 12 deletions(-)

diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 5e6cf2c8e8..1b9e58e82b 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -11,17 +11,6 @@
 #define QEMU_STATIC_ANALYSIS 1
 #endif
 
-/*----------------------------------------------------------------------------
-| The macro QEMU_GNUC_PREREQ tests for minimum version of the GNU C compiler.
-| The code is a copy of SOFTFLOAT_GNUC_PREREQ, see softfloat-macros.h.
-*----------------------------------------------------------------------------*/
-#if defined(__GNUC__) && defined(__GNUC_MINOR__)
-# define QEMU_GNUC_PREREQ(maj, min) \
-         ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
-#else
-# define QEMU_GNUC_PREREQ(maj, min) 0
-#endif
-
 #define QEMU_NORETURN __attribute__ ((__noreturn__))
 
 #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h
index c6bbc05ba3..20eea6b708 100644
--- a/scripts/cocci-macro-file.h
+++ b/scripts/cocci-macro-file.h
@@ -19,7 +19,6 @@
  */
 
 /* From qemu/compiler.h */
-#define QEMU_GNUC_PREREQ(maj, min) 1
 #define QEMU_NORETURN __attribute__ ((__noreturn__))
 #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
 #define QEMU_SENTINEL __attribute__((sentinel))
-- 
2.29.0



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

* [PATCH v3 13/13] compiler.h: remove QEMU_GNUC_PREREQ
@ 2020-12-10 13:47   ` marcandre.lureau
  0 siblings, 0 replies; 63+ messages in thread
From: marcandre.lureau @ 2020-12-10 13:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: philmd, Richard Henderson, Laurent Vivier, Paul Durrant,
	xen-devel, Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

When needed, the G_GNUC_CHECK_VERSION() glib macro can be used instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 include/qemu/compiler.h    | 11 -----------
 scripts/cocci-macro-file.h |  1 -
 2 files changed, 12 deletions(-)

diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 5e6cf2c8e8..1b9e58e82b 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -11,17 +11,6 @@
 #define QEMU_STATIC_ANALYSIS 1
 #endif
 
-/*----------------------------------------------------------------------------
-| The macro QEMU_GNUC_PREREQ tests for minimum version of the GNU C compiler.
-| The code is a copy of SOFTFLOAT_GNUC_PREREQ, see softfloat-macros.h.
-*----------------------------------------------------------------------------*/
-#if defined(__GNUC__) && defined(__GNUC_MINOR__)
-# define QEMU_GNUC_PREREQ(maj, min) \
-         ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
-#else
-# define QEMU_GNUC_PREREQ(maj, min) 0
-#endif
-
 #define QEMU_NORETURN __attribute__ ((__noreturn__))
 
 #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h
index c6bbc05ba3..20eea6b708 100644
--- a/scripts/cocci-macro-file.h
+++ b/scripts/cocci-macro-file.h
@@ -19,7 +19,6 @@
  */
 
 /* From qemu/compiler.h */
-#define QEMU_GNUC_PREREQ(maj, min) 1
 #define QEMU_NORETURN __attribute__ ((__noreturn__))
 #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
 #define QEMU_SENTINEL __attribute__((sentinel))
-- 
2.29.0



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

* Re: [PATCH v3 00/13] Remove GCC < 4.8 checks
  2020-12-10 13:47 ` marcandre.lureau
@ 2020-12-10 13:57   ` no-reply
  -1 siblings, 0 replies; 63+ messages in thread
From: no-reply @ 2020-12-10 13:57 UTC (permalink / raw)
  To: marcandre.lureau
  Cc: peter.maydell, sstabellini, paul, richard.henderson, qemu-devel,
	laurent, marcandre.lureau, qemu-arm, kraxel, stefanha, pbonzini,
	anthony.perard, xen-devel, philmd, dgilbert

Patchew URL: https://patchew.org/QEMU/20201210134752.780923-1-marcandre.lureau@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20201210134752.780923-1-marcandre.lureau@redhat.com
Subject: [PATCH v3 00/13] Remove GCC < 4.8 checks

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
   5e7b204..180834d  master     -> master
 - [tag update]      patchew/20201208055043.31548-1-lersek@redhat.com -> patchew/20201208055043.31548-1-lersek@redhat.com
 - [tag update]      patchew/20201209100811.190316-1-andrey.gruzdev@virtuozzo.com -> patchew/20201209100811.190316-1-andrey.gruzdev@virtuozzo.com
 * [new tag]         patchew/20201210125929.1136390-1-mlevitsk@redhat.com -> patchew/20201210125929.1136390-1-mlevitsk@redhat.com
 * [new tag]         patchew/20201210134752.780923-1-marcandre.lureau@redhat.com -> patchew/20201210134752.780923-1-marcandre.lureau@redhat.com
Switched to a new branch 'test'
778a2e3 compiler.h: remove QEMU_GNUC_PREREQ
0a3f410 linux-user: remove GNUC check
9678c1e compiler: remove GNUC check
a0138f8 xen: remove GNUC check
40f3170 poison: remove GNUC check
b80f5cb audio: remove GNUC & MSVC check
b635f5f compiler.h: explicit case for Clang printf attribute
d52f3c4 virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON
9bbe2a0 tests: remove GCC < 4 fallbacks
7c330cb qemu-plugin.h: remove GCC < 4
434de5d compiler.h: remove GCC < 3 __builtin_expect fallback
0699e78 accel/tcg: Remove special case for GCC < 4.6
03e2318 qemu/atomic: Drop special case for unsupported compiler

=== OUTPUT BEGIN ===
1/13 Checking commit 03e23183fb55 (qemu/atomic: Drop special case for unsupported compiler)
2/13 Checking commit 0699e78a25fb (accel/tcg: Remove special case for GCC < 4.6)
WARNING: architecture specific defines should be avoided
#30: FILE: accel/tcg/cpu-exec.c:727:
+#if defined(__clang__)

total: 0 errors, 1 warnings, 8 lines checked

Patch 2/13 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/13 Checking commit 434de5d2441a (compiler.h: remove GCC < 3 __builtin_expect fallback)
4/13 Checking commit 7c330cb6e44c (qemu-plugin.h: remove GCC < 4)
5/13 Checking commit 9bbe2a00a228 (tests: remove GCC < 4 fallbacks)
ERROR: space prohibited between function name and open parenthesis '('
#30: FILE: tests/tcg/arm/fcvt.c:76:
+# define SNANF (__builtin_nansf (""))

ERROR: space prohibited between function name and open parenthesis '('
#31: FILE: tests/tcg/arm/fcvt.c:77:
+# define SNAN (__builtin_nans (""))

ERROR: space prohibited between function name and open parenthesis '('
#32: FILE: tests/tcg/arm/fcvt.c:78:
+# define SNANL (__builtin_nansl (""))

total: 3 errors, 0 warnings, 14 lines checked

Patch 5/13 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

6/13 Checking commit d52f3c49e7f8 (virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON)
7/13 Checking commit b635f5f0f1c0 (compiler.h: explicit case for Clang printf attribute)
WARNING: architecture specific defines should be avoided
#38: FILE: include/qemu/compiler.h:102:
+#if defined(__clang__)

total: 0 errors, 1 warnings, 30 lines checked

Patch 7/13 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/13 Checking commit b80f5cb153ae (audio: remove GNUC & MSVC check)
9/13 Checking commit 40f31706c554 (poison: remove GNUC check)
10/13 Checking commit a0138f8b8ca1 (xen: remove GNUC check)
11/13 Checking commit 9678c1e1b0d8 (compiler: remove GNUC check)
12/13 Checking commit 0a3f4102bcfa (linux-user: remove GNUC check)
13/13 Checking commit 778a2e31c5ce (compiler.h: remove QEMU_GNUC_PREREQ)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20201210134752.780923-1-marcandre.lureau@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

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

* Re: [PATCH v3 00/13] Remove GCC < 4.8 checks
@ 2020-12-10 13:57   ` no-reply
  0 siblings, 0 replies; 63+ messages in thread
From: no-reply @ 2020-12-10 13:57 UTC (permalink / raw)
  To: marcandre.lureau
  Cc: qemu-devel, philmd, richard.henderson, laurent, paul, xen-devel,
	stefanha, kraxel, sstabellini, anthony.perard, dgilbert,
	qemu-arm, pbonzini, peter.maydell, marcandre.lureau

Patchew URL: https://patchew.org/QEMU/20201210134752.780923-1-marcandre.lureau@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20201210134752.780923-1-marcandre.lureau@redhat.com
Subject: [PATCH v3 00/13] Remove GCC < 4.8 checks

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
   5e7b204..180834d  master     -> master
 - [tag update]      patchew/20201208055043.31548-1-lersek@redhat.com -> patchew/20201208055043.31548-1-lersek@redhat.com
 - [tag update]      patchew/20201209100811.190316-1-andrey.gruzdev@virtuozzo.com -> patchew/20201209100811.190316-1-andrey.gruzdev@virtuozzo.com
 * [new tag]         patchew/20201210125929.1136390-1-mlevitsk@redhat.com -> patchew/20201210125929.1136390-1-mlevitsk@redhat.com
 * [new tag]         patchew/20201210134752.780923-1-marcandre.lureau@redhat.com -> patchew/20201210134752.780923-1-marcandre.lureau@redhat.com
Switched to a new branch 'test'
778a2e3 compiler.h: remove QEMU_GNUC_PREREQ
0a3f410 linux-user: remove GNUC check
9678c1e compiler: remove GNUC check
a0138f8 xen: remove GNUC check
40f3170 poison: remove GNUC check
b80f5cb audio: remove GNUC & MSVC check
b635f5f compiler.h: explicit case for Clang printf attribute
d52f3c4 virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON
9bbe2a0 tests: remove GCC < 4 fallbacks
7c330cb qemu-plugin.h: remove GCC < 4
434de5d compiler.h: remove GCC < 3 __builtin_expect fallback
0699e78 accel/tcg: Remove special case for GCC < 4.6
03e2318 qemu/atomic: Drop special case for unsupported compiler

=== OUTPUT BEGIN ===
1/13 Checking commit 03e23183fb55 (qemu/atomic: Drop special case for unsupported compiler)
2/13 Checking commit 0699e78a25fb (accel/tcg: Remove special case for GCC < 4.6)
WARNING: architecture specific defines should be avoided
#30: FILE: accel/tcg/cpu-exec.c:727:
+#if defined(__clang__)

total: 0 errors, 1 warnings, 8 lines checked

Patch 2/13 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/13 Checking commit 434de5d2441a (compiler.h: remove GCC < 3 __builtin_expect fallback)
4/13 Checking commit 7c330cb6e44c (qemu-plugin.h: remove GCC < 4)
5/13 Checking commit 9bbe2a00a228 (tests: remove GCC < 4 fallbacks)
ERROR: space prohibited between function name and open parenthesis '('
#30: FILE: tests/tcg/arm/fcvt.c:76:
+# define SNANF (__builtin_nansf (""))

ERROR: space prohibited between function name and open parenthesis '('
#31: FILE: tests/tcg/arm/fcvt.c:77:
+# define SNAN (__builtin_nans (""))

ERROR: space prohibited between function name and open parenthesis '('
#32: FILE: tests/tcg/arm/fcvt.c:78:
+# define SNANL (__builtin_nansl (""))

total: 3 errors, 0 warnings, 14 lines checked

Patch 5/13 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

6/13 Checking commit d52f3c49e7f8 (virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON)
7/13 Checking commit b635f5f0f1c0 (compiler.h: explicit case for Clang printf attribute)
WARNING: architecture specific defines should be avoided
#38: FILE: include/qemu/compiler.h:102:
+#if defined(__clang__)

total: 0 errors, 1 warnings, 30 lines checked

Patch 7/13 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/13 Checking commit b80f5cb153ae (audio: remove GNUC & MSVC check)
9/13 Checking commit 40f31706c554 (poison: remove GNUC check)
10/13 Checking commit a0138f8b8ca1 (xen: remove GNUC check)
11/13 Checking commit 9678c1e1b0d8 (compiler: remove GNUC check)
12/13 Checking commit 0a3f4102bcfa (linux-user: remove GNUC check)
13/13 Checking commit 778a2e31c5ce (compiler.h: remove QEMU_GNUC_PREREQ)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20201210134752.780923-1-marcandre.lureau@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

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

* Re: [PATCH v3 08/13] audio: remove GNUC & MSVC check
  2020-12-10 13:47   ` marcandre.lureau
@ 2020-12-10 14:26     ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 63+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-10 14:26 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	qemu-arm, Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini,
	Anthony Perard, xen-devel

On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> QEMU requires either GCC or Clang, which both advertize __GNUC__.
> Drop MSVC fallback path.
> 
> Note: I intentionally left further cleanups for a later work.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  audio/audio.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/audio/audio.c b/audio/audio.c
> index 46578e4a58..d7a00294de 100644
> --- a/audio/audio.c
> +++ b/audio/audio.c
> @@ -122,13 +122,7 @@ int audio_bug (const char *funcname, int cond)
>  
>  #if defined AUDIO_BREAKPOINT_ON_BUG
>  #  if defined HOST_I386
> -#    if defined __GNUC__
> -        __asm__ ("int3");
> -#    elif defined _MSC_VER
> -        _asm _emit 0xcc;
> -#    else
> -        abort ();
> -#    endif
> +      __asm__ ("int3");

This was 15 years ago... Why not simply use abort() today?

>  #  else
>          abort ();
>  #  endif
> 



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

* Re: [PATCH v3 08/13] audio: remove GNUC & MSVC check
@ 2020-12-10 14:26     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 63+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-10 14:26 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel
  Cc: Richard Henderson, Laurent Vivier, Paul Durrant, xen-devel,
	Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell

On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> QEMU requires either GCC or Clang, which both advertize __GNUC__.
> Drop MSVC fallback path.
> 
> Note: I intentionally left further cleanups for a later work.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  audio/audio.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/audio/audio.c b/audio/audio.c
> index 46578e4a58..d7a00294de 100644
> --- a/audio/audio.c
> +++ b/audio/audio.c
> @@ -122,13 +122,7 @@ int audio_bug (const char *funcname, int cond)
>  
>  #if defined AUDIO_BREAKPOINT_ON_BUG
>  #  if defined HOST_I386
> -#    if defined __GNUC__
> -        __asm__ ("int3");
> -#    elif defined _MSC_VER
> -        _asm _emit 0xcc;
> -#    else
> -        abort ();
> -#    endif
> +      __asm__ ("int3");

This was 15 years ago... Why not simply use abort() today?

>  #  else
>          abort ();
>  #  endif
> 



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

* Re: [PATCH v3 09/13] poison: remove GNUC check
  2020-12-10 13:47   ` marcandre.lureau
@ 2020-12-10 14:27     ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 63+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-10 14:27 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	qemu-arm, Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini,
	Anthony Perard, xen-devel

On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> QEMU requires Clang or GCC, that define and support __GNUC__ extensions
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  include/exec/poison.h | 2 --
>  1 file changed, 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



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

* Re: [PATCH v3 09/13] poison: remove GNUC check
@ 2020-12-10 14:27     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 63+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-10 14:27 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel
  Cc: Richard Henderson, Laurent Vivier, Paul Durrant, xen-devel,
	Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell

On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> QEMU requires Clang or GCC, that define and support __GNUC__ extensions
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  include/exec/poison.h | 2 --
>  1 file changed, 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



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

* Re: [PATCH v3 08/13] audio: remove GNUC & MSVC check
  2020-12-10 14:26     ` Philippe Mathieu-Daudé
@ 2020-12-10 14:27       ` Peter Maydell
  -1 siblings, 0 replies; 63+ messages in thread
From: Peter Maydell @ 2020-12-10 14:27 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Stefano Stabellini, Paolo Bonzini, Paul Durrant,
	Richard Henderson, QEMU Developers, Laurent Vivier, qemu-arm,
	Gerd Hoffmann, Stefan Hajnoczi, open list:X86, Anthony Perard,
	Marc-André Lureau, Dr. David Alan Gilbert

On Thu, 10 Dec 2020 at 14:26, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > QEMU requires either GCC or Clang, which both advertize __GNUC__.
> > Drop MSVC fallback path.
> >
> > Note: I intentionally left further cleanups for a later work.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> >  audio/audio.c | 8 +-------
> >  1 file changed, 1 insertion(+), 7 deletions(-)
> >
> > diff --git a/audio/audio.c b/audio/audio.c
> > index 46578e4a58..d7a00294de 100644
> > --- a/audio/audio.c
> > +++ b/audio/audio.c
> > @@ -122,13 +122,7 @@ int audio_bug (const char *funcname, int cond)
> >
> >  #if defined AUDIO_BREAKPOINT_ON_BUG
> >  #  if defined HOST_I386
> > -#    if defined __GNUC__
> > -        __asm__ ("int3");
> > -#    elif defined _MSC_VER
> > -        _asm _emit 0xcc;
> > -#    else
> > -        abort ();
> > -#    endif
> > +      __asm__ ("int3");
>
> This was 15 years ago... Why not simply use abort() today?

That's what I suggested when I looked at this patch in
the previous version of the patchset, yes...

-- PMM


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

* Re: [PATCH v3 08/13] audio: remove GNUC & MSVC check
@ 2020-12-10 14:27       ` Peter Maydell
  0 siblings, 0 replies; 63+ messages in thread
From: Peter Maydell @ 2020-12-10 14:27 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Marc-André Lureau, QEMU Developers, Richard Henderson,
	Laurent Vivier, Paul Durrant, open list:X86, Stefan Hajnoczi,
	Gerd Hoffmann, Stefano Stabellini, Anthony Perard,
	Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini

On Thu, 10 Dec 2020 at 14:26, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > QEMU requires either GCC or Clang, which both advertize __GNUC__.
> > Drop MSVC fallback path.
> >
> > Note: I intentionally left further cleanups for a later work.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> >  audio/audio.c | 8 +-------
> >  1 file changed, 1 insertion(+), 7 deletions(-)
> >
> > diff --git a/audio/audio.c b/audio/audio.c
> > index 46578e4a58..d7a00294de 100644
> > --- a/audio/audio.c
> > +++ b/audio/audio.c
> > @@ -122,13 +122,7 @@ int audio_bug (const char *funcname, int cond)
> >
> >  #if defined AUDIO_BREAKPOINT_ON_BUG
> >  #  if defined HOST_I386
> > -#    if defined __GNUC__
> > -        __asm__ ("int3");
> > -#    elif defined _MSC_VER
> > -        _asm _emit 0xcc;
> > -#    else
> > -        abort ();
> > -#    endif
> > +      __asm__ ("int3");
>
> This was 15 years ago... Why not simply use abort() today?

That's what I suggested when I looked at this patch in
the previous version of the patchset, yes...

-- PMM


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

* Re: [PATCH v3 12/13] linux-user: remove GNUC check
  2020-12-10 13:47   ` marcandre.lureau
@ 2020-12-10 14:27     ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 63+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-10 14:27 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	qemu-arm, Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini,
	Anthony Perard, xen-devel

On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> QEMU requires Clang or GCC, that define and support __GNUC__ extensions.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  linux-user/strace.c | 4 ----
>  1 file changed, 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



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

* Re: [PATCH v3 12/13] linux-user: remove GNUC check
@ 2020-12-10 14:27     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 63+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-10 14:27 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel
  Cc: Richard Henderson, Laurent Vivier, Paul Durrant, xen-devel,
	Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell

On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> QEMU requires Clang or GCC, that define and support __GNUC__ extensions.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  linux-user/strace.c | 4 ----
>  1 file changed, 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



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

* Re: [PATCH v3 03/13] compiler.h: remove GCC < 3 __builtin_expect fallback
  2020-12-10 13:47   ` marcandre.lureau
@ 2020-12-10 14:32     ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 63+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-10 14:32 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	qemu-arm, Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini,
	Anthony Perard, xen-devel

On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Since commit efc6c07 ("configure: Add a test for the minimum compiler
> version"), QEMU explicitely depends on GCC >= 4.8.
> 
> (clang >= 3.4 advertizes itself as GCC >= 4.2 compatible and supports
> __builtin_expect too)
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  include/qemu/compiler.h | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
> index c76281f354..226ead6c90 100644
> --- a/include/qemu/compiler.h
> +++ b/include/qemu/compiler.h
> @@ -44,10 +44,6 @@
>  #endif
>  
>  #ifndef likely
> -#if __GNUC__ < 3
> -#define __builtin_expect(x, n) (x)
> -#endif
> -
>  #define likely(x)   __builtin_expect(!!(x), 1)
>  #define unlikely(x)   __builtin_expect(!!(x), 0)
>  #endif
> 

Trying with GCC 10:
warning: implicit declaration of function ‘likely’
[-Wimplicit-function-declaration]

Clang 10:
warning: implicit declaration of function 'likely' is invalid in C99
[-Wimplicit-function-declaration]

Shouldn't it becleaner to test in the configure script or Meson that
likely() and unlikely() are not defined, and define them here
unconditionally?

Regards,

Phil.



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

* Re: [PATCH v3 03/13] compiler.h: remove GCC < 3 __builtin_expect fallback
@ 2020-12-10 14:32     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 63+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-10 14:32 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel
  Cc: Richard Henderson, Laurent Vivier, Paul Durrant, xen-devel,
	Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell

On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Since commit efc6c07 ("configure: Add a test for the minimum compiler
> version"), QEMU explicitely depends on GCC >= 4.8.
> 
> (clang >= 3.4 advertizes itself as GCC >= 4.2 compatible and supports
> __builtin_expect too)
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  include/qemu/compiler.h | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
> index c76281f354..226ead6c90 100644
> --- a/include/qemu/compiler.h
> +++ b/include/qemu/compiler.h
> @@ -44,10 +44,6 @@
>  #endif
>  
>  #ifndef likely
> -#if __GNUC__ < 3
> -#define __builtin_expect(x, n) (x)
> -#endif
> -
>  #define likely(x)   __builtin_expect(!!(x), 1)
>  #define unlikely(x)   __builtin_expect(!!(x), 0)
>  #endif
> 

Trying with GCC 10:
warning: implicit declaration of function ‘likely’
[-Wimplicit-function-declaration]

Clang 10:
warning: implicit declaration of function 'likely' is invalid in C99
[-Wimplicit-function-declaration]

Shouldn't it becleaner to test in the configure script or Meson that
likely() and unlikely() are not defined, and define them here
unconditionally?

Regards,

Phil.



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

* Re: [PATCH v3 08/13] audio: remove GNUC & MSVC check
  2020-12-10 14:27       ` Peter Maydell
@ 2020-12-10 14:34         ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 63+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-10 14:34 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Stefano Stabellini, Paolo Bonzini, Paul Durrant,
	Richard Henderson, QEMU Developers, Laurent Vivier, qemu-arm,
	Gerd Hoffmann, Stefan Hajnoczi, open list:X86, Anthony Perard,
	Marc-André Lureau, Dr. David Alan Gilbert

On 12/10/20 3:27 PM, Peter Maydell wrote:
> On Thu, 10 Dec 2020 at 14:26, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>
>> On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
>>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>>>
>>> QEMU requires either GCC or Clang, which both advertize __GNUC__.
>>> Drop MSVC fallback path.
>>>
>>> Note: I intentionally left further cleanups for a later work.
>>>
>>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>>> ---
>>>  audio/audio.c | 8 +-------
>>>  1 file changed, 1 insertion(+), 7 deletions(-)
>>>
>>> diff --git a/audio/audio.c b/audio/audio.c
>>> index 46578e4a58..d7a00294de 100644
>>> --- a/audio/audio.c
>>> +++ b/audio/audio.c
>>> @@ -122,13 +122,7 @@ int audio_bug (const char *funcname, int cond)
>>>
>>>  #if defined AUDIO_BREAKPOINT_ON_BUG
>>>  #  if defined HOST_I386
>>> -#    if defined __GNUC__
>>> -        __asm__ ("int3");
>>> -#    elif defined _MSC_VER
>>> -        _asm _emit 0xcc;
>>> -#    else
>>> -        abort ();
>>> -#    endif
>>> +      __asm__ ("int3");
>>
>> This was 15 years ago... Why not simply use abort() today?
> 
> That's what I suggested when I looked at this patch in
> the previous version of the patchset, yes...

Ah, I went back to read v2 thread. Actually I even prefer
Gerd's suggestion to remove this dead code.

Regards,

Phil.



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

* Re: [PATCH v3 08/13] audio: remove GNUC & MSVC check
@ 2020-12-10 14:34         ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 63+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-10 14:34 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Marc-André Lureau, QEMU Developers, Richard Henderson,
	Laurent Vivier, Paul Durrant, open list:X86, Stefan Hajnoczi,
	Gerd Hoffmann, Stefano Stabellini, Anthony Perard,
	Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini

On 12/10/20 3:27 PM, Peter Maydell wrote:
> On Thu, 10 Dec 2020 at 14:26, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>
>> On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
>>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>>>
>>> QEMU requires either GCC or Clang, which both advertize __GNUC__.
>>> Drop MSVC fallback path.
>>>
>>> Note: I intentionally left further cleanups for a later work.
>>>
>>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>>> ---
>>>  audio/audio.c | 8 +-------
>>>  1 file changed, 1 insertion(+), 7 deletions(-)
>>>
>>> diff --git a/audio/audio.c b/audio/audio.c
>>> index 46578e4a58..d7a00294de 100644
>>> --- a/audio/audio.c
>>> +++ b/audio/audio.c
>>> @@ -122,13 +122,7 @@ int audio_bug (const char *funcname, int cond)
>>>
>>>  #if defined AUDIO_BREAKPOINT_ON_BUG
>>>  #  if defined HOST_I386
>>> -#    if defined __GNUC__
>>> -        __asm__ ("int3");
>>> -#    elif defined _MSC_VER
>>> -        _asm _emit 0xcc;
>>> -#    else
>>> -        abort ();
>>> -#    endif
>>> +      __asm__ ("int3");
>>
>> This was 15 years ago... Why not simply use abort() today?
> 
> That's what I suggested when I looked at this patch in
> the previous version of the patchset, yes...

Ah, I went back to read v2 thread. Actually I even prefer
Gerd's suggestion to remove this dead code.

Regards,

Phil.



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

* Re: [PATCH v3 03/13] compiler.h: remove GCC < 3 __builtin_expect fallback
  2020-12-10 14:32     ` Philippe Mathieu-Daudé
@ 2020-12-10 14:46       ` Peter Maydell
  -1 siblings, 0 replies; 63+ messages in thread
From: Peter Maydell @ 2020-12-10 14:46 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Stefano Stabellini, Paolo Bonzini, Paul Durrant,
	Richard Henderson, QEMU Developers, Laurent Vivier, qemu-arm,
	Gerd Hoffmann, Stefan Hajnoczi, open list:X86, Anthony Perard,
	Marc-André Lureau, Dr. David Alan Gilbert

On Thu, 10 Dec 2020 at 14:32, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Since commit efc6c07 ("configure: Add a test for the minimum compiler
> > version"), QEMU explicitely depends on GCC >= 4.8.
> >
> > (clang >= 3.4 advertizes itself as GCC >= 4.2 compatible and supports
> > __builtin_expect too)
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> Shouldn't it becleaner to test in the configure script or Meson that
> likely() and unlikely() are not defined, and define them here
> unconditionally?

That sounds like way more infrastructure than we need if
just checking "is it already defined" is sufficient...

-- PMM


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

* Re: [PATCH v3 03/13] compiler.h: remove GCC < 3 __builtin_expect fallback
@ 2020-12-10 14:46       ` Peter Maydell
  0 siblings, 0 replies; 63+ messages in thread
From: Peter Maydell @ 2020-12-10 14:46 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Marc-André Lureau, QEMU Developers, Richard Henderson,
	Laurent Vivier, Paul Durrant, open list:X86, Stefan Hajnoczi,
	Gerd Hoffmann, Stefano Stabellini, Anthony Perard,
	Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini

On Thu, 10 Dec 2020 at 14:32, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Since commit efc6c07 ("configure: Add a test for the minimum compiler
> > version"), QEMU explicitely depends on GCC >= 4.8.
> >
> > (clang >= 3.4 advertizes itself as GCC >= 4.2 compatible and supports
> > __builtin_expect too)
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> Shouldn't it becleaner to test in the configure script or Meson that
> likely() and unlikely() are not defined, and define them here
> unconditionally?

That sounds like way more infrastructure than we need if
just checking "is it already defined" is sufficient...

-- PMM


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

* Re: [PATCH v3 03/13] compiler.h: remove GCC < 3 __builtin_expect fallback
  2020-12-10 14:46       ` Peter Maydell
@ 2020-12-10 14:55         ` Marc-André Lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: Marc-André Lureau @ 2020-12-10 14:55 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Stefano Stabellini, Paul Durrant, Richard Henderson,
	QEMU Developers, Laurent Vivier, qemu-arm, Gerd Hoffmann,
	Stefan Hajnoczi, Paolo Bonzini, Anthony Perard, open list:X86,
	Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert

Hi

On Thu, Dec 10, 2020 at 6:47 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Thu, 10 Dec 2020 at 14:32, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> >
> > On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> > > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> > >
> > > Since commit efc6c07 ("configure: Add a test for the minimum compiler
> > > version"), QEMU explicitely depends on GCC >= 4.8.
> > >
> > > (clang >= 3.4 advertizes itself as GCC >= 4.2 compatible and supports
> > > __builtin_expect too)
> > >
> > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> > Shouldn't it becleaner to test in the configure script or Meson that
> > likely() and unlikely() are not defined, and define them here
> > unconditionally?
>
> That sounds like way more infrastructure than we need if
> just checking "is it already defined" is sufficient...
>

Eh, I am just removing dead-code "#if __GNUC__ < 3". Further cleanups
can be done after.



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

* Re: [PATCH v3 03/13] compiler.h: remove GCC < 3 __builtin_expect fallback
@ 2020-12-10 14:55         ` Marc-André Lureau
  0 siblings, 0 replies; 63+ messages in thread
From: Marc-André Lureau @ 2020-12-10 14:55 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Philippe Mathieu-Daudé,
	QEMU Developers, Richard Henderson, Laurent Vivier, Paul Durrant,
	open list:X86, Stefan Hajnoczi, Gerd Hoffmann,
	Stefano Stabellini, Anthony Perard, Dr. David Alan Gilbert,
	qemu-arm, Paolo Bonzini

Hi

On Thu, Dec 10, 2020 at 6:47 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Thu, 10 Dec 2020 at 14:32, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> >
> > On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> > > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> > >
> > > Since commit efc6c07 ("configure: Add a test for the minimum compiler
> > > version"), QEMU explicitely depends on GCC >= 4.8.
> > >
> > > (clang >= 3.4 advertizes itself as GCC >= 4.2 compatible and supports
> > > __builtin_expect too)
> > >
> > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> > Shouldn't it becleaner to test in the configure script or Meson that
> > likely() and unlikely() are not defined, and define them here
> > unconditionally?
>
> That sounds like way more infrastructure than we need if
> just checking "is it already defined" is sufficient...
>

Eh, I am just removing dead-code "#if __GNUC__ < 3". Further cleanups
can be done after.



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

* Re: [PATCH v3 08/13] audio: remove GNUC & MSVC check
  2020-12-10 14:34         ` Philippe Mathieu-Daudé
@ 2020-12-10 14:56           ` Marc-André Lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: Marc-André Lureau @ 2020-12-10 14:56 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, QEMU Developers, Laurent Vivier, qemu-arm,
	Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini, Anthony Perard,
	open list:X86, Dr. David Alan Gilbert

Hi

On Thu, Dec 10, 2020 at 6:35 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> On 12/10/20 3:27 PM, Peter Maydell wrote:
> > On Thu, 10 Dec 2020 at 14:26, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> >>
> >> On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> >>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >>>
> >>> QEMU requires either GCC or Clang, which both advertize __GNUC__.
> >>> Drop MSVC fallback path.
> >>>
> >>> Note: I intentionally left further cleanups for a later work.
> >>>
> >>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> >>> ---
> >>>  audio/audio.c | 8 +-------
> >>>  1 file changed, 1 insertion(+), 7 deletions(-)
> >>>
> >>> diff --git a/audio/audio.c b/audio/audio.c
> >>> index 46578e4a58..d7a00294de 100644
> >>> --- a/audio/audio.c
> >>> +++ b/audio/audio.c
> >>> @@ -122,13 +122,7 @@ int audio_bug (const char *funcname, int cond)
> >>>
> >>>  #if defined AUDIO_BREAKPOINT_ON_BUG
> >>>  #  if defined HOST_I386
> >>> -#    if defined __GNUC__
> >>> -        __asm__ ("int3");
> >>> -#    elif defined _MSC_VER
> >>> -        _asm _emit 0xcc;
> >>> -#    else
> >>> -        abort ();
> >>> -#    endif
> >>> +      __asm__ ("int3");
> >>
> >> This was 15 years ago... Why not simply use abort() today?
> >
> > That's what I suggested when I looked at this patch in
> > the previous version of the patchset, yes...
>
> Ah, I went back to read v2 thread. Actually I even prefer
> Gerd's suggestion to remove this dead code.
>

And I totally agree. However, I don't want to mix concerns. I am just
removing dead-code.



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

* Re: [PATCH v3 08/13] audio: remove GNUC & MSVC check
@ 2020-12-10 14:56           ` Marc-André Lureau
  0 siblings, 0 replies; 63+ messages in thread
From: Marc-André Lureau @ 2020-12-10 14:56 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, QEMU Developers, Richard Henderson,
	Laurent Vivier, Paul Durrant, open list:X86, Stefan Hajnoczi,
	Gerd Hoffmann, Stefano Stabellini, Anthony Perard,
	Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini

Hi

On Thu, Dec 10, 2020 at 6:35 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> On 12/10/20 3:27 PM, Peter Maydell wrote:
> > On Thu, 10 Dec 2020 at 14:26, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> >>
> >> On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
> >>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >>>
> >>> QEMU requires either GCC or Clang, which both advertize __GNUC__.
> >>> Drop MSVC fallback path.
> >>>
> >>> Note: I intentionally left further cleanups for a later work.
> >>>
> >>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> >>> ---
> >>>  audio/audio.c | 8 +-------
> >>>  1 file changed, 1 insertion(+), 7 deletions(-)
> >>>
> >>> diff --git a/audio/audio.c b/audio/audio.c
> >>> index 46578e4a58..d7a00294de 100644
> >>> --- a/audio/audio.c
> >>> +++ b/audio/audio.c
> >>> @@ -122,13 +122,7 @@ int audio_bug (const char *funcname, int cond)
> >>>
> >>>  #if defined AUDIO_BREAKPOINT_ON_BUG
> >>>  #  if defined HOST_I386
> >>> -#    if defined __GNUC__
> >>> -        __asm__ ("int3");
> >>> -#    elif defined _MSC_VER
> >>> -        _asm _emit 0xcc;
> >>> -#    else
> >>> -        abort ();
> >>> -#    endif
> >>> +      __asm__ ("int3");
> >>
> >> This was 15 years ago... Why not simply use abort() today?
> >
> > That's what I suggested when I looked at this patch in
> > the previous version of the patchset, yes...
>
> Ah, I went back to read v2 thread. Actually I even prefer
> Gerd's suggestion to remove this dead code.
>

And I totally agree. However, I don't want to mix concerns. I am just
removing dead-code.



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

* Re: [PATCH v3 07/13] compiler.h: explicit case for Clang printf attribute
  2020-12-10 13:47   ` marcandre.lureau
  (?)
@ 2020-12-11  4:20   ` Michael Tokarev
  -1 siblings, 0 replies; 63+ messages in thread
From: Michael Tokarev @ 2020-12-11  4:20 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel

10.12.2020 16:47, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>

> Since clang doesn't support gnu_printf, make that case explicitely and
> drop GCC version check.

Not a technical comment, - spelling "explicitely", extra "e".

/mjt


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

* Re: [PATCH v3 06/13] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON
  2020-12-10 13:47   ` marcandre.lureau
@ 2020-12-11 20:11     ` Dr. David Alan Gilbert
  -1 siblings, 0 replies; 63+ messages in thread
From: Dr. David Alan Gilbert @ 2020-12-11 20:11 UTC (permalink / raw)
  To: marcandre.lureau
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, qemu-devel, Laurent Vivier, qemu-arm,
	Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini, Anthony Perard,
	xen-devel, philmd

* marcandre.lureau@redhat.com (marcandre.lureau@redhat.com) wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> This allows to get rid of a check for older GCC version (which was a bit
> bogus too since it was falling back on c++ version..)
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Yes I think that's OK; this is an imported file, but we've already
mangled it into QEMU's style and added includes etc.


Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  tools/virtiofsd/fuse_common.h | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/tools/virtiofsd/fuse_common.h b/tools/virtiofsd/fuse_common.h
> index 5aee5193eb..a2484060b6 100644
> --- a/tools/virtiofsd/fuse_common.h
> +++ b/tools/virtiofsd/fuse_common.h
> @@ -809,15 +809,6 @@ void fuse_remove_signal_handlers(struct fuse_session *se);
>   *
>   * On 32bit systems please add -D_FILE_OFFSET_BITS=64 to your compile flags!
>   */
> -
> -#if defined(__GNUC__) &&                                      \
> -    (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 6) && \
> -    !defined __cplusplus
> -_Static_assert(sizeof(off_t) == 8, "fuse: off_t must be 64bit");
> -#else
> -struct _fuse_off_t_must_be_64bit_dummy_struct {
> -    unsigned _fuse_off_t_must_be_64bit:((sizeof(off_t) == 8) ? 1 : -1);
> -};
> -#endif
> +QEMU_BUILD_BUG_ON(sizeof(off_t) != 8);
>  
>  #endif /* FUSE_COMMON_H_ */
> -- 
> 2.29.0
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



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

* Re: [PATCH v3 06/13] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON
@ 2020-12-11 20:11     ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 63+ messages in thread
From: Dr. David Alan Gilbert @ 2020-12-11 20:11 UTC (permalink / raw)
  To: marcandre.lureau
  Cc: qemu-devel, philmd, Richard Henderson, Laurent Vivier,
	Paul Durrant, xen-devel, Stefan Hajnoczi, Gerd Hoffmann,
	Stefano Stabellini, Anthony Perard, qemu-arm, Paolo Bonzini,
	Peter Maydell

* marcandre.lureau@redhat.com (marcandre.lureau@redhat.com) wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> This allows to get rid of a check for older GCC version (which was a bit
> bogus too since it was falling back on c++ version..)
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Yes I think that's OK; this is an imported file, but we've already
mangled it into QEMU's style and added includes etc.


Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  tools/virtiofsd/fuse_common.h | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/tools/virtiofsd/fuse_common.h b/tools/virtiofsd/fuse_common.h
> index 5aee5193eb..a2484060b6 100644
> --- a/tools/virtiofsd/fuse_common.h
> +++ b/tools/virtiofsd/fuse_common.h
> @@ -809,15 +809,6 @@ void fuse_remove_signal_handlers(struct fuse_session *se);
>   *
>   * On 32bit systems please add -D_FILE_OFFSET_BITS=64 to your compile flags!
>   */
> -
> -#if defined(__GNUC__) &&                                      \
> -    (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 6) && \
> -    !defined __cplusplus
> -_Static_assert(sizeof(off_t) == 8, "fuse: off_t must be 64bit");
> -#else
> -struct _fuse_off_t_must_be_64bit_dummy_struct {
> -    unsigned _fuse_off_t_must_be_64bit:((sizeof(off_t) == 8) ? 1 : -1);
> -};
> -#endif
> +QEMU_BUILD_BUG_ON(sizeof(off_t) != 8);
>  
>  #endif /* FUSE_COMMON_H_ */
> -- 
> 2.29.0
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



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

* Re: [PATCH v3 11/13] compiler: remove GNUC check
  2020-12-10 13:47   ` marcandre.lureau
@ 2020-12-12 13:53     ` Marc-André Lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: Marc-André Lureau @ 2020-12-12 13:53 UTC (permalink / raw)
  To: QEMU
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	open list:ARM, Gerd Hoffmann, Stefan Hajnoczi, xen-devel,
	Anthony Perard, Paolo Bonzini, Philippe Mathieu-Daudé

[-- Attachment #1: Type: text/plain, Size: 1808 bytes --]

On Thu, Dec 10, 2020 at 6:14 PM <marcandre.lureau@redhat.com> wrote:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> QEMU requires Clang or GCC, that define and support __GNUC__ extensions.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  include/qemu/compiler.h | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
> index 6212295e52..5e6cf2c8e8 100644
> --- a/include/qemu/compiler.h
> +++ b/include/qemu/compiler.h
> @@ -64,14 +64,10 @@
>      (offsetof(container, field) + sizeof_field(container, field))
>
>  /* Convert from a base type to a parent type, with compile time
> checking.  */
> -#ifdef __GNUC__
>  #define DO_UPCAST(type, field, dev) ( __extension__ ( { \
>      char __attribute__((unused)) offset_must_be_zero[ \
>          -offsetof(type, field)]; \
>      container_of(dev, type, field);}))
> -#else
> -#define DO_UPCAST(type, field, dev) container_of(dev, type, field)
> -#endif
>
>  #define typeof_field(type, field) typeof(((type *)0)->field)
>  #define type_check(t1,t2) ((t1*)0 - (t2*)0)
> @@ -102,7 +98,7 @@
>  #if defined(__clang__)
>  /* clang doesn't support gnu_printf, so use printf. */
>  # define GCC_FMT_ATTR(n, m) __attribute__((format(printf, n, m)))
> -#elif defined(__GNUC__)
> +#else
>  /* Use gnu_printf (qemu uses standard format strings). */
>  # define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
>  # if defined(_WIN32)
> @@ -112,8 +108,6 @@
>   */
>  #  define __printf__ __gnu_printf__
>  # endif
> -#else
> -#define GCC_FMT_ATTR(n, m)
>  #endif
>
>  #ifndef __has_warning
> --
> 2.29.0
>
>
>
Peter, Paolo, anyone to give a review?
thanks


-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 2505 bytes --]

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

* Re: [PATCH v3 11/13] compiler: remove GNUC check
@ 2020-12-12 13:53     ` Marc-André Lureau
  0 siblings, 0 replies; 63+ messages in thread
From: Marc-André Lureau @ 2020-12-12 13:53 UTC (permalink / raw)
  To: QEMU
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	open list:ARM, Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini,
	Anthony Perard, xen-devel, Philippe Mathieu-Daudé

[-- Attachment #1: Type: text/plain, Size: 1808 bytes --]

On Thu, Dec 10, 2020 at 6:14 PM <marcandre.lureau@redhat.com> wrote:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> QEMU requires Clang or GCC, that define and support __GNUC__ extensions.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  include/qemu/compiler.h | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
> index 6212295e52..5e6cf2c8e8 100644
> --- a/include/qemu/compiler.h
> +++ b/include/qemu/compiler.h
> @@ -64,14 +64,10 @@
>      (offsetof(container, field) + sizeof_field(container, field))
>
>  /* Convert from a base type to a parent type, with compile time
> checking.  */
> -#ifdef __GNUC__
>  #define DO_UPCAST(type, field, dev) ( __extension__ ( { \
>      char __attribute__((unused)) offset_must_be_zero[ \
>          -offsetof(type, field)]; \
>      container_of(dev, type, field);}))
> -#else
> -#define DO_UPCAST(type, field, dev) container_of(dev, type, field)
> -#endif
>
>  #define typeof_field(type, field) typeof(((type *)0)->field)
>  #define type_check(t1,t2) ((t1*)0 - (t2*)0)
> @@ -102,7 +98,7 @@
>  #if defined(__clang__)
>  /* clang doesn't support gnu_printf, so use printf. */
>  # define GCC_FMT_ATTR(n, m) __attribute__((format(printf, n, m)))
> -#elif defined(__GNUC__)
> +#else
>  /* Use gnu_printf (qemu uses standard format strings). */
>  # define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
>  # if defined(_WIN32)
> @@ -112,8 +108,6 @@
>   */
>  #  define __printf__ __gnu_printf__
>  # endif
> -#else
> -#define GCC_FMT_ATTR(n, m)
>  #endif
>
>  #ifndef __has_warning
> --
> 2.29.0
>
>
>
Peter, Paolo, anyone to give a review?
thanks


-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 2505 bytes --]

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

* Re: [PATCH v3 11/13] compiler: remove GNUC check
  2020-12-10 13:47   ` marcandre.lureau
@ 2020-12-12 14:00     ` Peter Maydell
  -1 siblings, 0 replies; 63+ messages in thread
From: Peter Maydell @ 2020-12-12 14:00 UTC (permalink / raw)
  To: Marc-André Lureau
  Cc: Stefano Stabellini, Paul Durrant, Richard Henderson,
	QEMU Developers, Laurent Vivier, qemu-arm, Gerd Hoffmann,
	Stefan Hajnoczi, Paolo Bonzini, Anthony Perard, open list:X86,
	Philippe Mathieu-Daudé,
	Dr. David Alan Gilbert

On Thu, 10 Dec 2020 at 13:50, <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> QEMU requires Clang or GCC, that define and support __GNUC__ extensions.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  include/qemu/compiler.h | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)


Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


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

* Re: [PATCH v3 11/13] compiler: remove GNUC check
@ 2020-12-12 14:00     ` Peter Maydell
  0 siblings, 0 replies; 63+ messages in thread
From: Peter Maydell @ 2020-12-12 14:00 UTC (permalink / raw)
  To: Marc-André Lureau
  Cc: QEMU Developers, Philippe Mathieu-Daudé,
	Richard Henderson, Laurent Vivier, Paul Durrant, open list:X86,
	Stefan Hajnoczi, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini

On Thu, 10 Dec 2020 at 13:50, <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> QEMU requires Clang or GCC, that define and support __GNUC__ extensions.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  include/qemu/compiler.h | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)


Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


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

* Re: [PATCH v3 13/13] compiler.h: remove QEMU_GNUC_PREREQ
  2020-12-10 13:47   ` marcandre.lureau
@ 2020-12-14  8:05     ` Marc-André Lureau
  -1 siblings, 0 replies; 63+ messages in thread
From: Marc-André Lureau @ 2020-12-14  8:05 UTC (permalink / raw)
  To: QEMU
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	open list:ARM, Gerd Hoffmann, Stefan Hajnoczi, xen-devel,
	Anthony Perard, Paolo Bonzini, Philippe Mathieu-Daudé

[-- Attachment #1: Type: text/plain, Size: 1875 bytes --]

Hi

On Thu, Dec 10, 2020 at 6:07 PM <marcandre.lureau@redhat.com> wrote:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> When needed, the G_GNUC_CHECK_VERSION() glib macro can be used instead.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  include/qemu/compiler.h    | 11 -----------
>  scripts/cocci-macro-file.h |  1 -
>  2 files changed, 12 deletions(-)
>
> diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
> index 5e6cf2c8e8..1b9e58e82b 100644
> --- a/include/qemu/compiler.h
> +++ b/include/qemu/compiler.h
> @@ -11,17 +11,6 @@
>  #define QEMU_STATIC_ANALYSIS 1
>  #endif
>
>
> -/*----------------------------------------------------------------------------
> -| The macro QEMU_GNUC_PREREQ tests for minimum version of the GNU C
> compiler.
> -| The code is a copy of SOFTFLOAT_GNUC_PREREQ, see softfloat-macros.h.
>
> -*----------------------------------------------------------------------------*/
> -#if defined(__GNUC__) && defined(__GNUC_MINOR__)
> -# define QEMU_GNUC_PREREQ(maj, min) \
> -         ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
> -#else
> -# define QEMU_GNUC_PREREQ(maj, min) 0
> -#endif
> -
>  #define QEMU_NORETURN __attribute__ ((__noreturn__))
>
>  #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
> diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h
> index c6bbc05ba3..20eea6b708 100644
> --- a/scripts/cocci-macro-file.h
> +++ b/scripts/cocci-macro-file.h
> @@ -19,7 +19,6 @@
>   */
>
>  /* From qemu/compiler.h */
> -#define QEMU_GNUC_PREREQ(maj, min) 1
>  #define QEMU_NORETURN __attribute__ ((__noreturn__))
>  #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
>  #define QEMU_SENTINEL __attribute__((sentinel))
>

ping, thanks

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 2526 bytes --]

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

* Re: [PATCH v3 13/13] compiler.h: remove QEMU_GNUC_PREREQ
@ 2020-12-14  8:05     ` Marc-André Lureau
  0 siblings, 0 replies; 63+ messages in thread
From: Marc-André Lureau @ 2020-12-14  8:05 UTC (permalink / raw)
  To: QEMU
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	open list:ARM, Gerd Hoffmann, Stefan Hajnoczi, Paolo Bonzini,
	Anthony Perard, xen-devel, Philippe Mathieu-Daudé

[-- Attachment #1: Type: text/plain, Size: 1875 bytes --]

Hi

On Thu, Dec 10, 2020 at 6:07 PM <marcandre.lureau@redhat.com> wrote:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> When needed, the G_GNUC_CHECK_VERSION() glib macro can be used instead.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  include/qemu/compiler.h    | 11 -----------
>  scripts/cocci-macro-file.h |  1 -
>  2 files changed, 12 deletions(-)
>
> diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
> index 5e6cf2c8e8..1b9e58e82b 100644
> --- a/include/qemu/compiler.h
> +++ b/include/qemu/compiler.h
> @@ -11,17 +11,6 @@
>  #define QEMU_STATIC_ANALYSIS 1
>  #endif
>
>
> -/*----------------------------------------------------------------------------
> -| The macro QEMU_GNUC_PREREQ tests for minimum version of the GNU C
> compiler.
> -| The code is a copy of SOFTFLOAT_GNUC_PREREQ, see softfloat-macros.h.
>
> -*----------------------------------------------------------------------------*/
> -#if defined(__GNUC__) && defined(__GNUC_MINOR__)
> -# define QEMU_GNUC_PREREQ(maj, min) \
> -         ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
> -#else
> -# define QEMU_GNUC_PREREQ(maj, min) 0
> -#endif
> -
>  #define QEMU_NORETURN __attribute__ ((__noreturn__))
>
>  #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
> diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h
> index c6bbc05ba3..20eea6b708 100644
> --- a/scripts/cocci-macro-file.h
> +++ b/scripts/cocci-macro-file.h
> @@ -19,7 +19,6 @@
>   */
>
>  /* From qemu/compiler.h */
> -#define QEMU_GNUC_PREREQ(maj, min) 1
>  #define QEMU_NORETURN __attribute__ ((__noreturn__))
>  #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
>  #define QEMU_SENTINEL __attribute__((sentinel))
>

ping, thanks

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 2526 bytes --]

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

* Re: [PATCH v3 03/13] compiler.h: remove GCC < 3 __builtin_expect fallback
  2020-12-10 14:32     ` Philippe Mathieu-Daudé
  (?)
  (?)
@ 2020-12-14 10:17     ` Paolo Bonzini
  -1 siblings, 0 replies; 63+ messages in thread
From: Paolo Bonzini @ 2020-12-14 10:17 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, marcandre.lureau, qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	qemu-arm, Gerd Hoffmann, Stefan Hajnoczi, Anthony Perard,
	xen-devel

On 10/12/20 15:32, Philippe Mathieu-Daudé wrote:
> On 12/10/20 2:47 PM, marcandre.lureau@redhat.com wrote:
>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>>
>> Since commit efc6c07 ("configure: Add a test for the minimum compiler
>> version"), QEMU explicitely depends on GCC >= 4.8.
>>
>> (clang >= 3.4 advertizes itself as GCC >= 4.2 compatible and supports
>> __builtin_expect too)
>>
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>>   include/qemu/compiler.h | 4 ----
>>   1 file changed, 4 deletions(-)
>>
>> diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
>> index c76281f354..226ead6c90 100644
>> --- a/include/qemu/compiler.h
>> +++ b/include/qemu/compiler.h
>> @@ -44,10 +44,6 @@
>>   #endif
>>   
>>   #ifndef likely
>> -#if __GNUC__ < 3
>> -#define __builtin_expect(x, n) (x)
>> -#endif
>> -
>>   #define likely(x)   __builtin_expect(!!(x), 1)
>>   #define unlikely(x)   __builtin_expect(!!(x), 0)
>>   #endif
>>
> 
> Trying with GCC 10:
> warning: implicit declaration of function ‘likely’
> [-Wimplicit-function-declaration]
> 
> Clang 10:
> warning: implicit declaration of function 'likely' is invalid in C99
> [-Wimplicit-function-declaration]
> 
> Shouldn't it becleaner to test in the configure script or Meson that
> likely() and unlikely() are not defined, and define them here
> unconditionally?

I think the point of the "#ifndef likely" is that some header file 
(maybe something from Linux?) might be defining them unexpectedly.  So 
it's difficult to do the test at configure/meson time.  I would also 
tend towards removing the #ifndef and seeing if something breaks, but 
not as part of this series.

Paolo



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

* Re: [PATCH v3 00/13] Remove GCC < 4.8 checks
  2020-12-10 13:47 ` marcandre.lureau
                   ` (14 preceding siblings ...)
  (?)
@ 2020-12-14 10:20 ` Paolo Bonzini
  -1 siblings, 0 replies; 63+ messages in thread
From: Paolo Bonzini @ 2020-12-14 10:20 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, Laurent Vivier, Dr. David Alan Gilbert,
	qemu-arm, Gerd Hoffmann, Stefan Hajnoczi, Anthony Perard,
	xen-devel, philmd

On 10/12/20 14:47, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Hi,
> 
> Since commit efc6c07 ("configure: Add a test for the minimum compiler version"),
> QEMU explicitely depends on GCC >= 4.8.
> 
> v3:
>   - drop first patch replacing QEMU_GNUC_PREREQ with G_GNUC_CHECK_VERSION
>   - add last patch to remove QEMU_GNUC_PREREQ
>   - tweak commit messages to replace clang 3.8 with clang 3.4
>   - fix some extra coding style
>   - collect r-b/a-b tags
> 
> v2:
>   - include reviewed Philippe earlier series
>   - drop problematic patch to replace GCC_FMT_ATTR, but tweak the check to be clang
>   - replace QEMU_GNUC_PREREQ with G_GNUC_CHECK_VERSION
>   - split changes
>   - add patches to drop __GNUC__ checks (clang advertizes itself as 4.2.1, unless
>     -fgnuc-version=0)
> 
> Marc-André Lureau (11):
>    compiler.h: remove GCC < 3 __builtin_expect fallback
>    qemu-plugin.h: remove GCC < 4
>    tests: remove GCC < 4 fallbacks
>    virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON
>    compiler.h: explicit case for Clang printf attribute
>    audio: remove GNUC & MSVC check
>    poison: remove GNUC check
>    xen: remove GNUC check
>    compiler: remove GNUC check
>    linux-user: remove GNUC check
>    compiler.h: remove QEMU_GNUC_PREREQ
> 
> Philippe Mathieu-Daudé (2):
>    qemu/atomic: Drop special case for unsupported compiler
>    accel/tcg: Remove special case for GCC < 4.6
> 
>   include/exec/poison.h              |  2 --
>   include/hw/xen/interface/io/ring.h |  9 ------
>   include/qemu/atomic.h              | 17 -----------
>   include/qemu/compiler.h            | 45 ++++++++----------------------
>   include/qemu/qemu-plugin.h         |  9 ++----
>   scripts/cocci-macro-file.h         |  1 -
>   tools/virtiofsd/fuse_common.h      | 11 +-------
>   accel/tcg/cpu-exec.c               |  2 +-
>   audio/audio.c                      |  8 +-----
>   linux-user/strace.c                |  4 ---
>   tests/tcg/arm/fcvt.c               |  8 ++----
>   11 files changed, 20 insertions(+), 96 deletions(-)
> 

Queued, thanks.

Paolo



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

* Re: [PATCH v3 01/13] qemu/atomic: Drop special case for unsupported compiler
  2020-12-10 13:47   ` marcandre.lureau
@ 2020-12-14 16:56     ` Stefan Hajnoczi
  -1 siblings, 0 replies; 63+ messages in thread
From: Stefan Hajnoczi @ 2020-12-14 16:56 UTC (permalink / raw)
  To: marcandre.lureau
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, qemu-devel, Laurent Vivier, qemu-arm,
	Gerd Hoffmann, Paolo Bonzini, Anthony Perard, xen-devel, philmd,
	Dr. David Alan Gilbert

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

On Thu, Dec 10, 2020 at 05:47:40PM +0400, marcandre.lureau@redhat.com wrote:
> From: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> Since commit efc6c070aca ("configure: Add a test for the
> minimum compiler version") the minimum compiler version
> required for GCC is 4.8, which has the GCC BZ#36793 bug fixed.
> 
> We can safely remove the special case introduced in commit
> a281ebc11a6 ("virtio: add missing mb() on notification").
> 
> With clang 3.4, __ATOMIC_RELAXED is defined, so the chunk to
> remove (which is x86-specific), isn't reached either.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  include/qemu/atomic.h | 17 -----------------
>  1 file changed, 17 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v3 01/13] qemu/atomic: Drop special case for unsupported compiler
@ 2020-12-14 16:56     ` Stefan Hajnoczi
  0 siblings, 0 replies; 63+ messages in thread
From: Stefan Hajnoczi @ 2020-12-14 16:56 UTC (permalink / raw)
  To: marcandre.lureau
  Cc: qemu-devel, philmd, Richard Henderson, Laurent Vivier,
	Paul Durrant, xen-devel, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

On Thu, Dec 10, 2020 at 05:47:40PM +0400, marcandre.lureau@redhat.com wrote:
> From: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> Since commit efc6c070aca ("configure: Add a test for the
> minimum compiler version") the minimum compiler version
> required for GCC is 4.8, which has the GCC BZ#36793 bug fixed.
> 
> We can safely remove the special case introduced in commit
> a281ebc11a6 ("virtio: add missing mb() on notification").
> 
> With clang 3.4, __ATOMIC_RELAXED is defined, so the chunk to
> remove (which is x86-specific), isn't reached either.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  include/qemu/atomic.h | 17 -----------------
>  1 file changed, 17 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v3 06/13] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON
  2020-12-10 13:47   ` marcandre.lureau
@ 2020-12-14 16:57     ` Stefan Hajnoczi
  -1 siblings, 0 replies; 63+ messages in thread
From: Stefan Hajnoczi @ 2020-12-14 16:57 UTC (permalink / raw)
  To: marcandre.lureau
  Cc: Peter Maydell, Stefano Stabellini, Paul Durrant,
	Richard Henderson, qemu-devel, Laurent Vivier, qemu-arm,
	Gerd Hoffmann, Paolo Bonzini, Anthony Perard, xen-devel, philmd,
	Dr. David Alan Gilbert

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

On Thu, Dec 10, 2020 at 05:47:45PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> This allows to get rid of a check for older GCC version (which was a bit
> bogus too since it was falling back on c++ version..)
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  tools/virtiofsd/fuse_common.h | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v3 06/13] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON
@ 2020-12-14 16:57     ` Stefan Hajnoczi
  0 siblings, 0 replies; 63+ messages in thread
From: Stefan Hajnoczi @ 2020-12-14 16:57 UTC (permalink / raw)
  To: marcandre.lureau
  Cc: qemu-devel, philmd, Richard Henderson, Laurent Vivier,
	Paul Durrant, xen-devel, Gerd Hoffmann, Stefano Stabellini,
	Anthony Perard, Dr. David Alan Gilbert, qemu-arm, Paolo Bonzini,
	Peter Maydell

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

On Thu, Dec 10, 2020 at 05:47:45PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> This allows to get rid of a check for older GCC version (which was a bit
> bogus too since it was falling back on c++ version..)
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  tools/virtiofsd/fuse_common.h | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2020-12-14 16:59 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 13:47 [PATCH v3 00/13] Remove GCC < 4.8 checks marcandre.lureau
2020-12-10 13:47 ` marcandre.lureau
2020-12-10 13:47 ` [PATCH v3 01/13] qemu/atomic: Drop special case for unsupported compiler marcandre.lureau
2020-12-10 13:47   ` marcandre.lureau
2020-12-14 16:56   ` Stefan Hajnoczi
2020-12-14 16:56     ` Stefan Hajnoczi
2020-12-10 13:47 ` [PATCH v3 02/13] accel/tcg: Remove special case for GCC < 4.6 marcandre.lureau
2020-12-10 13:47   ` marcandre.lureau
2020-12-10 13:47 ` [PATCH v3 03/13] compiler.h: remove GCC < 3 __builtin_expect fallback marcandre.lureau
2020-12-10 13:47   ` marcandre.lureau
2020-12-10 14:32   ` Philippe Mathieu-Daudé
2020-12-10 14:32     ` Philippe Mathieu-Daudé
2020-12-10 14:46     ` Peter Maydell
2020-12-10 14:46       ` Peter Maydell
2020-12-10 14:55       ` Marc-André Lureau
2020-12-10 14:55         ` Marc-André Lureau
2020-12-14 10:17     ` Paolo Bonzini
2020-12-10 13:47 ` [PATCH v3 04/13] qemu-plugin.h: remove GCC < 4 marcandre.lureau
2020-12-10 13:47   ` marcandre.lureau
2020-12-10 13:47 ` [PATCH v3 05/13] tests: remove GCC < 4 fallbacks marcandre.lureau
2020-12-10 13:47   ` marcandre.lureau
2020-12-10 13:47 ` [PATCH v3 06/13] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON marcandre.lureau
2020-12-10 13:47   ` marcandre.lureau
2020-12-11 20:11   ` Dr. David Alan Gilbert
2020-12-11 20:11     ` Dr. David Alan Gilbert
2020-12-14 16:57   ` Stefan Hajnoczi
2020-12-14 16:57     ` Stefan Hajnoczi
2020-12-10 13:47 ` [PATCH v3 07/13] compiler.h: explicit case for Clang printf attribute marcandre.lureau
2020-12-10 13:47   ` marcandre.lureau
2020-12-11  4:20   ` Michael Tokarev
2020-12-10 13:47 ` [PATCH v3 08/13] audio: remove GNUC & MSVC check marcandre.lureau
2020-12-10 13:47   ` marcandre.lureau
2020-12-10 14:26   ` Philippe Mathieu-Daudé
2020-12-10 14:26     ` Philippe Mathieu-Daudé
2020-12-10 14:27     ` Peter Maydell
2020-12-10 14:27       ` Peter Maydell
2020-12-10 14:34       ` Philippe Mathieu-Daudé
2020-12-10 14:34         ` Philippe Mathieu-Daudé
2020-12-10 14:56         ` Marc-André Lureau
2020-12-10 14:56           ` Marc-André Lureau
2020-12-10 13:47 ` [PATCH v3 09/13] poison: remove GNUC check marcandre.lureau
2020-12-10 13:47   ` marcandre.lureau
2020-12-10 14:27   ` Philippe Mathieu-Daudé
2020-12-10 14:27     ` Philippe Mathieu-Daudé
2020-12-10 13:47 ` [PATCH v3 10/13] xen: " marcandre.lureau
2020-12-10 13:47   ` marcandre.lureau
2020-12-10 13:47 ` [PATCH v3 11/13] compiler: " marcandre.lureau
2020-12-10 13:47   ` marcandre.lureau
2020-12-12 13:53   ` Marc-André Lureau
2020-12-12 13:53     ` Marc-André Lureau
2020-12-12 14:00   ` Peter Maydell
2020-12-12 14:00     ` Peter Maydell
2020-12-10 13:47 ` [PATCH v3 12/13] linux-user: " marcandre.lureau
2020-12-10 13:47   ` marcandre.lureau
2020-12-10 14:27   ` Philippe Mathieu-Daudé
2020-12-10 14:27     ` Philippe Mathieu-Daudé
2020-12-10 13:47 ` [PATCH v3 13/13] compiler.h: remove QEMU_GNUC_PREREQ marcandre.lureau
2020-12-10 13:47   ` marcandre.lureau
2020-12-14  8:05   ` Marc-André Lureau
2020-12-14  8:05     ` Marc-André Lureau
2020-12-10 13:57 ` [PATCH v3 00/13] Remove GCC < 4.8 checks no-reply
2020-12-10 13:57   ` no-reply
2020-12-14 10:20 ` Paolo Bonzini

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.