Commit a33ab3f9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'kbuild-fixes-v6.12-2' of...

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()
parents b9021de3 77dc55a9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -62,6 +62,10 @@ rpm-sources: linux.tar.gz

PHONY += rpm-pkg srcrpm-pkg binrpm-pkg

ifneq ($(CC),$(HOSTCC))
rpm-no-devel = --without=devel
endif

rpm-pkg:    private build-type := a
srcrpm-pkg: private build-type := s
binrpm-pkg: private build-type := b
@@ -72,7 +76,8 @@ rpm-pkg srcrpm-pkg binrpm-pkg: rpmbuild/SPECS/kernel.spec
	--define='_topdir $(abspath rpmbuild)' \
	$(if $(filter a b, $(build-type)), \
		--target $(UTS_MACHINE)-linux --build-in-place --noprep --define='_smp_mflags %{nil}' \
		$$(rpm -q rpm >/dev/null 2>&1 || echo --nodeps)) \
		$$(rpm -q rpm >/dev/null 2>&1 || echo --nodeps) \
		$(rpm-no-devel)) \
	$(RPMOPTS))

# deb-pkg srcdeb-pkg bindeb-pkg
+12 −1
Original line number Diff line number Diff line
@@ -533,6 +533,7 @@ bool menu_is_empty(struct menu *menu)

bool menu_is_visible(struct menu *menu)
{
	struct menu *child;
	struct symbol *sym;
	tristate visible;

@@ -551,7 +552,17 @@ bool menu_is_visible(struct menu *menu)
	} else
		visible = menu->prompt->visible.tri = expr_calc_value(menu->prompt->visible.expr);

	return visible != no;
	if (visible != no)
		return true;

	if (!sym || sym_get_tristate_value(menu->sym) == no)
		return false;

	for (child = menu->list; child; child = child->next)
		if (menu_is_visible(child))
			return true;

	return false;
}

const char *menu_get_prompt(const struct menu *menu)
+6 −6
Original line number Diff line number Diff line
@@ -567,12 +567,12 @@ static int do_acpi_entry(const char *filename,
			void *symval, char *alias)
{
	DEF_FIELD_ADDR(symval, acpi_device_id, id);
	DEF_FIELD_ADDR(symval, acpi_device_id, cls);
	DEF_FIELD_ADDR(symval, acpi_device_id, cls_msk);
	DEF_FIELD(symval, acpi_device_id, cls);
	DEF_FIELD(symval, acpi_device_id, cls_msk);

	if (id && strlen((const char *)*id))
		sprintf(alias, "acpi*:%s:*", *id);
	else if (cls) {
	else {
		int i, byte_shift, cnt = 0;
		unsigned int msk;

@@ -580,10 +580,10 @@ static int do_acpi_entry(const char *filename,
		cnt = 6;
		for (i = 1; i <= 3; i++) {
			byte_shift = 8 * (3-i);
			msk = (*cls_msk >> byte_shift) & 0xFF;
			msk = (cls_msk >> byte_shift) & 0xFF;
			if (msk)
				sprintf(&alias[cnt], "%02x",
					(*cls >> byte_shift) & 0xFF);
					(cls >> byte_shift) & 0xFF);
			else
				sprintf(&alias[cnt], "??");
			cnt += 2;
@@ -743,7 +743,7 @@ static void do_input(char *alias,
	for (i = min / BITS_PER_LONG; i < max / BITS_PER_LONG + 1; i++)
		arr[i] = TO_NATIVE(arr[i]);
	for (i = min; i < max; i++)
		if (arr[i / BITS_PER_LONG] & (1L << (i%BITS_PER_LONG)))
		if (arr[i / BITS_PER_LONG] & (1ULL << (i%BITS_PER_LONG)))
			sprintf(alias + strlen(alias), "%X,*", i);
}

+3 −2
Original line number Diff line number Diff line
@@ -392,7 +392,7 @@ static int parse_source_files(const char *objfile, struct md4_ctx *md)
/* Calc and record src checksum. */
void get_src_version(const char *modname, char sum[], unsigned sumlen)
{
	char *buf;
	char *buf, *pos;
	struct md4_ctx md;
	char *fname;
	char filelist[PATH_MAX + 1];
@@ -401,9 +401,10 @@ void get_src_version(const char *modname, char sum[], unsigned sumlen)
	snprintf(filelist, sizeof(filelist), "%s.mod", modname);

	buf = read_text_file(filelist);
	pos = buf;

	md4_init(&md);
	while ((fname = strsep(&buf, "\n"))) {
	while ((fname = strsep(&pos, "\n"))) {
		if (!*fname)
			continue;
		if (!(is_static_library(fname)) &&
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ install_kernel_headers () {
	pdir=debian/$1
	version=${1#linux-headers-}

	"${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}"
	CC="${DEB_HOST_GNU_TYPE}-gcc" "${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}"

	mkdir -p $pdir/lib/modules/$version/
	ln -s /usr/src/linux-headers-$version $pdir/lib/modules/$version/build
Loading