mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-22 14:12:26 +00:00
40d5bf6440
This required some rework of the libc selection, as moxiebox is a layer on top of another libc - newlib. Also, moxiebox'es host VM (`sandbox`) needs a libcrypto on the host. We will not have it if we're cross-compiling a canadian cross. Fortunately, all moxiebox needs from libcrypto is SHA256, and it already includes a standalone implementation of SHA256 in its runtime. Provide a little wrapper that allows moxiebox use that implementation for the host binary, too. Also, automate collecting/printing the list of all packages in a given category (e.g. LIBC or COMP_TOOLS), generate a list of all Kconfig symbols for a given category. Signed-off-by: Alexey Neyman <stilor@att.net>
31 lines
1.2 KiB
Bash
31 lines
1.2 KiB
Bash
# This file adds functions to extract the bionic C library from the Android NDK
|
|
# Copyright 2017 Howard Chu
|
|
# Licensed under the GPL v2. See COPYING in the root of this package
|
|
|
|
# Install Unified headers
|
|
bionic_start_files()
|
|
{
|
|
CT_DoStep INFO "Installing C library headers"
|
|
CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk/sysroot/usr" "${CT_SYSROOT_DIR}"
|
|
}
|
|
|
|
bionic_main()
|
|
{
|
|
local arch="${CT_ARCH}"
|
|
if [ "${CT_ARCH_64}" = "y" ]; then
|
|
if [ "${CT_ARCH}" = "x86" ]; then
|
|
arch="${arch}_"
|
|
fi
|
|
arch="${arch}64"
|
|
fi
|
|
CT_DoStep INFO "Installing C library binaries"
|
|
CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk/platforms/android-${CT_ANDROID_API}/arch-${arch}/usr" "${CT_SYSROOT_DIR}"
|
|
|
|
# NB: Modifying CT_TARGET_CFLAGS here, not CT_ALL_TARGET_CFLAGS: the __ANDROID_API__
|
|
# definition needs to be passed into GCC build, or the resulting libstdc++ gets
|
|
# miscompiled (attempt to link against it results in unresolved symbols to stdout/...).
|
|
# And since __ANDROID_API__ is a user config option, placing it with other user-supplied
|
|
# options isn't completely out of character.
|
|
CT_EnvModify CT_TARGET_CFLAGS "${CT_TARGET_CFLAGS} -D__ANDROID_API__=${CT_ANDROID_API}"
|
|
}
|