diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-03-31 21:00:08 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2016-04-08 12:08:33 +0200 |
commit | 97fd876f62c3106cbcafa79e5f05b0a8f14c3d9e (patch) | |
tree | 40681d4bfa6ce5437bb16b501436a0a0c2b2cb96 /package/musl | |
parent | 696db774843ec02c10c756a39e4aee6c29de7f78 (diff) |
musl: build broken on Thumb, use ARM mode
Building the musl C library on Thumb (Thumb1, not Thumb2), fails with:
{standard input}:20: Error: only lo regs allowed with immediate -- `mov fp,#0'
{standard input}:21: Error: only lo regs allowed with immediate -- `mov lr,#0'
{standard input}:25: Error: unshifted register required -- `and ip,a1,#-16'
Since there are no cores that we support that are Thumb1 only, use the
same solution as the one used by glibc: build the C library in ARM
mode.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/musl')
-rw-r--r-- | package/musl/musl.mk | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/package/musl/musl.mk b/package/musl/musl.mk index 081a70028..733f940db 100644 --- a/package/musl/musl.mk +++ b/package/musl/musl.mk @@ -23,6 +23,12 @@ MUSL_ADD_TOOLCHAIN_DEPENDENCY = NO MUSL_INSTALL_STAGING = YES +# Thumb build is broken, build in ARM mode, since all architectures +# that support Thumb1 also support ARM. +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) +MUSL_EXTRA_CFLAGS += -marm +endif + define MUSL_CONFIGURE_CMDS (cd $(@D); \ $(TARGET_CONFIGURE_OPTS) \ |