[Buildroot] [git commit] binutils: fix bfin build

From: Thomas Petazzoni <hidden>
Date: 2016-08-23 14:44:21
Subsystem: the rest · Maintainer: Linus Torvalds

commit: https://git.buildroot.net/buildroot/commit/?id=f6fd59ebf01a83dc841cfa66ed250d9e1e83373c
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

See gcc bug for details:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77311

Fixes:

  http://autobuild.buildroot.net/results/1e93be2fb02a3fb2731e48b0d9e54a0d4080a112/

Signed-off-by: Waldemar Brodkorb <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
 package/binutils/binutils.mk | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk
index 2936eb5..85663a8 100644
--- a/package/binutils/binutils.mk
+++ b/package/binutils/binutils.mk
@@ -71,6 +71,12 @@ endif
 BINUTILS_CONF_ENV += ac_cv_prog_MAKEINFO=missing
 HOST_BINUTILS_CONF_ENV += ac_cv_prog_MAKEINFO=missing
 
+# gcc bug with Os/O2/O3, PR77311
+# error: unable to find a register to spill in class 'CCREGS'
+ifeq ($(BR2_bfin),y)
+BINUTILS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O1"
+endif
+
 # Install binutils after busybox to prefer full-blown utilities
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
 BINUTILS_DEPENDENCIES += busybox
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help