summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2018-12-01 21:00:50 (GMT)
committerGitHub <noreply@github.com>2018-12-01 21:00:50 (GMT)
commitdc681ec8eb53eccdd18521853abaf0574d6ae75f (patch)
tree67532a4e3a2498ab5663bb400649ec847ced6ba7 /scripts/functions
parent951afda5088f202eead14e3ae281f234b160af0b (diff)
parent40d5bf64408a0e103f8149f941ea50fbbb11dc91 (diff)
Merge pull request #1102 from stilor/moxie
Moxie architecture support
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions80
1 files changed, 40 insertions, 40 deletions
diff --git a/scripts/functions b/scripts/functions
index 7150b5b..6e54582 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -23,7 +23,7 @@ CT_LoadConfig() {
. "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh"
. "${CT_LIB_DIR}/scripts/build/companion_libs.sh"
. "${CT_LIB_DIR}/scripts/build/binutils/${CT_BINUTILS}.sh"
- . "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh"
+ . "${CT_LIB_DIR}/scripts/build/libc.sh"
. "${CT_LIB_DIR}/scripts/build/cc/${CT_CC}.sh"
. "${CT_LIB_DIR}/scripts/build/debug.sh"
. "${CT_LIB_DIR}/scripts/build/test_suite.sh"
@@ -1091,16 +1091,16 @@ CT_DoBuildTargetTuple() {
# Set defaults for the system part of the tuple. Can be overriden
# by architecture-specific values.
case "${CT_LIBC}" in
- *glibc) CT_TARGET_SYS=gnu;;
- uClibc) CT_TARGET_SYS=uclibc;;
- musl) CT_TARGET_SYS=musl;;
+ glibc) CT_TARGET_SYS=gnu;;
+ uClibc) CT_TARGET_SYS=uclibc;;
+ musl) CT_TARGET_SYS=musl;;
bionic) CT_TARGET_SYS=android;;
- avr-libc)
- # avr-libc only seems to work with the non-canonical "avr" target.
- CT_TARGET_SKIP_CONFIG_SUB=y
- CT_TARGET_SYS= # CT_TARGET_SYS must be empty too
- ;;
- *) CT_TARGET_SYS=elf;;
+ none|newlib)
+ CT_TARGET_SYS=elf
+ ;;
+ *)
+ CT_TARGET_SYS= # Keep empty for the libraries like mingw
+ ;;
esac
# Set the default values for ARCH, ABI, CPU, TUNE, FPU and FLOAT
@@ -1719,27 +1719,34 @@ CT_Mirrors()
echo "https://releases.linaro.org/archive/${yymm}/components/toolchain/${project}-linaro"
;;
kernel.org)
- # TBD move to linux.sh?
- if [ "${project}" != "linux" ]; then
- echo "-unknown-"
- fi
- local version="${CT_LINUX_VERSION}"
- case "${version}" in
- '')
- # Ignore, this happens before .config is fully evaluated
- ;;
- [34].*)
- echo "http://www.kernel.org/pub/linux/kernel/v${version%%.*}.x"
- ;;
- 2.6.*)
- echo "http://www.kernel.org/pub/linux/kernel/v2.6"
+ # TBD move to linux.sh and dtc.sh?
+ case "${project}" in
+ linux)
+ local version="${CT_LINUX_VERSION}"
case "${version}" in
- 2.6.*.*)
- echo "http://www.kernel.org/pub/linux/kernel/v2.6/longterm"
- echo "http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v${version%.*}"
+ '')
+ # Ignore, this happens before .config is fully evaluated
+ ;;
+ [34].*)
+ echo "http://www.kernel.org/pub/linux/kernel/v${version%%.*}.x"
+ ;;
+ 2.6.*)
+ echo "http://www.kernel.org/pub/linux/kernel/v2.6"
+ case "${version}" in
+ 2.6.*.*)
+ echo "http://www.kernel.org/pub/linux/kernel/v2.6/longterm"
+ echo "http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v${version%.*}"
+ ;;
+ esac
+ ;;
+ *)
+ echo "-unknown-"
;;
esac
;;
+ dtc)
+ echo "https://mirrors.edge.kernel.org/pub/software/utils/dtc"
+ ;;
*)
echo "-unknown-"
;;
@@ -1977,6 +1984,7 @@ CT_PackageRun()
src_release mirrors archive_filename archive_dirname archive_formats signature_format \
src_devel devel_vcs devel_url devel_branch devel_revision devel_subdir devel_bootstrap \
src_custom custom_location patch_order; do
+ CT_DoLog DEBUG "Package iterator: set ${v}=\${CT_${use}_${v^^}}"
eval "local ${v}=\${CT_${use}_${v^^}}"
done
@@ -1992,6 +2000,7 @@ CT_PackageRun()
eval "eval ${v}=\${${v}//@/$}"
done
+ CT_DoLog DEBUG "Package iterator: run ${run} $*"
${run} "$@"
# Save certain variables that may be modified by the callback.
@@ -2357,7 +2366,10 @@ CT_GetPkgBuildVersion()
fi
__do_GetPkgBuildVersion() {
- tmp="${pkg_name}-${version}"
+ tmp="${pkg_name}"
+ if [ "${version}" != "unknown" ]; then
+ tmp+="-${version}"
+ fi
if [ "${src_devel}" = "y" ]; then
tmp+="-${devel_vcs}"
if [ -n "${devel_revision}" ]; then
@@ -2375,18 +2387,6 @@ CT_GetPkgBuildVersion()
eval "${var}=\"${tmp}\""
}
-# Get a package version as selected by a generated choice in kconfig.
-CT_GetChoicePkgBuildVersion()
-{
- local choice="${1}"
- local var="${2}"
- local component
-
- # Find the selected component
- eval "component=\${CT_${choice}_CHOICE_KSYM}"
- CT_GetPkgBuildVersion "${choice}" "${component}" "${var}"
-}
-
# Finally, load paths.sh. For --enable-local build, it is located in
# the current directory (CT_TOP_DIR) while the rest of the scripts are
# in the source directory (CT_LIB_DIR). For other setups, paths.sh