diff --git a/Makefile.loongarch64 b/Makefile.loongarch64 index 05ea9c679..fced1a946 100644 --- a/Makefile.loongarch64 +++ b/Makefile.loongarch64 @@ -1,3 +1,4 @@ -ifdef BINARY64 -else +ifeq ($(CORE), LOONGSON3R5) +CCOMMON_OPT += -march=loongarch64 -mabi=lp64 +FCOMMON_OPT += -march=loongarch64 -mabi=lp64 endif diff --git a/Makefile.system b/Makefile.system index 3be5efa0c..9c91425b0 100644 --- a/Makefile.system +++ b/Makefile.system @@ -895,11 +895,6 @@ ifeq ($(OSNAME), AIX) BINARY_DEFINED = 1 endif -ifeq ($(ARCH), loongarch64) -CCOMMON_OPT += -march=loongarch64 -mabi=lp64 -FCOMMON_OPT += -march=loongarch64 -mabi=lp64 -endif - endif ifndef BINARY_DEFINED