Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Commit aa40401

Browse files
Add machinery for AS=clang builds
But don't enable any yet. x86_64 needs: ClangBuiltLinux/linux#913 -next needs: ClangBuiltLinux/linux#669
1 parent f49b9a3 commit aa40401

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

driver.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -eu
55
setup_variables() {
66
while [[ ${#} -ge 1 ]]; do
77
case ${1} in
8-
"AR="*|"ARCH="*|"CC="*|"LD="*|"NM"=*|"OBJDUMP"=*|"OBJSIZE"=*|"REPO="*) export "${1?}" ;;
8+
"AR="*|"ARCH="*|"AS="*|"CC="*|"LD="*|"NM"=*|"OBJDUMP"=*|"OBJSIZE"=*|"REPO="*) export "${1?}" ;;
99
"-c"|"--clean") cleanup=true ;;
1010
"-j"|"--jobs") shift; jobs=$1 ;;
1111
"-j"*) jobs=${1/-j} ;;
@@ -211,11 +211,12 @@ check_dependencies() {
211211
# Check for LD, CC, and AR environmental variables
212212
# and print the version string of each. If CC and AR
213213
# don't exist, try to find them.
214-
# lld isn't ready for all architectures so it's just
215-
# simpler to fall back to GNU ld when LD isn't specified
216-
# to avoid architecture specific selection logic.
214+
# clang's integrated assembler and lld aren't ready for all architectures so
215+
# it's just simpler to fall back to GNU as/ld when AS/LD isn't specified to
216+
# avoid architecture specific selection logic.
217217

218218
"${LD:="${CROSS_COMPILE:-}"ld}" --version
219+
"${AS:="${CROSS_COMPILE:-}"as}" --version
219220

220221
if [[ -z "${CC:-}" ]]; then
221222
for CC in $(gen_bin_list clang) clang; do
@@ -295,6 +296,7 @@ mako_reactor() {
295296
KBUILD_BUILD_HOST=clangbuiltlinux \
296297
make -j"${jobs:-$(nproc)}" \
297298
AR="${AR}" \
299+
AS="${AS}" \
298300
CC="${CC}" \
299301
HOSTCC="${CC}" \
300302
HOSTLD="${HOSTLD:-ld}" \

usage.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Environment variables:
1313
If no AR value is specified, the script will attempt to set AR to
1414
llvm-ar-10 llvm-ar-9, llvm-ar-8, llvm-ar-7, llvm-ar, then
1515
${CROSS_COMPILE}ar if they are found in PATH.
16+
AS:
17+
If no AS value is specified, ${CROSS_COMPILE}as is used.
1618
ARCH (required):
1719
If no ARCH value is specified, it's an error; there is no default.
1820
Currently, arm32_v7, arm32_v6, arm32_v5, arm64, mips, mipsel, ppc32,

0 commit comments

Comments
 (0)