2017-04-26 00:25:33 +00:00
|
|
|
# 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
|
|
|
|
|
|
|
|
do_libc_get() {
|
2017-07-02 03:17:56 +00:00
|
|
|
CT_Fetch ANDROID_NDK
|
2017-04-26 00:25:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_libc_extract() {
|
2017-07-02 03:17:56 +00:00
|
|
|
CT_ExtractPatch ANDROID_NDK
|
2017-04-26 00:25:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Install Unified headers
|
|
|
|
do_libc_start_files() {
|
|
|
|
CT_DoStep INFO "Installing C library headers"
|
2017-07-02 03:17:56 +00:00
|
|
|
CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk/sysroot/usr" "${CT_SYSROOT_DIR}"
|
2017-04-26 00:25:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_libc() {
|
|
|
|
local arch="${CT_ARCH}"
|
|
|
|
if [ "${CT_ARCH_64}" = "y" ]; then
|
|
|
|
if [ "${CT_ARCH}" = "x86" ]; then
|
2017-05-27 07:01:49 +00:00
|
|
|
arch="${arch}_"
|
|
|
|
fi
|
|
|
|
arch="${arch}64"
|
2017-04-26 00:25:33 +00:00
|
|
|
fi
|
|
|
|
CT_DoStep INFO "Installing C library binaries"
|
2017-07-02 03:17:56 +00:00
|
|
|
CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/android-ndk/platforms/android-${CT_ANDROID_API}/arch-${arch}/usr" "${CT_SYSROOT_DIR}"
|
2017-04-26 00:25:33 +00:00
|
|
|
CT_EnvModify CT_TARGET_CFLAGS "${CT_TARGET_CFLAGS} -D__ANDROID_API__=${CT_ANDROID_API}"
|
|
|
|
}
|
|
|
|
|
|
|
|
do_libc_post_cc() {
|
|
|
|
:
|
|
|
|
}
|
|
|
|
|