diff options
author | Thomas Huth | 2021-05-02 13:22:21 +0200 |
---|---|---|
committer | Thomas Huth | 2021-05-09 18:50:01 +0200 |
commit | a5b2afd522dde375c38cf94b7c696ffa3faba2fb (patch) | |
tree | ad872ba10b4b653e549869e4770b91d02c418bc1 /pc-bios/s390-ccw | |
parent | pc-bios/s390-ccw: Silence GCC 11 stringop-overflow warning (diff) | |
download | qemu-a5b2afd522dde375c38cf94b7c696ffa3faba2fb.tar.gz qemu-a5b2afd522dde375c38cf94b7c696ffa3faba2fb.tar.xz qemu-a5b2afd522dde375c38cf94b7c696ffa3faba2fb.zip |
pc-bios/s390-ccw: Allow building with Clang, too
Clang unfortunately does not support generating code for the z900
architecture level and starts with the z10 instead. Thus to be able
to support compiling with Clang, we have to check for the supported
compiler flags. The disadvantage is of course that the bios image
will only run with z10 guest CPUs upwards (which is what most people
use anyway), so just in case let's also emit a warning in that case
(we will continue to ship firmware images that have been pre-built
with GCC in future releases, so this should not impact normal users,
too).
Message-Id: <20210502174836.838816-5-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'pc-bios/s390-ccw')
-rw-r--r-- | pc-bios/s390-ccw/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index 83fb1afb73..cee9d2c63b 100644 --- a/pc-bios/s390-ccw/Makefile +++ b/pc-bios/s390-ccw/Makefile @@ -34,7 +34,8 @@ QEMU_CFLAGS += $(call cc-option,-Werror $(QEMU_CFLAGS),-Wno-stringop-overflow) QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -fno-common -fPIE QEMU_CFLAGS += -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-tables QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector) -QEMU_CFLAGS += -msoft-float -march=z900 +QEMU_CFLAGS += -msoft-float +QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS),-march=z900,-march=z10) QEMU_CFLAGS += -std=gnu99 LDFLAGS += -Wl,-pie -nostdlib |