[OpenWrt-Devel] [PATCHv2] musl: fix build on sh3

Zoltan HERPAI wigyori at uid0.hu
Fri Sep 18 20:22:25 EDT 2015


musl fails to build when compiled with gcc on sh3 (GCC target/#67260).
Work it around.

Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 toolchain/musl/common.mk |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk
index 82c1543..3045c63 100644
--- a/toolchain/musl/common.mk
+++ b/toolchain/musl/common.mk
@@ -23,6 +23,12 @@ HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION)
 include $(INCLUDE_DIR)/toolchain-build.mk
 include $(INCLUDE_DIR)/hardening.mk
 
+# Please see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67260
+ifeq ($(CONFIG_sh3),y)
+TARGET_CFLAGS+= \
+	-fno-optimize-sibling-calls
+endif
+
 MUSL_CONFIGURE:= \
 	$(TARGET_CONFIGURE_OPTS) \
 	CFLAGS="$(TARGET_CFLAGS)" \
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list