Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ script:
- |
docker run \
--env ARCH=${ARCH} \
--env AS=${AS} \
--env LD=${LD} \
--env REPO=${REPO} \
--rm \
Expand Down
10 changes: 6 additions & 4 deletions driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eu
setup_variables() {
while [[ ${#} -ge 1 ]]; do
case ${1} in
"AR="*|"ARCH="*|"CC="*|"LD="*|"NM"=*|"OBJDUMP"=*|"OBJSIZE"=*|"REPO="*) export "${1?}" ;;
"AR="*|"ARCH="*|"AS="*|"CC="*|"LD="*|"NM"=*|"OBJDUMP"=*|"OBJSIZE"=*|"REPO="*) export "${1?}" ;;
"-c"|"--clean") cleanup=true ;;
"-j"|"--jobs") shift; jobs=$1 ;;
"-j"*) jobs=${1/-j} ;;
Expand Down Expand Up @@ -211,11 +211,12 @@ check_dependencies() {
# Check for LD, CC, and AR environmental variables
# and print the version string of each. If CC and AR
# don't exist, try to find them.
# lld isn't ready for all architectures so it's just
# simpler to fall back to GNU ld when LD isn't specified
# to avoid architecture specific selection logic.
# clang's integrated assembler and lld aren't ready for all architectures so
# it's just simpler to fall back to GNU as/ld when AS/LD isn't specified to
# avoid architecture specific selection logic.

"${LD:="${CROSS_COMPILE:-}"ld}" --version
"${AS:="${CROSS_COMPILE:-}"as}" --version

if [[ -z "${CC:-}" ]]; then
for CC in $(gen_bin_list clang) clang; do
Expand Down Expand Up @@ -295,6 +296,7 @@ mako_reactor() {
KBUILD_BUILD_HOST=clangbuiltlinux \
make -j"${jobs:-$(nproc)}" \
AR="${AR}" \
AS="${AS}" \
CC="${CC}" \
HOSTCC="${CC}" \
HOSTLD="${HOSTLD:-ld}" \
Expand Down
2 changes: 2 additions & 0 deletions usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Environment variables:
If no AR value is specified, the script will attempt to set AR to
llvm-ar-10 llvm-ar-9, llvm-ar-8, llvm-ar-7, llvm-ar, then
${CROSS_COMPILE}ar if they are found in PATH.
AS:
If no AS value is specified, ${CROSS_COMPILE}as is used.
ARCH (required):
If no ARCH value is specified, it's an error; there is no default.
Currently, arm32_v7, arm32_v6, arm32_v5, arm64, mips, mipsel, ppc32,
Expand Down