Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Waldemar Brodkorb <wbx@openadk.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] ffmpeg: fix bfin compile
Date: Mon, 22 Aug 2016 00:14:22 +0200	[thread overview]
Message-ID: <20160821221421.GA7744@waldemar-brodkorb.de> (raw)

A gcc bug is triggered when Os/O2/O3 is used to compile the function.
Just force O1 for the problematic function for Blackfin.
See gcc bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77311

Fixes:
  http://autobuild.buildroot.net/results/1118d568959006b7f973761884fd3f4b63be19b1/

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
v1 -> v2:
 - report bug to gcc project add SoB to patch, requested by Thomas Petazzoni
---
 .../ffmpeg/0013-bfin-disable-optimization.patch    | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/ffmpeg/0013-bfin-disable-optimization.patch

diff --git a/package/ffmpeg/0013-bfin-disable-optimization.patch b/package/ffmpeg/0013-bfin-disable-optimization.patch
new file mode 100644
index 0000000..1d8a4f0
--- /dev/null
+++ b/package/ffmpeg/0013-bfin-disable-optimization.patch
@@ -0,0 +1,26 @@
+Fix bfin compile error
+
+See gcc bug report:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77311
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+
+diff -Nur ffmpeg-2.8.7.orig/libavcodec/hevcdsp_template.c ffmpeg-2.8.7/libavcodec/hevcdsp_template.c
+--- ffmpeg-2.8.7.orig/libavcodec/hevcdsp_template.c	2016-03-29 04:25:16.000000000 +0200
++++ ffmpeg-2.8.7/libavcodec/hevcdsp_template.c	2016-08-12 21:32:36.728178969 +0200
+@@ -1517,7 +1517,14 @@
+ #define TQ2 pix[2  * xstride + 3 * ystride]
+ #define TQ3 pix[3  * xstride + 3 * ystride]
+ 
+-static void FUNC(hevc_loop_filter_luma)(uint8_t *_pix,
++// Blackfin gcc 6.1.x fails with
++// unable to find a register to spill in class CCREGS
++#if defined(__bfin__)
++#define disable_opt __attribute__ ((optimize("O1")))
++#else
++#define disable_opt 
++#endif
++static void disable_opt FUNC(hevc_loop_filter_luma)(uint8_t *_pix,
+                                         ptrdiff_t _xstride, ptrdiff_t _ystride,
+                                         int beta, int *_tc,
+                                         uint8_t *_no_p, uint8_t *_no_q)
-- 
2.1.4

             reply	other threads:[~2016-08-21 22:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-21 22:14 Waldemar Brodkorb [this message]
2016-08-22 15:21 ` [Buildroot] [PATCH v2] ffmpeg: fix bfin compile Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160821221421.GA7744@waldemar-brodkorb.de \
    --to=wbx@openadk.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox