diff --git a/.travis.yml b/.travis.yml index 438614f..8ed9698 100644 --- a/.travis.yml +++ b/.travis.yml @@ -194,6 +194,7 @@ script: - | docker run \ --env ARCH=${ARCH} \ + --env AS=${AS} \ --env LD=${LD} \ --env REPO=${REPO} \ --rm \ diff --git a/driver.sh b/driver.sh index 569d385..df7f174 100755 --- a/driver.sh +++ b/driver.sh @@ -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} ;; @@ -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 @@ -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}" \ diff --git a/usage.txt b/usage.txt index 63476b4..92ac9fc 100644 --- a/usage.txt +++ b/usage.txt @@ -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,