From d57d6def733e6324d4ec7bcbf0ef4ef7ed5e551b Mon Sep 17 00:00:00 2001 From: Jiaxun Yang Date: Sat, 18 Jul 2020 23:35:37 +0800 Subject: ffbuild: Refine MIPS handling To enable runtime detection for MIPS, we need to refine ffbuild part to support buildding these feature together. Firstly, we fixed configure, let it probe native ability of toolchain to decide wether a feature can to be enabled, also clearly marked the conflictions between loongson2 & loongson3 and Release 6 & rest. Secondly, we compile MMI and MSA C sources with their own flags to ensure their flags won't pollute the whole program and generate illegal code. Signed-off-by: Jiaxun Yang Reviewed-by: Shiyou Yin Signed-off-by: Michael Niedermayer --- ffbuild/common.mak | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ffbuild') diff --git a/ffbuild/common.mak b/ffbuild/common.mak index a60d27c9bd..13e13553b8 100644 --- a/ffbuild/common.mak +++ b/ffbuild/common.mak @@ -44,7 +44,7 @@ LDFLAGS := $(ALLFFLIBS:%=$(LD_PATH)lib%) $(LDFLAGS) define COMPILE $(call $(1)DEP,$(1)) - $($(1)) $($(1)FLAGS) $($(1)_DEPFLAGS) $($(1)_C) $($(1)_O) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) + $($(1)) $($(1)FLAGS) $($(2)) $($(1)_DEPFLAGS) $($(1)_C) $($(1)_O) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) endef COMPILE_C = $(call COMPILE,CC) @@ -54,6 +54,14 @@ COMPILE_M = $(call COMPILE,OBJCC) COMPILE_X86ASM = $(call COMPILE,X86ASM) COMPILE_HOSTC = $(call COMPILE,HOSTCC) COMPILE_NVCC = $(call COMPILE,NVCC) +COMPILE_MMI = $(call COMPILE,CC,MMIFLAGS) +COMPILE_MSA = $(call COMPILE,CC,MSAFLAGS) + +%_mmi.o: %_mmi.c + $(COMPILE_MMI) + +%_msa.o: %_msa.c + $(COMPILE_MSA) %.o: %.c $(COMPILE_C) -- cgit v1.2.3