mirror of
https://github.com/servo/servo.git
synced 2025-08-17 11:25:35 +01:00
new android port: update fakeld
This commit is contained in:
parent
be6b5f9aad
commit
76d394eca8
7 changed files with 10 additions and 11 deletions
15
support/android/fakeld/fake-ld-arm.sh
Executable file
15
support/android/fakeld/fake-ld-arm.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# 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/.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
source ./support/android/fakeld/fake-ld.sh
|
||||
|
||||
export _GCC_PARAMS="${@}"
|
||||
call_gcc "arch-arm" "arm-linux-androideabi" "android-18" "armeabi" \
|
||||
"arm-linux-androideabi"
|
14
support/android/fakeld/fake-ld-arm64.sh
Executable file
14
support/android/fakeld/fake-ld-arm64.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# 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/.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
source ./support/android/fakeld/fake-ld.sh
|
||||
|
||||
export _GCC_PARAMS="${@}"
|
||||
call_gcc "arch-arm64" "aarch64-linux-android" "android-21" "arm64-v8a"
|
15
support/android/fakeld/fake-ld-armv7.sh
Executable file
15
support/android/fakeld/fake-ld-armv7.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# 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/.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
source ./support/android/fakeld/fake-ld.sh
|
||||
|
||||
export _GCC_PARAMS="${@}"
|
||||
call_gcc "arch-arm" "arm-linux-androideabi" "android-18" "armeabi-v7a" \
|
||||
"arm-linux-androideabi"
|
14
support/android/fakeld/fake-ld-x86.sh
Executable file
14
support/android/fakeld/fake-ld-x86.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# 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/.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
source ./support/android/fakeld/fake-ld.sh
|
||||
|
||||
export _GCC_PARAMS="${@}"
|
||||
call_gcc "arch-x86" "x86" "android-18" "x86" "i686-linux-android"
|
2
support/android/fakeld/fake-ld.cmd
Normal file
2
support/android/fakeld/fake-ld.cmd
Normal file
|
@ -0,0 +1,2 @@
|
|||
@echo off
|
||||
gcc -mwindows %*
|
37
support/android/fakeld/fake-ld.sh
Executable file
37
support/android/fakeld/fake-ld.sh
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# 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/.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
call_gcc()
|
||||
{
|
||||
TARGET_DIR="${OUT_DIR}/../../.."
|
||||
|
||||
export _ANDROID_ARCH=$1
|
||||
export _ANDROID_EABI=$2
|
||||
export _ANDROID_PLATFORM=$3
|
||||
export ANDROID_SYSROOT="${ANDROID_NDK}/platforms/${_ANDROID_PLATFORM}/${_ANDROID_ARCH}"
|
||||
ANDROID_TOOLCHAIN=""
|
||||
for host in "linux-x86_64" "linux-x86" "darwin-x86_64" "darwin-x86"; do
|
||||
if [[ -d "${ANDROID_NDK}/toolchains/${_ANDROID_EABI}-4.9/prebuilt/${host}/bin" ]]; then
|
||||
ANDROID_TOOLCHAIN="${ANDROID_NDK}/toolchains/${_ANDROID_EABI}-4.9/prebuilt/${host}/bin"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
ANDROID_CPU_ARCH_DIR=$4
|
||||
ANDROID_CXX_LIBS="${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${ANDROID_CPU_ARCH_DIR}"
|
||||
|
||||
echo "toolchain: ${ANDROID_TOOLCHAIN}"
|
||||
echo "libs dir: ${ANDROID_CXX_LIBS}"
|
||||
echo "sysroot: ${ANDROID_SYSROOT}"
|
||||
echo "targetdir: ${ANDROID_CXX_LIBS}"
|
||||
|
||||
"${ANDROID_TOOLCHAIN}/$5-gcc" \
|
||||
--sysroot="${ANDROID_SYSROOT}" -L "${ANDROID_CXX_LIBS}" ${_GCC_PARAMS} -lc++
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue