Skip to contentSkip to conversation

binutils: fix bfin compile

PATCH New Waldemar Brodkorb 2 participants 2 messages Aug 21, 2016 – Aug 23, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 binutils: fix bfin compile

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

---
 package/binutils/binutils.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/binutils/binutils.mk +6 -0
index 2936eb5..1defbb1 100644
@@ -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
+# 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
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 binutils: fix bfin compile

Hello,

Quoted 15 lines · Waldemar Brodkorb

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

---
 package/binutils/binutils.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/binutils/binutils.mk +0 -0
index 2936eb5..1defbb1 100644
@@ -71,6 +71,12 @@ endif
 BINUTILS_CONF_ENV += ac_cv_prog_MAKEINFO=missing
 HOST_BINUTILS_CONF_ENV += ac_cv_prog_MAKEINFO=missing

package/binutils/binutils.mk endif · line 82

Quoted 10 lines
package/binutils/binutils.mk +6 -0
 
+# gcc bug with Os/O2/O3
+# 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

I've applied to master, after adding the gcc PR reference in the comment.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com