This repository was archived by the owner on Sep 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcreate-toolchain
More file actions
executable file
·32 lines (26 loc) · 1.81 KB
/
create-toolchain
File metadata and controls
executable file
·32 lines (26 loc) · 1.81 KB
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
#!/bin/bash
# Copyright (c) 2017 The Open-Transactions developers
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
source "${HOME}"/bin/functions
check_arch "${1}"
source "${HOME}"/bin/android-"${OT_ARCH}"
set -e
if [ -e "${ANDROID_STANDALONE_TOOLCHAIN}" ] ; then
rm -rf "${ANDROID_STANDALONE_TOOLCHAIN}"
fi
mkdir -p "${HOME}/toolchain"
cd "${ANDROID_NDK_ROOT}"
build/tools/make_standalone_toolchain.py --api "${ANDROID_LEVEL_OT}" --stl "${ANDROID_STL}" --arch "${ANDROID_ARCH_NDK_OT}" --install-dir "${ANDROID_STANDALONE_TOOLCHAIN}"
# Fix bugs in standard library headers
sed -i "s~^using ::signbit;~//using ::signbit;~" "${ANDROID_STANDALONE_TOOLCHAIN}"/include/c++/4.9.x/cmath
sed -i "s~^using ::fpclassify;~//using ::fpclassify;~" "${ANDROID_STANDALONE_TOOLCHAIN}"/include/c++/4.9.x/cmath
sed -i "s~^using ::isfinite;~//using ::isfinite;~" "${ANDROID_STANDALONE_TOOLCHAIN}"/include/c++/4.9.x/cmath
sed -i "s~^using ::isnormal;~//using ::isnormal;~" "${ANDROID_STANDALONE_TOOLCHAIN}"/include/c++/4.9.x/cmath
sed -i "s~^using ::isgreater;~//using ::isgreater;~" "${ANDROID_STANDALONE_TOOLCHAIN}"/include/c++/4.9.x/cmath
sed -i "s~^using ::isgreaterequal;~//using ::isgreaterequal;~" "${ANDROID_STANDALONE_TOOLCHAIN}"/include/c++/4.9.x/cmath
sed -i "s~^using ::isless;~//using ::isless;~" "${ANDROID_STANDALONE_TOOLCHAIN}"/include/c++/4.9.x/cmath
sed -i "s~^using ::islessequal;~//using ::islessequal;~" "${ANDROID_STANDALONE_TOOLCHAIN}"/include/c++/4.9.x/cmath
sed -i "s~^using ::islessgreater;~//using ::islessgreater;~" "${ANDROID_STANDALONE_TOOLCHAIN}"/include/c++/4.9.x/cmath
sed -i "s~^using ::isunordered;~//using ::isunordered;~" "${ANDROID_STANDALONE_TOOLCHAIN}"/include/c++/4.9.x/cmath