From 4376b6f7d22d23bdf816c39e40bd4e6912018602 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 7 May 2024 14:42:01 +0200 Subject: [PATCH] Restore Loongson LA64ARCH handling --- Makefile.system | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile.system b/Makefile.system index 8a7099808..f452011ad 100644 --- a/Makefile.system +++ b/Makefile.system @@ -962,12 +962,18 @@ endif ifeq ($(ARCH), loongarch64) LA64_ABI=$(shell $(CC) -mabi=lp64d -c $(TOPDIR)/cpuid_loongarch64.c -o /dev/null > /dev/null 2> /dev/null && echo lp64d) +LA64_ARCH=$(shell $(CC) -march=loongarch64 -c $(TOPDIR)/cpuid_loongarch64.c -o /dev/null > /dev/null 2> /dev/null && echo loongarch64) ifneq ($(LA64_ABI), lp64d) LA64_ABI=lp64 endif +ifneq ($(LA64_ARCH), loongarch64) +CCOMMON_OPT += -mabi=$(LA64_ABI) +FCOMMON_OPT += -mabi=$(LA64_ABI) +else CCOMMON_OPT += -march=loongarch64 -mabi=$(LA64_ABI) FCOMMON_OPT += -march=loongarch64 -mabi=$(LA64_ABI) endif +endif endif