Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

check-uapi: honor ${CROSS_COMPILE} setting

When ${CROSS_COMPILE} is set, but ${CC} is not set, the logic in
check-uapi.sh is different from the top-level Makefile, which defaults
to using the cross gcc. This leads to using the native gcc instead of the
cross version, resulting in unexpected false-positive and false-negative
output.

Use the same logic here that we use in Kbuild for consistency.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20260306163309.2015837-3-arnd@kernel.org
Signed-off-by: Nicolas Schier <nsc@kernel.org>

authored by

Arnd Bergmann and committed by
Nicolas Schier
9940ec38 a261f6df

+6 -5
+6 -5
scripts/check-uapi.sh
··· 33 33 -v Verbose operation (print more information about each header being checked). 34 34 35 35 Environmental args: 36 - ABIDIFF Custom path to abidiff binary 37 - CC C compiler (default is "gcc") 38 - ARCH Target architecture for the UAPI check (default is host arch) 36 + ABIDIFF Custom path to abidiff binary 37 + CROSS_COMPILE Toolchain prefix for compiler 38 + CC C compiler (default is "\${CROSS_COMPILE}gcc") 39 + ARCH Target architecture for the UAPI check (default is host arch) 39 40 40 41 Exit codes: 41 42 $SUCCESS) Success ··· 199 198 run_make_headers_install() { 200 199 local -r ref="$1" 201 200 local -r install_dir="$(get_header_tree "$ref")" 202 - make -j "$MAX_THREADS" ARCH="$ARCH" INSTALL_HDR_PATH="$install_dir" \ 201 + make -j "$MAX_THREADS" CROSS_COMPILE="${CROSS_COMPILE}" ARCH="$ARCH" INSTALL_HDR_PATH="$install_dir" \ 203 202 headers_install > /dev/null 204 203 } 205 204 ··· 408 407 # Make sure we have the tools we need and the arguments make sense 409 408 check_deps() { 410 409 ABIDIFF="${ABIDIFF:-abidiff}" 411 - CC="${CC:-gcc}" 410 + CC="${CC:-${CROSS_COMPILE}gcc}" 412 411 ARCH="${ARCH:-$(uname -m)}" 413 412 if [ "$ARCH" = "x86_64" ]; then 414 413 ARCH="x86"