2016-04-02 07:12:41 +00:00
|
|
|
# This file provides the default implementations of arch-specific functions.
|
|
|
|
|
|
|
|
# Set up the target tuple
|
|
|
|
CT_DoArchTupleValues() {
|
|
|
|
:;
|
|
|
|
}
|
|
|
|
|
2017-03-27 06:32:27 +00:00
|
|
|
# Adjust the list of multilibs for the target
|
|
|
|
CT_DoArchMultilibList() {
|
|
|
|
:;
|
|
|
|
}
|
|
|
|
|
2016-04-02 07:12:41 +00:00
|
|
|
# Multilib: change the target triplet according to CFLAGS
|
2016-04-03 17:26:24 +00:00
|
|
|
# Usage: CT_DoArchGlibcAdjustTuple <variable-name> <CFLAGS>
|
2016-04-02 07:12:41 +00:00
|
|
|
CT_DoArchMultilibTarget() {
|
2016-04-03 17:26:24 +00:00
|
|
|
:;
|
2016-04-02 07:12:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Multilib: Adjust target tuple for GLIBC
|
2016-04-03 17:26:24 +00:00
|
|
|
# Usage: CT_DoArchGlibcAdjustTuple <variable-name>
|
2016-04-02 07:12:41 +00:00
|
|
|
CT_DoArchGlibcAdjustTuple() {
|
2016-04-03 17:26:24 +00:00
|
|
|
:;
|
2016-04-02 07:12:41 +00:00
|
|
|
}
|
|
|
|
|
2017-09-02 17:08:47 +00:00
|
|
|
# Multilib: Adjust configure arguments for GLIBC
|
|
|
|
# Usage: CT_DoArchGlibcAdjustConfigure <configure-args-array-name> <cflags>
|
|
|
|
CT_DoArchGlibcAdjustConfigure() {
|
|
|
|
:;
|
|
|
|
}
|
|
|
|
|
2016-04-04 15:25:07 +00:00
|
|
|
# Helper for uClibc configurators: select the architecture
|
|
|
|
# Usage: CT_DoArchUClibcSelectArch <config-file> <architecture>
|
|
|
|
CT_DoArchUClibcSelectArch() {
|
|
|
|
local cfg="${1}"
|
|
|
|
local arch="${2}"
|
|
|
|
|
2017-02-27 03:06:35 +00:00
|
|
|
sed -i -r -e '/^TARGET_.*/d' "${cfg}"
|
2016-04-04 15:25:07 +00:00
|
|
|
CT_KconfigEnableOption "TARGET_${arch}" "${cfg}"
|
|
|
|
CT_KconfigSetOption "TARGET_ARCH" "${arch}" "${cfg}"
|
|
|
|
}
|
|
|
|
|
|
|
|
# uClibc: Adjust configuration file according to the CT-NG configuration
|
2016-04-05 21:47:20 +00:00
|
|
|
# Usage: CT_DoArchUClibcConfig <config-file>
|
2016-04-04 15:25:07 +00:00
|
|
|
CT_DoArchUClibcConfig() {
|
|
|
|
CT_DoLog WARN "Support for '${CT_ARCH}' is not implemented in uClibc config tweaker."
|
|
|
|
CT_DoLog WARN "Exact configuration file must be provided."
|
|
|
|
}
|
|
|
|
|
2016-04-05 21:47:20 +00:00
|
|
|
# Multilib/uClibc: Adjust configuration file for given CFLAGS
|
|
|
|
# Usage: CT_DoArchUClibcCflags <config-file> <cflags>
|
|
|
|
CT_DoArchUClibcCflags() {
|
|
|
|
local cfg="${1}"
|
|
|
|
local cflags="${2}"
|
|
|
|
|
|
|
|
# Likely, any non-default cflags need to be reflected into the config.
|
|
|
|
# It may work if we just pass them into EXTRA_CFLAGS, but we have no
|
2017-03-27 06:32:27 +00:00
|
|
|
# idea how they might interact with the CFLAGS inferred by uClibc from
|
2016-04-05 21:47:20 +00:00
|
|
|
# the configuration file.
|
|
|
|
if [ "${cflags}" != "" ]; then
|
|
|
|
CT_DoLog WARN "Multilib configuration not supported for uClibc/${CT_ARCH}"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# Multilib/uClibc: Adjust header installation path for given CFLAGS
|
|
|
|
# Usage: CT_DoArchUClibcHeaderDir <path-variable> <cflags>
|
|
|
|
CT_DoArchUClibcHeaderDir() {
|
|
|
|
# Only needed if a given architecture may select different uClibc architectures.
|
|
|
|
:;
|
|
|
|
}
|
|
|
|
|
2016-04-14 07:30:34 +00:00
|
|
|
# Multilib/MUSL: Adjust header installation path for given CFLAGS
|
|
|
|
# Usage: CT_DoArchMUSLHeaderDir <path-variable> <cflags>
|
|
|
|
CT_DoArchMUSLHeaderDir() {
|
|
|
|
# Only needed if a given architecture may select different MUSL architectures.
|
|
|
|
:;
|
|
|
|
}
|
|
|
|
|
2017-01-26 21:50:18 +00:00
|
|
|
# MUSL: Perform any final adjustments on the installed libc/headers
|
|
|
|
CT_DoArchMUSLPostInstall() {
|
|
|
|
:;
|
|
|
|
}
|
|
|
|
|
2016-04-02 07:12:41 +00:00
|
|
|
# Override from the actual arch implementation as needed.
|
|
|
|
. "${CT_LIB_DIR}/scripts/build/arch/${CT_ARCH}.sh"
|