[Buildroot] [PATCH] package/libxslt: fix bfin compile

Jörg Krause joerg.krause at embedded.rocks
Wed Sep 21 20:21:07 UTC 2016


A GCC bug is triggered when the compiler is run with an optimization level
'-Os/-O2/-O3' for the Blackfin architecture:

```
error: unable to find a register to spill in class 'CCREGS'
```

Workaround this bug by forcing an optimization level of '-O1' when building
libxslt for the Blackfin architecture.

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

Signed-off-by: Jörg Krause <joerg.krause at embedded.rocks>
---
 package/libxslt/libxslt.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/libxslt/libxslt.mk b/package/libxslt/libxslt.mk
index 868ba6a..4253a60 100644
--- a/package/libxslt/libxslt.mk
+++ b/package/libxslt/libxslt.mk
@@ -19,6 +19,12 @@ LIBXSLT_CONF_OPTS = \
 LIBXSLT_CONFIG_SCRIPTS = xslt-config
 LIBXSLT_DEPENDENCIES = libxml2
 
+# GCC bug with Os/O2/O3, PR77311
+# error: unable to find a register to spill in class 'CCREGS'
+ifeq ($(BR2_bfin),y)
+LIBXSLT_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O1"
+endif
+
 # If we have enabled libgcrypt then use it, else disable crypto support.
 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
 LIBXSLT_DEPENDENCIES += libgcrypt
-- 
2.10.0



More information about the buildroot mailing list