Skip to content

Commit 9712d38

Browse files
committed
Merge tag 'kbuild-fixes-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - Use the specified $(LD) when building userprogs with Clang - Pass the correct target triple when compile-testing UAPI headers with Clang - Fix pacman-pkg build error with KBUILD_OUTPUT * tag 'kbuild-fixes-v6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: install-extmod-build: Fix build when specifying KBUILD_OUTPUT docs: Kconfig: fix defconfig description kbuild: hdrcheck: fix cross build with clang kbuild: userprogs: use correct lld when linking through clang
2 parents 0dc1f31 + b5e3956 commit 9712d38

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

Documentation/admin-guide/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Configuring the kernel
176176
values without prompting.
177177

178178
"make defconfig" Create a ./.config file by using the default
179-
symbol values from either arch/$ARCH/defconfig
179+
symbol values from either arch/$ARCH/configs/defconfig
180180
or arch/$ARCH/configs/${PLATFORM}_defconfig,
181181
depending on the architecture.
182182

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,11 @@ endif
11231123
KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
11241124
KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
11251125

1126+
# userspace programs are linked via the compiler, use the correct linker
1127+
ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_LD_IS_LLD),yy)
1128+
KBUILD_USERLDFLAGS += --ld-path=$(LD)
1129+
endif
1130+
11261131
# make the checker run with the right architecture
11271132
CHECKFLAGS += --arch=$(ARCH)
11281133

scripts/package/install-extmod-build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ if [ "${CC}" != "${HOSTCC}" ]; then
6363
# Clear VPATH and srcroot because the source files reside in the output
6464
# directory.
6565
# shellcheck disable=SC2016 # $(MAKE) and $(build) will be expanded by Make
66-
"${MAKE}" run-command KBUILD_RUN_COMMAND='+$(MAKE) HOSTCC='"${CC}"' VPATH= srcroot=. $(build)='"${destdir}"/scripts
66+
"${MAKE}" run-command KBUILD_RUN_COMMAND='+$(MAKE) HOSTCC='"${CC}"' VPATH= srcroot=. $(build)='"$(realpath --relative-base=. "${destdir}")"/scripts
6767

6868
rm -f "${destdir}/scripts/Kbuild"
6969
fi

usr/include/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ UAPI_CFLAGS := -std=c90 -Wall -Werror=implicit-function-declaration
1010

1111
# In theory, we do not care -m32 or -m64 for header compile tests.
1212
# It is here just because CONFIG_CC_CAN_LINK is tested with -m32 or -m64.
13-
UAPI_CFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
13+
UAPI_CFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
1414

1515
# USERCFLAGS might contain sysroot location for CC.
1616
UAPI_CFLAGS += $(USERCFLAGS)

0 commit comments

Comments
 (0)