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.

Merge tag 'kbuild-fixes-v6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

- Fix the module compression with xz so the in-kernel decompressor
works

- Document a kconfig idiom to express an optional dependency between
modules

- Make modpost, when W=1 is given, detect broken drivers that reference
.exit.* sections

- Remove unused code

* tag 'kbuild-fixes-v6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kbuild: remove stale code for 'source' symlink in packaging scripts
modpost: Don't let "driver"s reference .exit.*
vmlinux.lds.h: remove unused CPU_KEEP and CPU_DISCARD macros
modpost: add missing else to the "of" check
Documentation: kbuild: explain handling optional dependencies
kbuild: Use CRC32 and a 1MiB dictionary for XZ compressed modules

+41 -15
+26
Documentation/kbuild/kconfig-language.rst
··· 573 573 bool "Support for foo hardware" 574 574 depends on ARCH_FOO_VENDOR || COMPILE_TEST 575 575 576 + Optional dependencies 577 + ~~~~~~~~~~~~~~~~~~~~~ 578 + 579 + Some drivers are able to optionally use a feature from another module 580 + or build cleanly with that module disabled, but cause a link failure 581 + when trying to use that loadable module from a built-in driver. 582 + 583 + The most common way to express this optional dependency in Kconfig logic 584 + uses the slightly counterintuitive:: 585 + 586 + config FOO 587 + tristate "Support for foo hardware" 588 + depends on BAR || !BAR 589 + 590 + This means that there is either a dependency on BAR that disallows 591 + the combination of FOO=y with BAR=m, or BAR is completely disabled. 592 + For a more formalized approach if there are multiple drivers that have 593 + the same dependency, a helper symbol can be used, like:: 594 + 595 + config FOO 596 + tristate "Support for foo hardware" 597 + depends on BAR_OPTIONAL 598 + 599 + config BAR_OPTIONAL 600 + def_tristate BAR || !BAR 601 + 576 602 Kconfig recursive dependency limitations 577 603 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 578 604
-7
include/asm-generic/vmlinux.lds.h
··· 138 138 * are handled as text/data or they can be discarded (which 139 139 * often happens at runtime) 140 140 */ 141 - #ifdef CONFIG_HOTPLUG_CPU 142 - #define CPU_KEEP(sec) *(.cpu##sec) 143 - #define CPU_DISCARD(sec) 144 - #else 145 - #define CPU_KEEP(sec) 146 - #define CPU_DISCARD(sec) *(.cpu##sec) 147 - #endif 148 141 149 142 #if defined(CONFIG_MEMORY_HOTPLUG) 150 143 #define MEM_KEEP(sec) *(.mem##sec)
+1 -1
scripts/Makefile.modinst
··· 144 144 quiet_cmd_gzip = GZIP $@ 145 145 cmd_gzip = $(KGZIP) -n -f $< 146 146 quiet_cmd_xz = XZ $@ 147 - cmd_xz = $(XZ) --lzma2=dict=2MiB -f $< 147 + cmd_xz = $(XZ) --check=crc32 --lzma2=dict=1MiB -f $< 148 148 quiet_cmd_zstd = ZSTD $@ 149 149 cmd_zstd = $(ZSTD) -T0 --rm -f -q $< 150 150
+1 -1
scripts/mod/file2alias.c
··· 1604 1604 /* First handle the "special" cases */ 1605 1605 if (sym_is(name, namelen, "usb")) 1606 1606 do_usb_table(symval, sym->st_size, mod); 1607 - if (sym_is(name, namelen, "of")) 1607 + else if (sym_is(name, namelen, "of")) 1608 1608 do_of_table(symval, sym->st_size, mod); 1609 1609 else if (sym_is(name, namelen, "pnp")) 1610 1610 do_pnp_device_entry(symval, sym->st_size, mod);
+13 -2
scripts/mod/modpost.c
··· 1015 1015 "*_console"))) 1016 1016 return 0; 1017 1017 1018 - /* symbols in data sections that may refer to meminit/exit sections */ 1018 + /* symbols in data sections that may refer to meminit sections */ 1019 1019 if (match(fromsec, PATTERNS(DATA_SECTIONS)) && 1020 - match(tosec, PATTERNS(ALL_XXXINIT_SECTIONS, ALL_EXIT_SECTIONS)) && 1020 + match(tosec, PATTERNS(ALL_XXXINIT_SECTIONS, ALL_XXXEXIT_SECTIONS)) && 1021 + match(fromsym, PATTERNS("*driver"))) 1022 + return 0; 1023 + 1024 + /* 1025 + * symbols in data sections must not refer to .exit.*, but there are 1026 + * quite a few offenders, so hide these unless for W=1 builds until 1027 + * these are fixed. 1028 + */ 1029 + if (!extra_warn && 1030 + match(fromsec, PATTERNS(DATA_SECTIONS)) && 1031 + match(tosec, PATTERNS(EXIT_SECTIONS)) && 1021 1032 match(fromsym, PATTERNS("*driver"))) 1022 1033 return 0; 1023 1034
-1
scripts/package/builddeb
··· 64 64 65 65 ${MAKE} -f ${srctree}/Makefile INSTALL_MOD_PATH="${pdir}" modules_install 66 66 rm -f "${pdir}/lib/modules/${KERNELRELEASE}/build" 67 - rm -f "${pdir}/lib/modules/${KERNELRELEASE}/source" 68 67 69 68 # Install the kernel 70 69 if [ "${ARCH}" = um ] ; then
-3
scripts/package/kernel.spec
··· 68 68 cp System.map %{buildroot}/boot/System.map-%{KERNELRELEASE} 69 69 cp .config %{buildroot}/boot/config-%{KERNELRELEASE} 70 70 ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEASE}/build 71 - ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEASE}/source 72 71 %if %{with_devel} 73 72 %{make} %{makeflags} run-command KBUILD_RUN_COMMAND='${srctree}/scripts/package/install-extmod-build %{buildroot}/usr/src/kernels/%{KERNELRELEASE}' 74 73 %endif ··· 100 101 %defattr (-, root, root) 101 102 /lib/modules/%{KERNELRELEASE} 102 103 %exclude /lib/modules/%{KERNELRELEASE}/build 103 - %exclude /lib/modules/%{KERNELRELEASE}/source 104 104 /boot/* 105 105 106 106 %files headers ··· 111 113 %defattr (-, root, root) 112 114 /usr/src/kernels/%{KERNELRELEASE} 113 115 /lib/modules/%{KERNELRELEASE}/build 114 - /lib/modules/%{KERNELRELEASE}/source 115 116 %endif