Skip to content

Commit 4bc9273

Browse files
committed
Merge tag 'kbuild-fixes-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes frin Masahiro Yamada: - fix various bugs in xconfig - fix some issues in cross-compilation using Clang - fix documentation * tag 'kbuild-fixes-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: .gitignore: Do not track `defconfig` from `make savedefconfig` kbuild: make Clang build userprogs for target architecture kbuild: fix CONFIG_CC_CAN_LINK(_STATIC) for cross-compilation with Clang kconfig: qconf: parse newer types at debug info kconfig: qconf: navigate menus on hyperlinks kconfig: qconf: don't show goback button on splitMode kconfig: qconf: simplify the goBack() logic kconfig: qconf: re-implement setSelected() kconfig: qconf: make debug links work again kconfig: qconf: make search fully work again on split mode kconfig: qconf: cleanup includes docs: kbuild: fix ReST formatting gcc-plugins: fix gcc-plugins directory path in documentation
2 parents 19a61a7 + ba77dca commit 4bc9273

File tree

8 files changed

+136
-86
lines changed

8 files changed

+136
-86
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ x509.genkey
143143
/allrandom.config
144144
/allyes.config
145145

146+
# Kconfig savedefconfig output
147+
/defconfig
148+
146149
# Kdevelop4
147150
*.kdev4
148151

Documentation/kbuild/modules.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ module 8123.ko, which is built from the following files::
182182
8123_pci.c
183183
8123_bin.o_shipped <= Binary blob
184184

185-
--- 3.1 Shared Makefile
185+
3.1 Shared Makefile
186+
-------------------
186187

187188
An external module always includes a wrapper makefile that
188189
supports building the module using "make" with no arguments.
@@ -470,9 +471,9 @@ build.
470471

471472
The syntax of the Module.symvers file is::
472473

473-
<CRC> <Symbol> <Module> <Export Type> <Namespace>
474+
<CRC> <Symbol> <Module> <Export Type> <Namespace>
474475

475-
0xe1cc2a05 usb_stor_suspend drivers/usb/storage/usb-storage EXPORT_SYMBOL_GPL USB_STORAGE
476+
0xe1cc2a05 usb_stor_suspend drivers/usb/storage/usb-storage EXPORT_SYMBOL_GPL USB_STORAGE
476477

477478
The fields are separated by tabs and values may be empty (e.g.
478479
if no namespace is defined for an exported symbol).

Documentation/kbuild/reproducible-builds.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Structure randomisation
101101

102102
If you enable ``CONFIG_GCC_PLUGIN_RANDSTRUCT``, you will need to
103103
pre-generate the random seed in
104-
``scripts/gcc-plgins/randomize_layout_seed.h`` so the same value
104+
``scripts/gcc-plugins/randomize_layout_seed.h`` so the same value
105105
is used in rebuilds.
106106

107107
Debug info conflicts

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,8 +970,8 @@ LDFLAGS_vmlinux += --pack-dyn-relocs=relr
970970
endif
971971

972972
# Align the bit size of userspace programs with the kernel
973-
KBUILD_USERCFLAGS += $(filter -m32 -m64, $(KBUILD_CFLAGS))
974-
KBUILD_USERLDFLAGS += $(filter -m32 -m64, $(KBUILD_CFLAGS))
973+
KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
974+
KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CFLAGS))
975975

976976
# make the checker run with the right architecture
977977
CHECKFLAGS += --arch=$(ARCH)

init/Kconfig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ config CLANG_VERSION
4949

5050
config CC_CAN_LINK
5151
bool
52-
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(m64-flag)) if 64BIT
53-
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(m32-flag))
52+
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag)) if 64BIT
53+
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m32-flag))
5454

5555
config CC_CAN_LINK_STATIC
5656
bool
57-
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) -static $(m64-flag)) if 64BIT
58-
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) -static $(m32-flag))
57+
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag) -static) if 64BIT
58+
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m32-flag) -static)
5959

6060
config CC_HAS_ASM_GOTO
6161
def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC))

scripts/gcc-plugins/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ config GCC_PLUGIN_RANDSTRUCT
7878
source tree isn't cleaned after kernel installation).
7979

8080
The seed used for compilation is located at
81-
scripts/gcc-plgins/randomize_layout_seed.h. It remains after
81+
scripts/gcc-plugins/randomize_layout_seed.h. It remains after
8282
a make clean to allow for external modules to be compiled with
8383
the existing seed and will be removed by a make mrproper or
8484
make distclean.

0 commit comments

Comments
 (0)