Commit d19aec6cbf for qemu.org

commit d19aec6cbfe9e225e2f334da460b6ee3f1485bff
Author: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Date:   Thu Sep 24 21:39:41 2026 +0000

    tests/tcg: add alternative cross-compilers for fedora

    This allows to pick host compiler automatically on fedora, as those
    binaries are installed with 'gcc' package.

    This covers all host arch supported to this day:
    https://fedoraproject.org/wiki/Architectures
    - x86_64
    - aarch64
    - ppc64le
    - riscv64
    - s390x
    Note: QEMU and Fedora don't support 32-bit hosts anymore.

    Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
    Link: https://lore.kernel.org/qemu-devel/20260924213942.26491-4-pierrick.bouvier@oss.qualcomm.com
    Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>

diff --git a/tests/tcg/aarch64/meson.build b/tests/tcg/aarch64/meson.build
index cc2c59fb4b..1cec335df0 100644
--- a/tests/tcg/aarch64/meson.build
+++ b/tests/tcg/aarch64/meson.build
@@ -1,4 +1,5 @@
 cc = 'aarch64-linux-gnu-gcc'
+cc_alt = ['aarch64-redhat-linux-gcc']
 cc_dockerfile = 'debian-all-test-cross'

 cc_feat_cflags = {
@@ -196,6 +197,7 @@ if 'qemu-aarch64' in emulators
   tcg_tests += {
     'aarch64-linux-user': {
       'cc': cc,
+      'cc_alt': cc_alt,
       'cc_dockerfile': cc_dockerfile,
       'cc_feat_cflags': cc_feat_cflags,
       'folder': 'aarch64',
diff --git a/tests/tcg/aarch64/system/meson.build b/tests/tcg/aarch64/system/meson.build
index 6ba35a9f72..fb3b33861e 100644
--- a/tests/tcg/aarch64/system/meson.build
+++ b/tests/tcg/aarch64/system/meson.build
@@ -96,6 +96,7 @@ if 'qemu-system-aarch64' in emulators
   tcg_tests += {
     'aarch64-softmmu': {
       'cc': cc,
+      'cc_alt': cc_alt,
       'cc_dockerfile': cc_dockerfile,
       'cc_feat_cflags': cc_feat_cflags,
       'folder': 'aarch64/system',
diff --git a/tests/tcg/aarch64_be/meson.build b/tests/tcg/aarch64_be/meson.build
index e45a49ec2d..509408de8e 100644
--- a/tests/tcg/aarch64_be/meson.build
+++ b/tests/tcg/aarch64_be/meson.build
@@ -10,6 +10,7 @@ if 'qemu-aarch64_be' in emulators
   tcg_tests += {
     'aarch64_be-linux-user': {
       'cc': 'aarch64-linux-gnu-gcc',
+      'cc_alt': ['aarch64-redhat-linux-gcc'],
       'cc_dockerfile': 'debian-all-test-cross',
       'cc_feat_cflags': cc_feat_cflags,
       'folder': 'aarch64_be',
diff --git a/tests/tcg/ppc64le/meson.build b/tests/tcg/ppc64le/meson.build
index a0f3e62e4d..9f386287e7 100644
--- a/tests/tcg/ppc64le/meson.build
+++ b/tests/tcg/ppc64le/meson.build
@@ -2,6 +2,7 @@ if 'qemu-ppc64le' in emulators
   tcg_tests += {
     'ppc64le-linux-user': {
       'cc': 'powerpc64le-linux-gnu-gcc',
+      'cc_alt': ['ppc64le-redhat-linux-gcc'],
       'cc_dockerfile': 'debian-all-test-cross',
       'cc_feat_cflags': cc_feat_cflags,
       'folder': 'ppc64le',
diff --git a/tests/tcg/riscv64/meson.build b/tests/tcg/riscv64/meson.build
index 5ee20a1e98..91c840b005 100644
--- a/tests/tcg/riscv64/meson.build
+++ b/tests/tcg/riscv64/meson.build
@@ -1,4 +1,5 @@
 cc = 'riscv64-linux-gnu-gcc'
+cc_alt = ['riscv64-redhat-linux-gnu-gcc']
 cc_dockerfile = 'debian-all-test-cross'

 subdir('system')
@@ -26,6 +27,7 @@ if 'qemu-riscv64' in emulators
   tcg_tests += {
     'riscv64-linux-user': {
       'cc': cc,
+      'cc_alt': cc_alt,
       'cc_dockerfile': cc_dockerfile,
       'folder': 'riscv64',
       'gdb_arch': 'riscv64',
diff --git a/tests/tcg/riscv64/system/meson.build b/tests/tcg/riscv64/system/meson.build
index 87c3f9f11c..c87e3eee1a 100644
--- a/tests/tcg/riscv64/system/meson.build
+++ b/tests/tcg/riscv64/system/meson.build
@@ -65,6 +65,7 @@ if 'qemu-system-riscv64' in emulators
   tcg_tests += {
     'riscv64-softmmu': {
       'cc': cc,
+      'cc_alt': cc_alt,
       'cc_dockerfile': cc_dockerfile,
       'folder': 'riscv64',
       'gdb_arch': 'riscv64',
diff --git a/tests/tcg/s390x/meson.build b/tests/tcg/s390x/meson.build
index 1f9aa57fc7..f2328d9e5c 100644
--- a/tests/tcg/s390x/meson.build
+++ b/tests/tcg/s390x/meson.build
@@ -1,4 +1,5 @@
 cc = 's390x-linux-gnu-gcc'
+cc_alt = ['s390x-redhat-linux-gcc']
 cc_dockerfile = 'debian-all-test-cross'

 cc_feat_cflags = {
@@ -140,6 +141,7 @@ if 'qemu-s390x' in emulators
   tcg_tests += {
     's390x-linux-user': {
       'cc': cc,
+      'cc_alt': cc_alt,
       'cc_dockerfile': cc_dockerfile,
       'cc_feat_cflags': cc_feat_cflags,
       'folder': 's390x',
diff --git a/tests/tcg/s390x/system/meson.build b/tests/tcg/s390x/system/meson.build
index ef19c4831f..359d124cc7 100644
--- a/tests/tcg/s390x/system/meson.build
+++ b/tests/tcg/s390x/system/meson.build
@@ -82,6 +82,7 @@ if 'qemu-system-s390x' in emulators
   tcg_tests += {
     's390x-softmmu': {
       'cc': cc,
+      'cc_alt': cc_alt,
       'cc_dockerfile': cc_dockerfile,
       'cc_feat_cflags': cc_feat_cflags,
       'folder': 's390x',
diff --git a/tests/tcg/x86_64/meson.build b/tests/tcg/x86_64/meson.build
index cfeef1d969..968fe27cfc 100644
--- a/tests/tcg/x86_64/meson.build
+++ b/tests/tcg/x86_64/meson.build
@@ -1,4 +1,5 @@
 cc = 'x86_64-linux-gnu-gcc'
+cc_alt = ['x86_64-redhat-linux-gcc']
 cc_dockerfile = 'debian-amd64-cross'

 subdir('system')
@@ -72,6 +73,7 @@ if 'qemu-x86_64' in emulators
   tcg_tests += {
     'x86_64-linux-user': {
       'cc': cc,
+      'cc_alt': cc_alt,
       'cc_dockerfile': cc_dockerfile,
       'folder': 'x86_64',
       'gdb_arch': 'x86_64',
diff --git a/tests/tcg/x86_64/system/meson.build b/tests/tcg/x86_64/system/meson.build
index 43e7d7afa8..08b770d43a 100644
--- a/tests/tcg/x86_64/system/meson.build
+++ b/tests/tcg/x86_64/system/meson.build
@@ -52,6 +52,7 @@ if 'qemu-system-x86_64' in emulators
   tcg_tests += {
     'x86_64-softmmu': {
       'cc': cc,
+      'cc_alt': cc_alt,
       'cc_dockerfile': cc_dockerfile,
       'folder': 'x86_64/system',
       'gdb_arch': 'x86_64',