Bug 12336 - musl 1.18 fails to build for armv5te
Summary: musl 1.18 fails to build for armv5te
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 5.99
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.5 M1
Assignee: Khem Raj
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-11-11 22:39 UTC by Andrea Adami
Modified: 2018-01-11 16:08 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Adami 2017-11-11 22:39:06 UTC
Hello,

latest musl/1.1.18+gitAUTOINC+eb03bde2f2-r0 fails to build for armv5te:
...
  Error: selected processor does not support `clz r2,r1' in Thumb mode
  Makefile:164: recipe for target 'obj/src/math/fma.lo' failed
...

Initially I found the patch fizing the ARM mode:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879190

Then I read about clx:
This ARM instruction is available in ARMv5T and above.
This 32-bit Thumb instruction is available in ARMv6T2 and above.
There is no 16-bit version of this instruction in Thumb.

Ah ha...my fix for the moment has been:

ARM_INSTRUCTION_SET_armv5 = "arm"


Regards
Andrea
Comment 1 Khem Raj 2017-11-13 17:18:12 UTC
thumb1 is not supported with musl. So your fix is right if added to musl.inc file. Please send it to mailing list also do the same for armv4
Comment 3 Randy MacLeod 2018-01-11 16:08:51 UTC
commit d29bd5571187cb30d25f3a885e9e61aa20dd6d7a
Author: Andrea Adami <andrea.adami@gmail.com>
Date:   Tue Nov 14 18:23:13 2017 -0800

    musl: Disable thumb1 ISA
    
    thumb1 is unsupported see http://www.openwall.com/lists/musl/2017/10/20/10
    
    Fix
    [YOCTO #12336]
    
    Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
    Signed-off-by: Khem Raj <raj.khem@gmail.com>