mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-21 21:57:48 +00:00
0a64056dd3
In case we build for ARC core which has no support of atomic ops among other things we need to configure libc to use Linux kernel helper to emulate HS atomic ops. This is done with disabling of CONFIG_ARC_HAS_ATOMICS in uClibc. Currently we __remove__ this option from .config but this makes no sense as its default state is "y" so we need to explicitly disable it instead. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
35 lines
752 B
Bash
35 lines
752 B
Bash
# Compute ARC-specific values
|
|
|
|
CT_DoArchTupleValues() {
|
|
# The architecture part of the tuple:
|
|
CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_SUFFIX:-${target_endian_eb}}"
|
|
|
|
# The system part of the tuple:
|
|
case "${CT_LIBC}" in
|
|
glibc) CT_TARGET_SYS=gnu;;
|
|
uClibc) CT_TARGET_SYS=uclibc;;
|
|
esac
|
|
}
|
|
|
|
CT_DoArchUClibcConfig() {
|
|
local cfg="${1}"
|
|
|
|
CT_DoArchUClibcSelectArch "${cfg}" "arc"
|
|
}
|
|
|
|
CT_DoArchUClibcCflags() {
|
|
local cfg="${1}"
|
|
local cflags="${2}"
|
|
local f
|
|
|
|
CT_KconfigDisableOption "CONFIG_ARC_HAS_ATOMICS" "${cfg}"
|
|
|
|
for f in ${cflags}; do
|
|
case "${f}" in
|
|
-matomic)
|
|
CT_KconfigEnableOption "CONFIG_ARC_HAS_ATOMICS" "${cfg}"
|
|
;;
|
|
esac
|
|
done
|
|
}
|