summaryrefslogtreecommitdiff
path: root/scripts/build/libc/bionic.sh
blob: a52078d0c94551cc8afae0885951148f99ba78d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# 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() {
    CT_Fetch BIONIC
}

do_libc_extract() {
    CT_ExtractPatch BIONIC
}

# 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}"
}

do_libc() {
    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}/bionic/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}"
}

do_libc_post_cc() {
    :
}