Skip to contentSkip to conversation

toolchain-external: add support for musl toolchain on ARM EABIhf

PATCH New Thomas Petazzoni 1 participant 2 messages Oct 9, 2015 – Dec 20, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain-external: add support for musl toolchain on ARM EABIhf

Since a few releases, the pre-built musl external toolchain has added an ARM EABIhf variant, built for ARMv5T. This commit allows this additional external toolchain to be used.

---
 toolchain/toolchain-external/Config.in             | 10 +++++++---
 toolchain/toolchain-external/toolchain-external.mk |  4 +++-
 2 files changed, 10 insertions(+), 4 deletions(-)
toolchain/toolchain-external/Config.in +7 -3
index 1bf97b8..a6ac2c9 100644
@@ -820,7 +820,9 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
 
 config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
 	bool "Musl 1.1.6 toolchain (experimental)"
-	depends on (BR2_arm && BR2_ARM_EABI) || (BR2_armeb && BR2_ARM_EABI) || \
+	depends on (BR2_arm && BR2_ARM_EABI) || \
+		(BR2_arm && BR2_ARM_EABIHF && !BR2_ARM_CPU_ARMV4) || \
+		(BR2_armeb && BR2_ARM_EABI) || \
 		(BR2_i386 && !BR2_x86_i386) || BR2_microblazebe || BR2_mips || \
 		BR2_mipsel || (BR2_powerpc && BR2_powerpc_CLASSIC) || BR2_x86_64
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
@@ -834,7 +836,8 @@ config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
 	  musl-cross project. It uses gcc 4.9.2, binutils 2.25 and
 	  musl 1.1.6. It does not have a cross debugger included.
 
-	  The ARM toolchain is built for ARMv4t, soft-float.
+	  The ARM soft-float toolchain is built for ARMv4t, while the
+	  ARM hard-float toolchain is built for ARMv5t.
 	  The x86 toolchain is built for i486.
 
 	  http://musl.codu.org/
@@ -940,7 +943,8 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "bfin-linux-uclibc"	 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 && BR2_BINFMT_FDPIC
 	default "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 && BR2_BINFMT_FLAT
 	default "bfin-linux-uclibc"	 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 && BR2_BINFMT_FDPIC
-	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm
+	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
+	default "arm-linux-musleabihf"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF
 	default "armeb-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_armeb
 	default "i486-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_i386
 	default "microblaze-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_microblazebe
toolchain/toolchain-external/toolchain-external.mk +3 -1
index 3fb165c..29ec24d 100644
@@ -376,8 +376,10 @@ TOOLCHAIN_EXTERNAL_SOURCE = aarch64-2014.05-30-aarch64-linux-gnu-i686-pc-linux-g
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y)
 TOOLCHAIN_EXTERNAL_VERSION = 1.1.6
 TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
-ifeq ($(BR2_arm),y)
+ifeq ($(BR2_arm)$(BR2_ARM_EABI),yy)
 TOOLCHAIN_EXTERNAL_SOURCE = crossx86-arm-linux-musleabi-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
+else ifeq ($(BR2_arm)$(BR2_ARM_EABIHF),yy)
+TOOLCHAIN_EXTERNAL_SOURCE = crossx86-arm-linux-musleabihf-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
 else ifeq ($(BR2_armeb),y)
 TOOLCHAIN_EXTERNAL_SOURCE = crossx86-armeb-linux-musleabi-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
 else ifeq ($(BR2_i386),y)
Signature · 1 line
2.6.1
#1 lore raw

PATCH 1/1 toolchain-external: add support for musl toolchain on ARM EABIhf

Hello,

Quoted 9 lines · Thomas Petazzoni

Since a few releases, the pre-built musl external toolchain has added an ARM EABIhf variant, built for ARMv5T. This commit allows this additional external toolchain to be used.

---
 toolchain/toolchain-external/Config.in             | 10 +++++++---
 toolchain/toolchain-external/toolchain-external.mk |  4 +++-
 2 files changed, 10 insertions(+), 4 deletions(-)

I've applied this patch, despite the lack of review, since it was quite a trivial patch.

Best regards,

Thomas

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