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.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

- Fix a memory leak in modpost

- Resolve build issues when cross-compiling RPM and Debian packages

- Fix another regression in Kconfig

- Fix incorrect MODULE_ALIAS() output in modpost

* tag 'kbuild-fixes-v6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
modpost: fix input MODULE_DEVICE_TABLE() built for 64-bit on 32-bit host
modpost: fix acpi MODULE_DEVICE_TABLE built with mismatched endianness
kconfig: show sub-menu entries even if the prompt is hidden
kbuild: deb-pkg: add pkg.linux-upstream.nokerneldbg build profile
kbuild: deb-pkg: add pkg.linux-upstream.nokernelheaders build profile
kbuild: rpm-pkg: disable kernel-devel package when cross-compiling
sumversion: Fix a memory leak in get_src_version()

+39 -16
+6 -1
scripts/Makefile.package
··· 62 62 63 63 PHONY += rpm-pkg srcrpm-pkg binrpm-pkg 64 64 65 + ifneq ($(CC),$(HOSTCC)) 66 + rpm-no-devel = --without=devel 67 + endif 68 + 65 69 rpm-pkg: private build-type := a 66 70 srcrpm-pkg: private build-type := s 67 71 binrpm-pkg: private build-type := b ··· 76 72 --define='_topdir $(abspath rpmbuild)' \ 77 73 $(if $(filter a b, $(build-type)), \ 78 74 --target $(UTS_MACHINE)-linux --build-in-place --noprep --define='_smp_mflags %{nil}' \ 79 - $$(rpm -q rpm >/dev/null 2>&1 || echo --nodeps)) \ 75 + $$(rpm -q rpm >/dev/null 2>&1 || echo --nodeps) \ 76 + $(rpm-no-devel)) \ 80 77 $(RPMOPTS)) 81 78 82 79 # deb-pkg srcdeb-pkg bindeb-pkg
+12 -1
scripts/kconfig/menu.c
··· 533 533 534 534 bool menu_is_visible(struct menu *menu) 535 535 { 536 + struct menu *child; 536 537 struct symbol *sym; 537 538 tristate visible; 538 539 ··· 552 551 } else 553 552 visible = menu->prompt->visible.tri = expr_calc_value(menu->prompt->visible.expr); 554 553 555 - return visible != no; 554 + if (visible != no) 555 + return true; 556 + 557 + if (!sym || sym_get_tristate_value(menu->sym) == no) 558 + return false; 559 + 560 + for (child = menu->list; child; child = child->next) 561 + if (menu_is_visible(child)) 562 + return true; 563 + 564 + return false; 556 565 } 557 566 558 567 const char *menu_get_prompt(const struct menu *menu)
+6 -6
scripts/mod/file2alias.c
··· 567 567 void *symval, char *alias) 568 568 { 569 569 DEF_FIELD_ADDR(symval, acpi_device_id, id); 570 - DEF_FIELD_ADDR(symval, acpi_device_id, cls); 571 - DEF_FIELD_ADDR(symval, acpi_device_id, cls_msk); 570 + DEF_FIELD(symval, acpi_device_id, cls); 571 + DEF_FIELD(symval, acpi_device_id, cls_msk); 572 572 573 573 if (id && strlen((const char *)*id)) 574 574 sprintf(alias, "acpi*:%s:*", *id); 575 - else if (cls) { 575 + else { 576 576 int i, byte_shift, cnt = 0; 577 577 unsigned int msk; 578 578 ··· 580 580 cnt = 6; 581 581 for (i = 1; i <= 3; i++) { 582 582 byte_shift = 8 * (3-i); 583 - msk = (*cls_msk >> byte_shift) & 0xFF; 583 + msk = (cls_msk >> byte_shift) & 0xFF; 584 584 if (msk) 585 585 sprintf(&alias[cnt], "%02x", 586 - (*cls >> byte_shift) & 0xFF); 586 + (cls >> byte_shift) & 0xFF); 587 587 else 588 588 sprintf(&alias[cnt], "??"); 589 589 cnt += 2; ··· 743 743 for (i = min / BITS_PER_LONG; i < max / BITS_PER_LONG + 1; i++) 744 744 arr[i] = TO_NATIVE(arr[i]); 745 745 for (i = min; i < max; i++) 746 - if (arr[i / BITS_PER_LONG] & (1L << (i%BITS_PER_LONG))) 746 + if (arr[i / BITS_PER_LONG] & (1ULL << (i%BITS_PER_LONG))) 747 747 sprintf(alias + strlen(alias), "%X,*", i); 748 748 } 749 749
+3 -2
scripts/mod/sumversion.c
··· 392 392 /* Calc and record src checksum. */ 393 393 void get_src_version(const char *modname, char sum[], unsigned sumlen) 394 394 { 395 - char *buf; 395 + char *buf, *pos; 396 396 struct md4_ctx md; 397 397 char *fname; 398 398 char filelist[PATH_MAX + 1]; ··· 401 401 snprintf(filelist, sizeof(filelist), "%s.mod", modname); 402 402 403 403 buf = read_text_file(filelist); 404 + pos = buf; 404 405 405 406 md4_init(&md); 406 - while ((fname = strsep(&buf, "\n"))) { 407 + while ((fname = strsep(&pos, "\n"))) { 407 408 if (!*fname) 408 409 continue; 409 410 if (!(is_static_library(fname)) &&
+1 -1
scripts/package/builddeb
··· 123 123 pdir=debian/$1 124 124 version=${1#linux-headers-} 125 125 126 - "${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}" 126 + CC="${DEB_HOST_GNU_TYPE}-gcc" "${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}" 127 127 128 128 mkdir -p $pdir/lib/modules/$version/ 129 129 ln -s /usr/src/linux-headers-$version $pdir/lib/modules/$version/build
+2 -4
scripts/package/install-extmod-build
··· 44 44 fi 45 45 } | tar -c -f - -T - | tar -xf - -C "${destdir}" 46 46 47 - # When ${CC} and ${HOSTCC} differ, we are likely cross-compiling. Rebuild host 48 - # programs using ${CC}. This assumes CC=${CROSS_COMPILE}gcc, which is usually 49 - # the case for package building. It does not cross-compile when CC=clang. 47 + # When ${CC} and ${HOSTCC} differ, rebuild host programs using ${CC}. 50 48 # 51 49 # This caters to host programs that participate in Kbuild. objtool and 52 50 # resolve_btfids are out of scope. 53 - if [ "${CC}" != "${HOSTCC}" ] && is_enabled CONFIG_CC_CAN_LINK; then 51 + if [ "${CC}" != "${HOSTCC}" ]; then 54 52 echo "Rebuilding host programs with ${CC}..." 55 53 56 54 cat <<-'EOF' > "${destdir}/Kbuild"
+9 -1
scripts/package/mkdebian
··· 179 179 180 180 echo $debarch > debian/arch 181 181 182 + host_gnu=$(dpkg-architecture -a "${debarch}" -q DEB_HOST_GNU_TYPE | sed 's/_/-/g') 183 + 182 184 # Generate a simple changelog template 183 185 cat <<EOF > debian/changelog 184 186 $sourcename ($packageversion) $distribution; urgency=low ··· 198 196 Maintainer: $maintainer 199 197 Rules-Requires-Root: no 200 198 Build-Depends: debhelper-compat (= 12) 201 - Build-Depends-Arch: bc, bison, cpio, flex, kmod, libelf-dev:native, libssl-dev:native, rsync 199 + Build-Depends-Arch: bc, bison, cpio, flex, 200 + gcc-${host_gnu} <!pkg.${sourcename}.nokernelheaders>, 201 + kmod, libelf-dev:native, 202 + libssl-dev:native, libssl-dev <!pkg.${sourcename}.nokernelheaders>, 203 + rsync 202 204 Homepage: https://www.kernel.org/ 203 205 204 206 Package: $packagename-$version ··· 230 224 231 225 Package: linux-headers-$version 232 226 Architecture: $debarch 227 + Build-Profiles: <!pkg.${sourcename}.nokernelheaders> 233 228 Description: Linux kernel headers for $version on $debarch 234 229 This package provides kernel header files for $version on $debarch 235 230 . ··· 245 238 Package: linux-image-$version-dbg 246 239 Section: debug 247 240 Architecture: $debarch 241 + Build-Profiles: <!pkg.${sourcename}.nokerneldbg> 248 242 Description: Linux kernel debugging symbols for $version 249 243 This package will come in handy if you need to debug the kernel. It provides 250 244 all the necessary debug symbols for the kernel and its modules.