Bug 12336

Summary: musl 1.18 fails to build for armv5te
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Andrea Adami <andrea.adami>
Component: coreAssignee: Khem Raj <raj.khem>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher, randy.macleod
Version: 5.99   
Target Milestone: 2.5 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

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>