From: Jan Kiszka <
jan.k...@siemens.com>
This obsoletes explicit no-sse/mmx and resolves build issue with custom
toolchains on x86, plus it simplifies the setup.
Along that, clarify why we need CFLAGS_MGENERAL_REGS_ONLY.
Signed-off-by: Jan Kiszka <
jan.k...@siemens.com>
---
Makefile.am | 7 +------
configure.ac | 1 +
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index aefdada..02e9cac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -216,18 +216,13 @@ efi_cflags = \
-Wsign-compare \
-DGNU_EFI_USE_MS_ABI \
-Werror \
+ $(CFLAGS_MGENERAL_REGS_ONLY) \
$(CFLAGS)
if ARCH_X86_64
efi_cflags += \
- -mno-sse \
- -mno-mmx \
-mno-red-zone
endif
-if ARCH_ARM
-efi_cflags += \
- $(CFLAGS_MGENERAL_REGS_ONLY)
-endif
efi_ldflags = \
-T $(GNUEFI_LIB_DIR)/elf_$(ARCH)_efi.lds \
diff --git a/
configure.ac b/
configure.ac
index d448d71..b000603 100644
--- a/
configure.ac
+++ b/
configure.ac
@@ -111,6 +111,7 @@ AC_SUBST([ARCH])
AC_SUBST([MACHINE_TYPE_NAME])
AM_CONDITIONAL([ARCH_IS_X86], [test "$ARCH" = "ia32" -o "$ARCH" = "x86_64"])
+# -mgeneral-regs-only was introduced with gcc-9 to ARM, and RISCV64 does not support it until now
AX_CHECK_COMPILE_FLAG([-mgeneral-regs-only],
[CFLAGS_MGENERAL_REGS_ONLY=-mgeneral-regs-only],
[CFLAGS_MGENERAL_REGS_ONLY=])
--
2.35.3