Raspbian gcc doesn't enable ARMv6K features
Bug #1879036 reported by
Marat Dukhan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Raspbian |
New
|
Undecided
|
Unassigned |
Bug Description
All Raspberry Pi models, including the original Raspberry Pi and Raspberry Pi Zero based on Broadcom BCM2835, support ARMv6K instructions. However, the default compiler on Raspbian - gcc - builds binaries for -march=armv6 (note the lack of K in the end) by default. This is a source of inefficiencies in multi-threaded code, because atomic operations on 8-bit, 16-bit, and 64-bit values result in libatomic library calls instead of directly using native instructions. Interestingly, Raspbian clang is unaffected as it already defaults to -march=armv6k.
Raspbian gcc should build for -march=armv6k by default.
To post a comment you must log in.