From a5b2afd522dde375c38cf94b7c696ffa3faba2fb Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Sun, 2 May 2021 13:22:21 +0200 Subject: pc-bios/s390-ccw: Allow building with Clang, too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Reviewed-by: Cornelia Huck Signed-off-by: Thomas Huth --- pc-bios/s390-ccw/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pc-bios/s390-ccw') diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile index 83fb1af..cee9d2c 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 -- cgit v1.1