mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-20 09:06:19 +00:00
Fixes for building
- Need GDB8.0 milestone - Make uClibc "master" package - Rename bionic -> android-ndk to match the package name and support suffixes for archives Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
parent
b155ce6ab8
commit
d0ff020e23
@ -11,7 +11,7 @@
|
||||
## help This platform has no TLS (Thread Local Storage) support so that option must be
|
||||
## help disabled in the Compiler options.
|
||||
|
||||
source "config/versions/bionic.in"
|
||||
source "config/versions/android-ndk.in"
|
||||
|
||||
config THREADS
|
||||
default "posix"
|
||||
|
@ -12,7 +12,7 @@
|
||||
## help Highly configurable, thus as feature-rich as you
|
||||
## help need, without compromising for size.
|
||||
|
||||
source "config/versions/uClibc-ng.in"
|
||||
source "config/versions/uClibc.in"
|
||||
|
||||
config THREADS
|
||||
default "nptl" if THREADS_NATIVE
|
||||
|
@ -201,7 +201,7 @@ config_dir=config/versions
|
||||
template=maintainer/kconfig-versions.template
|
||||
|
||||
declare -A pkg_forks pkg_milestones pkg_nforks
|
||||
declare -a pkg_masters pkg_all
|
||||
declare -a pkg_masters pkg_all pkg_preferred
|
||||
|
||||
# Convert the argument to a Kconfig-style macro
|
||||
kconfigize()
|
||||
@ -406,17 +406,23 @@ find_forks()
|
||||
{
|
||||
local -A info
|
||||
|
||||
info[preferred]=${1}
|
||||
eval `read_package_desc ${1}`
|
||||
|
||||
if [ -n "${info[master]}" ]; then
|
||||
pkg_nforks[${info[master]}]=$[pkg_nforks[${info[master]}]+1]
|
||||
pkg_forks[${info[master]}]+=" ${1}"
|
||||
pkg_forks[${info[master]}]+=" ${1} "
|
||||
else
|
||||
pkg_preferred[${1}]=${info[preferred]}
|
||||
pkg_nforks[${1}]=$[pkg_nforks[${1}]+1]
|
||||
pkg_forks[${1}]="${1}${pkg_forks[${1}]}"
|
||||
pkg_forks[${1}]+=" ${1} "
|
||||
pkg_milestones[${1}]=`sort_versions ${info[milestones]}`
|
||||
pkg_masters+=( "${1}" )
|
||||
fi
|
||||
# Keep sorting so that preferred fork is first
|
||||
if [ -n "${pkg_preferred[${1}]}" ]; then
|
||||
pkg_forks[${1}]="${pkg_preferred[${1}]} ${pkg_forks[${1}]##* ${pkg_preferred[${1}]} } ${pkg_forks[${1}]%% ${pkg_preferred[${1}]} *}"
|
||||
fi
|
||||
}
|
||||
|
||||
check_obsolete_experimental()
|
||||
@ -442,15 +448,16 @@ enter_fork()
|
||||
info[fork]=${fork}
|
||||
info[name]=${fork}
|
||||
info[mirrors]=
|
||||
info[archivesuffix]=
|
||||
|
||||
eval `read_package_desc ${fork}`
|
||||
|
||||
info[pfx]=`kconfigize ${fork}`
|
||||
info[originpfx]=`kconfigize ${info[origin]}`
|
||||
if [ -r "packages/${info[origin]}.help" ]; then
|
||||
info[originhelp]=`sed 's/^/\t /' "packages/${info[origin]}.help"`
|
||||
info[originhelp]=`sed 's/^/ /' "packages/${info[origin]}.help"`
|
||||
else
|
||||
info[originhelp]="${info[master]} from ${info[origin]}."
|
||||
info[originhelp]=" ${info[master]} from ${info[origin]}."
|
||||
fi
|
||||
|
||||
if [ -n "${info[repository]}" ]; then
|
||||
@ -467,7 +474,7 @@ enter_fork()
|
||||
info[all_versions]=${versions}
|
||||
|
||||
# If a fork does not define any versions at all ("rolling release"), do not
|
||||
# consider it obsolete/experimental unless it is marked in the fork's
|
||||
# consider it obsolete/experimental unless it is so marked in the fork's
|
||||
# description.
|
||||
if [ -n "${versions}" ]; then
|
||||
only_obsolete=yes
|
||||
|
@ -172,6 +172,10 @@ config @@pfx@@_MIRRORS
|
||||
string
|
||||
default "@@mirrors@@"
|
||||
|
||||
config @@pfx@@_ARCHIVE_SUFFIX
|
||||
string
|
||||
default "@@archivesuffix@@"
|
||||
|
||||
#!end-if
|
||||
|
||||
#!// Below, we explicitly select all milestones to which a given version
|
||||
|
@ -1,2 +1,3 @@
|
||||
# We don't support building bionic (yet) so no official repository
|
||||
archivesuffix='-linux-x86_64'
|
||||
mirrors='https://dl.google.com/android/repository'
|
0
packages/android-ndk/r15b/version.desc
Normal file
0
packages/android-ndk/r15b/version.desc
Normal file
@ -1 +0,0 @@
|
||||
experimental='yes'
|
@ -1,4 +1,4 @@
|
||||
origin='GNU'
|
||||
repository='git git://sourceware.org/git/binutils-gdb.git'
|
||||
mirrors='$(CT_Mirrors GNU gdb) $(CT_Mirrors sourceware gdb)'
|
||||
milestones='7.0 7.2'
|
||||
milestones='7.0 7.2 8.0'
|
||||
|
@ -1,4 +1,4 @@
|
||||
master='uClibc'
|
||||
origin='uclibc-ng.org'
|
||||
repository='git git://uclibc-ng.org/git/uclibc-ng'
|
||||
mirrors='http://downloads.uclibc-ng.org/releases/${CT_UCLIBC_NG_VERSION}'
|
||||
milestones='0.9.33.2 1.0.0 1.0.15'
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Technically, it is the other way around: uClibc-ng is a fork of uClibc. But
|
||||
# uClibc is no longer maintained, so we want people to use uClibc-ng.
|
||||
master='uClibc-ng'
|
||||
# Even though this is the "master" package, we really want to steer the users
|
||||
# towards uClibc-ng, as the original uClibc is no longer maintained.
|
||||
preferred='uClibc-ng'
|
||||
origin='uclibc.org'
|
||||
repository='git git://git.busybox.net/uClibc'
|
||||
mirrors='http://www.uclibc.org/downloads http://www.uclibc.org/downloads/old-releases'
|
||||
milestones='0.9.33.2 1.0.0 1.0.15'
|
||||
|
@ -3,17 +3,17 @@
|
||||
# Licensed under the GPL v2. See COPYING in the root of this package
|
||||
|
||||
do_libc_get() {
|
||||
CT_Fetch BIONIC
|
||||
CT_Fetch ANDROID_NDK
|
||||
}
|
||||
|
||||
do_libc_extract() {
|
||||
CT_ExtractPatch BIONIC
|
||||
CT_ExtractPatch ANDROID_NDK
|
||||
}
|
||||
|
||||
# Install Unified headers
|
||||
do_libc_start_files() {
|
||||
CT_DoStep INFO "Installing C library headers"
|
||||
CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/bionic/sysroot/usr" "${CT_SYSROOT_DIR}"
|
||||
CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk/sysroot/usr" "${CT_SYSROOT_DIR}"
|
||||
}
|
||||
|
||||
do_libc() {
|
||||
@ -25,7 +25,7 @@ do_libc() {
|
||||
arch="${arch}64"
|
||||
fi
|
||||
CT_DoStep INFO "Installing C library binaries"
|
||||
CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/bionic/platforms/android-${CT_ANDROID_API}/arch-${arch}/usr" "${CT_SYSROOT_DIR}"
|
||||
CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk/platforms/android-${CT_ANDROID_API}/arch-${arch}/usr" "${CT_SYSROOT_DIR}"
|
||||
CT_EnvModify CT_TARGET_CFLAGS "${CT_TARGET_CFLAGS} -D__ANDROID_API__=${CT_ANDROID_API}"
|
||||
}
|
||||
|
||||
|
@ -7,16 +7,15 @@
|
||||
uclibc_locales_version=030818
|
||||
uclibc_locale_tarball="uClibc-locale-${uclibc_locales_version}"
|
||||
|
||||
if [ "${CT_UCLIBC_NG_USE_UCLIBC_NG_ORG}" = "y" ]; then
|
||||
if [ "${CT_UCLIBC_USE_UCLIBC_NG_ORG}" = "y" ]; then
|
||||
# TBD make the name come from config/versions/uclibc.in
|
||||
uclibc_name="uClibc-ng"
|
||||
elif [ "${CT_UCLIBC_NG_USE_UCLIBC_ORG}" = "y" ]; then
|
||||
elif [ "${CT_UCLIBC_USE_UCLIBC_ORG}" = "y" ]; then
|
||||
uclibc_name="uClibc"
|
||||
fi
|
||||
|
||||
# Download uClibc
|
||||
do_libc_get() {
|
||||
# TBD allow for "default fork" selection in package.desc and select uClibc-NG (and then use just UCLIBC moniker)
|
||||
CT_Fetch UCLIBC_NG
|
||||
# TBD locales
|
||||
}
|
||||
|
@ -1688,7 +1688,7 @@ CT_PackageRun()
|
||||
use="${use:-${sym}}"
|
||||
|
||||
# Variables that are per-fork
|
||||
for v in basename pkg_name version src_release mirrors src_devel src_custom \
|
||||
for v in basename pkg_name version src_release mirrors archive_suffix src_devel src_custom \
|
||||
devel_vcs devel_url devel_branch devel_revision devel_subdir devel_bootstrap \
|
||||
custom_location; do
|
||||
eval "local ${v}=\${CT_${use}_${v^^}}"
|
||||
@ -1711,7 +1711,7 @@ CT_DoFetch()
|
||||
|
||||
if [ "${src_release}" = "y" ]; then
|
||||
basename="${pkg_name}-${version}"
|
||||
if ! CT_GetFile "${basename}" ${mirrors}; then
|
||||
if ! CT_GetFile "${basename}${archive_suffix}" ${mirrors}; then
|
||||
CT_Abort "${pkg_name}: download failed"
|
||||
fi
|
||||
|
||||
@ -1798,19 +1798,19 @@ CT_Extract()
|
||||
CT_DoExecLog ALL mkdir -p "${dir}"
|
||||
case "${file}" in
|
||||
*.tar.xz)
|
||||
xz -fdc "${file}" | CT_DoExecLog FILE tar x -f - -C "${dir}" ${components}
|
||||
xz -fdc "${file}" | CT_DoExecLog FILE tar x -v -f - -C "${dir}" ${components}
|
||||
;;
|
||||
*.tar.lzma)
|
||||
xz -fdc "${file}" | CT_DoExecLog FILE tar x -f - -C "${dir}" ${components}
|
||||
xz -fdc "${file}" | CT_DoExecLog FILE tar x -v -f - -C "${dir}" ${components}
|
||||
;;
|
||||
*.tar.bz2)
|
||||
bzip2 -dc "${file}" | CT_DoExecLog FILE tar x -f - -C "${dir}" ${components}
|
||||
bzip2 -dc "${file}" | CT_DoExecLog FILE tar x -v -f - -C "${dir}" ${components}
|
||||
;;
|
||||
*.tar.gz|*.tgz)
|
||||
gzip -dc "${file}" | CT_DoExecLog FILE tar x -f - -C "${dir}" ${components}
|
||||
gzip -dc "${file}" | CT_DoExecLog FILE tar x -v -f - -C "${dir}" ${components}
|
||||
;;
|
||||
*.tar)
|
||||
CT_DoExecLog FILE tar x -f "${file}" -C "${dir}" ${components}
|
||||
CT_DoExecLog FILE tar x -v -f "${file}" -C "${dir}" ${components}
|
||||
;;
|
||||
*.zip)
|
||||
CT_Pushd "${dir}"
|
||||
@ -1855,8 +1855,8 @@ CT_DoExtractPatch()
|
||||
CT_DoLog EXTRA "Extracting ${basename}"
|
||||
CT_DoExecLog ALL touch "${CT_COMMON_SRC_DIR}/.${basename}.extracting"
|
||||
# TBD save/discover the extension while fetching
|
||||
ext=`CT_GetFileExtension "${basename}"`
|
||||
CT_Extract "${CT_TARBALLS_DIR}/${basename}${ext}" "${CT_COMMON_SRC_DIR}"
|
||||
ext=`CT_GetFileExtension "${basename}${archive_suffix}"`
|
||||
CT_Extract "${CT_TARBALLS_DIR}/${basename}${archive_suffix}${ext}" "${CT_COMMON_SRC_DIR}"
|
||||
CT_DoExecLog ALL touch "${CT_COMMON_SRC_DIR}/.${basename}.extracted"
|
||||
CT_DoExecLog ALL rm -f "${CT_COMMON_SRC_DIR}/.${basename}.extracting"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user