-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup_gcc.sh
38 lines (30 loc) · 901 Bytes
/
setup_gcc.sh
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
36
37
38
#
# Environment setup metascript for arm64 Android kernel builds with GCC
# Copyright (C) 2019-2020 Danny Lin <[email protected]>
#
# This script must be *sourced* from a Bourne-compatible shell in order to
# function. Nothing will happen if you execute it.
#
# 64-bit GCC toolchain prefix
gcc_prefix64="$HOME/toolchains/arter97/bin/aarch64-elf-"
# 32-bit GCC toolchain prefix
gcc_prefix32="$HOME/toolchains/arter97-32/bin/arm-eabi-"
# Number of parallel jobs to run
# Do not remove; set to 1 for no parallelism.
jobs=$(nproc)
# Do not edit below this point
# ----------------------------
# Load the shared helpers
source helpers.sh
# Index of variables for cleanup in unsetup
_ksetup_vars+=(
gcc_prefix64
gcc_prefix32
jobs
kmake_flags
)
kmake_flags+=(
CROSS_COMPILE="$gcc_prefix64"
CROSS_COMPILE_ARM32="$gcc_prefix32"
KBUILD_COMPILER_STRING="$(get_gcc_version "${gcc_prefix64}gcc")"
)