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

Merge tag 'kbuild-fixes-v6.8' of...

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

Pull Kbuild fixes from Masahiro Yamada:

 - Fix UML build with clang-18 and newer

 - Avoid using the alias attribute in host programs

 - Replace tabs with spaces when followed by conditionals for future GNU
   Make versions

 - Fix rpm-pkg for the systemd-provided kernel-install tool

 - Fix the undefined behavior in Kconfig for a 'int' symbol used in a
   conditional

* tag 'kbuild-fixes-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kconfig: initialize sym->curr.tri to 'no' for all symbol types again
  kbuild: rpm-pkg: simplify installkernel %post
  kbuild: Replace tabs with spaces when followed by conditionals
  modpost: avoid using the alias attribute
  kbuild: fix W= flags in the help message
  modpost: Add '.ltext' and '.ltext.*' to TEXT_SECTIONS
  um: Fix adding '-no-pie' for clang
  kbuild: defconf: use SRCARCH to find merged configs
parents cfdf0c09 bfef491d
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -1666,7 +1666,7 @@ help:
	@echo  '                       (sparse by default)'
	@echo  '  make C=2   [targets] Force check of all c source with $$CHECK'
	@echo  '  make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
	@echo  '  make W=n   [targets] Enable extra build checks, n=1,2,3 where'
	@echo  '  make W=n   [targets] Enable extra build checks, n=1,2,3,c,e where'
	@echo  '		1: warnings which may be relevant and do not occur too often'
	@echo  '		2: warnings which occur quite often but may still be relevant'
	@echo  '		3: more obscure warnings, can most likely be ignored'
+3 −1
Original line number Diff line number Diff line
@@ -115,7 +115,9 @@ archprepare:
	$(Q)$(MAKE) $(build)=$(HOST_DIR)/um include/generated/user_constants.h

LINK-$(CONFIG_LD_SCRIPT_STATIC) += -static
LINK-$(CONFIG_LD_SCRIPT_DYN) += $(call cc-option, -no-pie)
ifdef CONFIG_LD_SCRIPT_DYN
LINK-$(call gcc-min-version, 60100)$(CONFIG_CC_IS_CLANG) += -no-pie
endif
LINK-$(CONFIG_LD_SCRIPT_DYN_RPATH) += -Wl,-rpath,/lib

CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) \
+4 −4
Original line number Diff line number Diff line
@@ -9,8 +9,8 @@
# Input config fragments without '.config' suffix
define merge_into_defconfig
	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
		-m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/$(1) \
		$(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config)
		-m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$(1) \
		$(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
	+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
endef

@@ -23,7 +23,7 @@ endef
# Input config fragments without '.config' suffix
define merge_into_defconfig_override
	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
		-Q -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/$(1) \
		$(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config)
		-Q -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$(1) \
		$(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
	+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
endef
+3 −1
Original line number Diff line number Diff line
@@ -345,6 +345,8 @@ void sym_calc_value(struct symbol *sym)

	oldval = sym->curr;

	newval.tri = no;

	switch (sym->type) {
	case S_INT:
		newval.val = "0";
@@ -357,7 +359,7 @@ void sym_calc_value(struct symbol *sym)
		break;
	case S_BOOLEAN:
	case S_TRISTATE:
		newval = symbol_no.curr;
		newval.val = "n";
		break;
	default:
		sym->curr.val = sym->name;
+3 −12
Original line number Diff line number Diff line
@@ -70,9 +70,7 @@ void modpost_log(enum loglevel loglevel, const char *fmt, ...)
		break;
	case LOG_ERROR:
		fprintf(stderr, "ERROR: ");
		break;
	case LOG_FATAL:
		fprintf(stderr, "FATAL: ");
		error_occurred = true;
		break;
	default: /* invalid loglevel, ignore */
		break;
@@ -83,16 +81,8 @@ void modpost_log(enum loglevel loglevel, const char *fmt, ...)
	va_start(arglist, fmt);
	vfprintf(stderr, fmt, arglist);
	va_end(arglist);

	if (loglevel == LOG_FATAL)
		exit(1);
	if (loglevel == LOG_ERROR)
		error_occurred = true;
}

void __attribute__((alias("modpost_log")))
modpost_log_noret(enum loglevel loglevel, const char *fmt, ...);

static inline bool strends(const char *str, const char *postfix)
{
	if (strlen(str) < strlen(postfix))
@@ -806,7 +796,8 @@ static void check_section(const char *modname, struct elf_info *elf,

#define DATA_SECTIONS ".data", ".data.rel"
#define TEXT_SECTIONS ".text", ".text.*", ".sched.text", \
		".kprobes.text", ".cpuidle.text", ".noinstr.text"
		".kprobes.text", ".cpuidle.text", ".noinstr.text", \
		".ltext", ".ltext.*"
#define OTHER_TEXT_SECTIONS ".ref.text", ".head.text", ".spinlock.text", \
		".fixup", ".entry.text", ".exception.text", \
		".coldtext", ".softirqentry.text"
Loading