From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- .../ffmpeg/ffmpeg/clang_mips64.patch | 28 +++++++++++++++ .../recipes-multimedia/ffmpeg/ffmpeg_%.bbappend | 3 ++ ...-using-code-when-using-clang-mips64-combo.patch | 40 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-libav_%.bbappend | 4 +++ 4 files changed, 75 insertions(+) create mode 100644 external/meta-clang/recipes-multimedia/ffmpeg/ffmpeg/clang_mips64.patch create mode 100644 external/meta-clang/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend create mode 100644 external/meta-clang/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch create mode 100644 external/meta-clang/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend (limited to 'external/meta-clang/recipes-multimedia') diff --git a/external/meta-clang/recipes-multimedia/ffmpeg/ffmpeg/clang_mips64.patch b/external/meta-clang/recipes-multimedia/ffmpeg/ffmpeg/clang_mips64.patch new file mode 100644 index 00000000..9206af1f --- /dev/null +++ b/external/meta-clang/recipes-multimedia/ffmpeg/ffmpeg/clang_mips64.patch @@ -0,0 +1,28 @@ +Disable fpu using code when using clang/mips64 combo +it works around clang's inline asm error + +error: couldn't allocate output register for constraint 'r' + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +--- a/libavcodec/mips/aacdec_mips.c ++++ b/libavcodec/mips/aacdec_mips.c +@@ -282,7 +282,7 @@ static void apply_ltp_mips(AACContext *a + } + } + +-#if HAVE_MIPSFPU ++#if HAVE_MIPSFPU && !defined(__clang__) + static av_always_inline void fmul_and_reverse(float *dst, const float *src0, const float *src1, int count) + { + /* Multiply 'count' floats in src0 by src1 and store the results in dst in reverse */ +@@ -435,7 +435,7 @@ void ff_aacdec_init_mips(AACContext *c) + #if HAVE_INLINE_ASM + c->imdct_and_windowing = imdct_and_windowing_mips; + c->apply_ltp = apply_ltp_mips; +-#if HAVE_MIPSFPU ++#if HAVE_MIPSFPU && !defined(__clang__) + c->update_ltp = update_ltp_mips; + #endif /* HAVE_MIPSFPU */ + #endif /* HAVE_INLINE_ASM */ diff --git a/external/meta-clang/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend b/external/meta-clang/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend new file mode 100644 index 00000000..2077fdad --- /dev/null +++ b/external/meta-clang/recipes-multimedia/ffmpeg/ffmpeg_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_toolchain-clang_mips64 = " file://clang_mips64.patch" diff --git a/external/meta-clang/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch b/external/meta-clang/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch new file mode 100644 index 00000000..93ab73fb --- /dev/null +++ b/external/meta-clang/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch @@ -0,0 +1,40 @@ +From 91c980d4cf88b0c12fe5971fe16c7b97b5a942af Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 17 Dec 2019 14:57:55 -0800 +Subject: [PATCH] Disable fpu using code when using clang/mips64 combo + +it works around clang's inline asm error + +error: couldn't allocate output register for constraint 'r' + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c b/gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c +index 253cdeb..df4f25d 100644 +--- a/gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c ++++ b/gst-libs/ext/libav/libavcodec/mips/aacdec_mips.c +@@ -282,7 +282,7 @@ static void apply_ltp_mips(AACContext *ac, SingleChannelElement *sce) + } + } + +-#if HAVE_MIPSFPU ++#if HAVE_MIPSFPU && !defined(__clang__) + static av_always_inline void fmul_and_reverse(float *dst, const float *src0, const float *src1, int count) + { + /* Multiply 'count' floats in src0 by src1 and store the results in dst in reverse */ +@@ -435,7 +435,7 @@ void ff_aacdec_init_mips(AACContext *c) + #if HAVE_INLINE_ASM + c->imdct_and_windowing = imdct_and_windowing_mips; + c->apply_ltp = apply_ltp_mips; +-#if HAVE_MIPSFPU ++#if HAVE_MIPSFPU && !defined(__clang__) + c->update_ltp = update_ltp_mips; + #endif /* HAVE_MIPSFPU */ + #endif /* HAVE_INLINE_ASM */ +-- +2.24.1 + diff --git a/external/meta-clang/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend b/external/meta-clang/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend new file mode 100644 index 00000000..dee9619a --- /dev/null +++ b/external/meta-clang/recipes-multimedia/gstreamer/gstreamer1.0-libav_%.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_toolchain-clang_mips64 = " file://0001-Disable-fpu-using-code-when-using-clang-mips64-combo.patch" + -- cgit 1.2.3-korg