We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a4fac1 commit 67d1e72Copy full SHA for 67d1e72
1 file changed
Makefile.system
@@ -932,8 +932,12 @@ BINARY_DEFINED = 1
932
endif
933
934
ifeq ($(ARCH), loongarch64)
935
-CCOMMON_OPT += -march=loongarch64 -mabi=lp64
936
-FCOMMON_OPT += -march=loongarch64 -mabi=lp64
+LA64_ABI=$(shell $(CC) -mabi=lp64d -c $(TOPDIR)/cpuid_loongarch64.c -o /dev/null > /dev/null 2> /dev/null && echo lp64d)
+ifneq ($(LA64_ABI), lp64d)
937
+LA64_ABI=lp64
938
+endif
939
+CCOMMON_OPT += -march=loongarch64 -mabi=$(LA64_ABI)
940
+FCOMMON_OPT += -march=loongarch64 -mabi=$(LA64_ABI)
941
942
943
0 commit comments