summaryrefslogtreecommitdiff
path: root/ffbuild
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2020-07-18 23:35:37 +0800
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-23 16:30:02 +0200
commitd57d6def733e6324d4ec7bcbf0ef4ef7ed5e551b (patch)
treeb35ceb7647f21ab87d001c035ad1560411dda472 /ffbuild
parentb61d3dfab0d75daf81f366c12c57539c90e9b38b (diff)
downloadffmpeg-d57d6def733e6324d4ec7bcbf0ef4ef7ed5e551b.tar.gz
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 <jiaxun.yang@flygoat.com> Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffbuild')
-rw-r--r--ffbuild/common.mak10
1 files changed, 9 insertions, 1 deletions
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)