ARMv8.0-A cpus have an optional LSE feature. This is mandatory in
ARMv8.1-A. By default, gcc will attempt to build support for runtime
detection of the LSE feature on ARMv8.0-A. This causes build failures
when attempting to create a 64-bit userland.
Test packages for this failure include gdb and mesa. Errors manifest
as undefined references to "__aarch64_cas4_acq_rel" or
"__aarch64_swp4_acq_rel" at compile time.
Disable runtime detection to always use its fallback by adding
-mno-outline-atomics to cflags.
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
When compiling glibc for cortex-a9, the following errors appears:
cc1: error: switch -mcpu=cortex-a9 conflicts with -march=armv7-a switch [-Werror]
Using mcpu with march and mtune is not recommended and compiler emits
warnings/errors when mismatched.