Skip to content

Commit

Permalink
CHROMIUM: kernelconfig sets CROSS_COMPILE
Browse files Browse the repository at this point in the history
Without this, when rebuilding kernel config for aarch64 in
chromeos-kernel-upstream, as-version.sh is run with the following args:

    as-version.sh aarch64-cros-linux-gnu-clang -no-integrated-as \
        --prefix=/usr/bin/ -Werror=unknown-warning-option

and the following line fails:

    set -- $(LC_ALL=C "$@" -Wa,--version -c -x assembler /dev/null \
        -o /dev/null 2>/dev/null)

causing this error: "... unknown assembler invoked"

This is because /usr/bin/as is invoked (instead of the cross compile
version) because --prefix=/usr/bin is specified (as opposed to the
correct "--prefix=/usr/bin/${CROSS_COMPILE}")

This all started in commit ba64beb ("kbuild: check the minimum
assembler version in Kconfig") which landed in 5.12

Note: this was submitted as https://crrev.com/c/2993714 by accident
wihout running style checks.

BUG=b:190342046
TEST=run chromeos/scripts/kernelconfig olddefconfig

Signed-off-by: Eizan Miyamoto <eizan@chromium.org>
Change-Id: Ib09150dd8239bd8d139956b9ed0806a940ee1120
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3026231
Reviewed-by: Lukasz Majczak <lmajczak@google.com>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
  • Loading branch information
Eizan Miyamoto authored and Lukasz Majczak committed Jul 20, 2021
1 parent 7e3a2a3 commit 82391d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chromeos/scripts/kernelconfig
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ build_one() {
set -- \
LD="ld.lld" \
CC="${ccompiler}" \
CXX="${cross}-g++"
CXX="${cross}-g++" \
CROSS_COMPILE="${cross}-"

local O="$(pwd)/build/${arch}"
mkdir -p "${O}"
Expand Down

0 comments on commit 82391d8

Please sign in to comment.