From: Stephen Rothwell Date: Thu, 2 Sep 2021 04:10:14 +0000 (+1000) Subject: Merge remote-tracking branch 'rust/rust-next' X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7738f9ca7143fa81216794d9c4318c1e04a8c517;p=users%2Fjedix%2Flinux-maple.git Merge remote-tracking branch 'rust/rust-next' --- 7738f9ca7143fa81216794d9c4318c1e04a8c517 diff --cc Makefile index d29da2850e38,c814b209b6c9..476e3fb9feb3 --- a/Makefile +++ b/Makefile @@@ -721,12 -763,11 +763,12 @@@ $(KCONFIG_CONFIG) # This exploits the 'multi-target pattern rule' trick. # The syncconfig should be executed only once to make all the targets. # (Note: use the grouped target '&:' when we bump to GNU Make 4.3) -quiet_cmd_syncconfig = SYNC $@ - cmd_syncconfig = $(MAKE) -f $(srctree)/Makefile syncconfig - +# +# Do not use $(call cmd,...) here. That would suppress prompts from syncconfig, +# so you cannot notice that Kconfig is waiting for the user input. - %/config/auto.conf %/config/auto.conf.cmd %/generated/autoconf.h: $(KCONFIG_CONFIG) + %/config/auto.conf %/config/auto.conf.cmd %/generated/autoconf.h %/generated/rustc_cfg: $(KCONFIG_CONFIG) - +$(call cmd,syncconfig) + $(Q)$(kecho) " SYNC $@" + $(Q)$(MAKE) -f $(srctree)/Makefile syncconfig else # !may-sync-config # External modules and some install targets need include/generated/autoconf.h # and include/config/auto.conf but do not care if they are up-to-date. @@@ -810,10 -874,11 +883,11 @@@ endi # These warnings generated too much noise in a regular build. # Use make W=1 to enable them (see scripts/Makefile.extrawarn) KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) - KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) + ifdef CONFIG_FRAME_POINTER KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls + KBUILD_RUSTFLAGS += -Cforce-frame-pointers=y else # Some targets (ARM with Thumb2, for example), can't be built with frame # pointers. For those, we don't have FUNCTION_TRACER automatically @@@ -864,8 -926,13 +940,13 @@@ els DEBUG_CFLAGS += -g endif -ifneq ($(LLVM_IAS),1) +ifndef CONFIG_AS_IS_LLVM KBUILD_AFLAGS += -Wa,-gdwarf-2 + ifdef CONFIG_DEBUG_INFO_REDUCED + DEBUG_RUSTFLAGS += -Cdebuginfo=1 + else + DEBUG_RUSTFLAGS += -Cdebuginfo=2 + endif endif ifndef CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT @@@ -1222,9 -1327,12 +1311,12 @@@ archprepare: outputmakefile archheader prepare0: archprepare $(Q)$(MAKE) $(build)=scripts/mod $(Q)$(MAKE) $(build)=. + ifdef CONFIG_RUST + $(Q)$(MAKE) $(build)=rust + endif # All the preparing.. -prepare: prepare0 prepare-objtool prepare-resolve_btfids +prepare: prepare0 PHONY += remove-stale-files remove-stale-files: diff --cc include/linux/kallsyms.h index a1d6fc82d7f0,5cdc6903abca..6851c2313cad --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@@ -15,11 -14,9 +15,11 @@@ #include - #define KSYM_NAME_LEN 128 + #define KSYM_NAME_LEN 512 -#define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + (KSYM_NAME_LEN - 1) + \ - 2*(BITS_PER_LONG*3/10) + (MODULE_NAME_LEN - 1) + 1) +#define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s %s]") + \ + (KSYM_NAME_LEN - 1) + \ + 2*(BITS_PER_LONG*3/10) + (MODULE_NAME_LEN - 1) + \ + (BUILD_ID_SIZE_MAX * 2) + 1) struct cred; struct module; diff --cc scripts/Makefile.clang index 4cce8fd0779c,000000000000..f88ceb3d076e mode 100644,000000..100644 --- a/scripts/Makefile.clang +++ b/scripts/Makefile.clang @@@ -1,35 -1,0 +1,40 @@@ +# Individual arch/{arch}/Makefiles should use -EL/-EB to set intended +# endianness and -m32/-m64 to set word size based on Kconfigs instead of +# relying on the target triple. +CLANG_TARGET_FLAGS_arm := arm-linux-gnueabi +CLANG_TARGET_FLAGS_arm64 := aarch64-linux-gnu +CLANG_TARGET_FLAGS_hexagon := hexagon-linux-musl +CLANG_TARGET_FLAGS_m68k := m68k-linux-gnu +CLANG_TARGET_FLAGS_mips := mipsel-linux-gnu +CLANG_TARGET_FLAGS_powerpc := powerpc64le-linux-gnu +CLANG_TARGET_FLAGS_riscv := riscv64-linux-gnu +CLANG_TARGET_FLAGS_s390 := s390x-linux-gnu +CLANG_TARGET_FLAGS_x86 := x86_64-linux-gnu +CLANG_TARGET_FLAGS := $(CLANG_TARGET_FLAGS_$(SRCARCH)) + ++TENTATIVE_CLANG_FLAGS := -Werror=unknown-warning-option ++ +ifeq ($(CROSS_COMPILE),) +ifeq ($(CLANG_TARGET_FLAGS),) +$(error Specify CROSS_COMPILE or add '--target=' option to scripts/Makefile.clang) +else - CLANG_FLAGS += --target=$(CLANG_TARGET_FLAGS) ++TENTATIVE_CLANG_FLAGS += --target=$(CLANG_TARGET_FLAGS) +endif # CLANG_TARGET_FLAGS +else - CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%)) ++TENTATIVE_CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%)) +endif # CROSS_COMPILE + +ifeq ($(LLVM_IAS),0) - CLANG_FLAGS += -fno-integrated-as ++TENTATIVE_CLANG_FLAGS += -fno-integrated-as +GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) - CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE)) ++TENTATIVE_CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE)) +else - CLANG_FLAGS += -fintegrated-as ++TENTATIVE_CLANG_FLAGS += -fintegrated-as +endif - CLANG_FLAGS += -Werror=unknown-warning-option ++ ++export TENTATIVE_CLANG_FLAGS ++ ++CLANG_FLAGS += $(TENTATIVE_CLANG_FLAGS) +KBUILD_CFLAGS += $(CLANG_FLAGS) +KBUILD_AFLAGS += $(CLANG_FLAGS) +export CLANG_FLAGS