]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Merge tag 'kbuild-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 Sep 2019 15:36:47 +0000 (08:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 Sep 2019 15:36:47 +0000 (08:36 -0700)
Pull Kbuild updates from Masahiro Yamada:

 - add modpost warn exported symbols marked as 'static' because 'static'
   and EXPORT_SYMBOL is an odd combination

 - break the build early if gold linker is used

 - optimize the Bison rule to produce .c and .h files by a single
   pattern rule

 - handle PREEMPT_RT in the module vermagic and UTS_VERSION

 - warn CONFIG options leaked to the user-space except existing ones

 - make single targets work properly

 - rebuild modules when module linker scripts are updated

 - split the module final link stage into scripts/Makefile.modfinal

 - fix the missed error code in merge_config.sh

 - improve the error message displayed on the attempt of the O= build in
   unclean source tree

 - remove 'clean-dirs' syntax

 - disable -Wimplicit-fallthrough warning for Clang

 - add CONFIG_CC_OPTIMIZE_FOR_SIZE_O3 for ARC

 - remove ARCH_{CPP,A,C}FLAGS variables

 - add $(BASH) to run bash scripts

 - change *CFLAGS_<basetarget>.o to take the relative path to $(obj)
   instead of the basename

 - stop suppressing Clang's -Wunused-function warnings when W=1

 - fix linux/export.h to avoid genksyms calculating CRC of trimmed
   exported symbols

 - misc cleanups

* tag 'kbuild-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (63 commits)
  genksyms: convert to SPDX License Identifier for lex.l and parse.y
  modpost: use __section in the output to *.mod.c
  modpost: use MODULE_INFO() for __module_depends
  export.h, genksyms: do not make genksyms calculate CRC of trimmed symbols
  export.h: remove defined(__KERNEL__), which is no longer needed
  kbuild: allow Clang to find unused static inline functions for W=1 build
  kbuild: rename KBUILD_ENABLE_EXTRA_GCC_CHECKS to KBUILD_EXTRA_WARN
  kbuild: refactor scripts/Makefile.extrawarn
  merge_config.sh: ignore unwanted grep errors
  kbuild: change *FLAGS_<basetarget>.o to take the path relative to $(obj)
  modpost: add NOFAIL to strndup
  modpost: add guid_t type definition
  kbuild: add $(BASH) to run scripts with bash-extension
  kbuild: remove ARCH_{CPP,A,C}FLAGS
  kbuild,arc: add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC
  kbuild: Do not enable -Wimplicit-fallthrough for clang for now
  kbuild: clean up subdir-ymn calculation in Makefile.clean
  kbuild: remove unneeded '+' marker from cmd_clean
  kbuild: remove clean-dirs syntax
  kbuild: check clean srctree even earlier
  ...

24 files changed:
1  2 
Makefile
arch/Kconfig
arch/arm/Makefile
arch/arm64/Kconfig
arch/arm64/Makefile
arch/ia64/Kconfig
arch/ia64/Makefile
arch/m68k/Kconfig
arch/mips/Kconfig
arch/powerpc/Kconfig
arch/powerpc/Makefile
arch/riscv/Kconfig
arch/riscv/Makefile
arch/s390/Kconfig
arch/x86/Kconfig
drivers/gpu/drm/amd/display/dc/calcs/Makefile
drivers/gpu/drm/amd/display/dc/dcn20/Makefile
drivers/gpu/drm/amd/display/dc/dcn21/Makefile
drivers/gpu/drm/amd/display/dc/dml/Makefile
drivers/gpu/drm/amd/display/dc/dsc/Makefile
drivers/gpu/drm/i915/Makefile
init/Kconfig
kernel/Makefile
scripts/link-vmlinux.sh

diff --cc Makefile
Simple merge
diff --cc arch/Kconfig
Simple merge
Simple merge
Simple merge
Simple merge
index 9711cf73092948678423b9d474030eecd24d4032,3dead116a6d78bbf56dd28081b8222732b6c4c8f..685a3df126cab909cb92bc008cd14adf5023b436
@@@ -10,15 -10,14 +10,16 @@@ config IA6
        bool
        select ARCH_MIGHT_HAVE_PC_PARPORT
        select ARCH_MIGHT_HAVE_PC_SERIO
 -      select ACPI if (!IA64_HP_SIM)
 -      select ARCH_SUPPORTS_ACPI if (!IA64_HP_SIM)
 +      select ACPI
 +      select ACPI_NUMA if NUMA
 +      select ARCH_SUPPORTS_ACPI
        select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI
        select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI
 -      select FORCE_PCI if (!IA64_HP_SIM)
 +      select FORCE_PCI
        select PCI_DOMAINS if PCI
 +      select PCI_MSI
        select PCI_SYSCALL if PCI
+       select HAVE_ASM_MODVERSIONS
        select HAVE_UNSTABLE_SCHED_CLOCK
        select HAVE_EXIT_THREAD
        select HAVE_IDE
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 4f0a3d2018d2dbd04198a0c6abb391dfb6234531,426d989125a894cbea11a5052e07221a52368adc..f5e91421024546fd0498142c382aebccbd9ff321
@@@ -52,11 -52,8 +52,11 @@@ ifeq ($(CONFIG_CMODEL_MEDANY),y
        KBUILD_CFLAGS += -mcmodel=medany
  endif
  ifeq ($(CONFIG_MODULE_SECTIONS),y)
-       KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/riscv/kernel/module.lds
+       KBUILD_LDS_MODULE += $(srctree)/arch/riscv/kernel/module.lds
  endif
 +ifeq ($(CONFIG_PERF_EVENTS),y)
 +        KBUILD_CFLAGS += -fno-omit-frame-pointer
 +endif
  
  KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax)
  
Simple merge
Simple merge
index 16614d73a5fcf61535fc1aac6a3a8e75753c589c,d930df63772cde42a4e1bf522c798abb68950b78..985633c08a26725a5315557dbadd0f13f3c2fa76
@@@ -32,13 -32,9 +32,13 @@@ endi
  
  calcs_ccflags := -mhard-float -msse $(cc_stack_align)
  
- CFLAGS_dcn_calcs.o := $(calcs_ccflags)
- CFLAGS_dcn_calc_auto.o := $(calcs_ccflags)
- CFLAGS_dcn_calc_math.o := $(calcs_ccflags) -Wno-tautological-compare
 +ifdef CONFIG_CC_IS_CLANG
 +calcs_ccflags += -msse2
 +endif
 +
+ CFLAGS_$(AMDDALPATH)/dc/calcs/dcn_calcs.o := $(calcs_ccflags)
+ CFLAGS_$(AMDDALPATH)/dc/calcs/dcn_calc_auto.o := $(calcs_ccflags)
+ CFLAGS_$(AMDDALPATH)/dc/calcs/dcn_calc_math.o := $(calcs_ccflags) -Wno-tautological-compare
  
  BW_CALCS = dce_calcs.o bw_fixed.o custom_float.o
  
index f57a3b281408cfe6859df8f6a65c0426211fbde0,83635ad9124e9e104681fd580309eecb21407d30..ddb8d5649e79184f901161668c91fa3098416406
@@@ -16,12 -16,8 +16,12 @@@ else ifneq ($(call cc-option, -mstack-a
        cc_stack_align := -mstack-alignment=16
  endif
  
- CFLAGS_dcn20_resource.o := -mhard-float -msse $(cc_stack_align)
+ CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -mhard-float -msse $(cc_stack_align)
  
- CFLAGS_dcn20_resource.o += -msse2
 +ifdef CONFIG_CC_IS_CLANG
++CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o += -msse2
 +endif
 +
  AMD_DAL_DCN20 = $(addprefix $(AMDDALPATH)/dc/dcn20/,$(DCN20))
  
  AMD_DISPLAY_FILES += $(AMD_DAL_DCN20)
index b2b39090fb57229beee2c3f2f91a3d1578a36b8f,0000000000000000000000000000000000000000..8cd9de8b1a7a191d662a0a6a5c37c484bc01e5f2
mode 100644,000000..100644
--- /dev/null
@@@ -1,10 -1,0 +1,10 @@@
- CFLAGS_dcn21_resource.o := -mhard-float -msse -mpreferred-stack-boundary=4
 +#
 +# Makefile for DCN21.
 +
 +DCN21 = dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o
 +
++CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse -mpreferred-stack-boundary=4
 +
 +AMD_DAL_DCN21 = $(addprefix $(AMDDALPATH)/dc/dcn21/,$(DCN21))
 +
 +AMD_DISPLAY_FILES += $(AMD_DAL_DCN21)
index af2a864a6da05cfb8e42ff42d69fe96456b6b9ff,83792e2c0f0e487cc9deaef5d6994196b4ef6816..5b2a65b424036e07935122dfb38d0a529097c5d5
@@@ -32,29 -32,16 +32,26 @@@ endi
  
  dml_ccflags := -mhard-float -msse $(cc_stack_align)
  
- CFLAGS_display_mode_lib.o := $(dml_ccflags)
 +ifdef CONFIG_CC_IS_CLANG
 +dml_ccflags += -msse2
 +endif
 +
+ CFLAGS_$(AMDDALPATH)/dc/dml/display_mode_lib.o := $(dml_ccflags)
  
  ifdef CONFIG_DRM_AMD_DC_DCN2_0
- CFLAGS_display_mode_vba.o := $(dml_ccflags)
- CFLAGS_display_mode_vba_20.o := $(dml_ccflags)
- CFLAGS_display_rq_dlg_calc_20.o := $(dml_ccflags)
- CFLAGS_display_mode_vba_20v2.o := $(dml_ccflags)
- CFLAGS_display_rq_dlg_calc_20v2.o := $(dml_ccflags)
+ CFLAGS_$(AMDDALPATH)/dc/dml/display_mode_vba.o := $(dml_ccflags)
+ CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_mode_vba_20.o := $(dml_ccflags)
+ CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_rq_dlg_calc_20.o := $(dml_ccflags)
++CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_mode_vba_20v2.o := $(dml_ccflags)
++CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_rq_dlg_calc_20v2.o := $(dml_ccflags)
 +endif
 +ifdef CONFIG_DRM_AMD_DC_DCN2_1
- CFLAGS_display_mode_vba_21.o := $(dml_ccflags)
- CFLAGS_display_rq_dlg_calc_21.o := $(dml_ccflags)
++CFLAGS_$(AMDDALPATH)/dc/dml/dcn21/display_mode_vba_21.o := $(dml_ccflags)
++CFLAGS_$(AMDDALPATH)/dc/dml/dcn21/display_rq_dlg_calc_21.o := $(dml_ccflags)
  endif
- ifdef CONFIG_DRM_AMD_DCN3AG
- CFLAGS_display_mode_vba_3ag.o := $(dml_ccflags)
- endif
- CFLAGS_dml1_display_rq_dlg_calc.o := $(dml_ccflags)
- CFLAGS_display_rq_dlg_helpers.o := $(dml_ccflags)
- CFLAGS_dml_common_defs.o := $(dml_ccflags)
+ CFLAGS_$(AMDDALPATH)/dc/dml/dml1_display_rq_dlg_calc.o := $(dml_ccflags)
+ CFLAGS_$(AMDDALPATH)/dc/dml/display_rq_dlg_helpers.o := $(dml_ccflags)
+ CFLAGS_$(AMDDALPATH)/dc/dml/dml_common_defs.o := $(dml_ccflags)
  
  DML = display_mode_lib.o display_rq_dlg_helpers.o dml1_display_rq_dlg_calc.o \
        dml_common_defs.o
index 17db603f2d1f1dcd8d11d346777dbf933acac33d,c3922d6e76962e92368f48522cb0ea0e046b1bbd..b456cd23c6fa46e48b7a5b40f9d76074e57b4396
@@@ -9,14 -9,9 +9,13 @@@ endi
  
  dsc_ccflags := -mhard-float -msse $(cc_stack_align)
  
- CFLAGS_rc_calc.o := $(dsc_ccflags)
- CFLAGS_rc_calc_dpi.o := $(dsc_ccflags)
- CFLAGS_codec_main_amd.o := $(dsc_ccflags)
- CFLAGS_dc_dsc.o := $(dsc_ccflags)
 +ifdef CONFIG_CC_IS_CLANG
 +dsc_ccflags += -msse2
 +endif
 +
+ CFLAGS_$(AMDDALPATH)/dc/dsc/rc_calc.o := $(dsc_ccflags)
+ CFLAGS_$(AMDDALPATH)/dc/dsc/rc_calc_dpi.o := $(dsc_ccflags)
+ CFLAGS_$(AMDDALPATH)/dc/dsc/dc_dsc.o := $(dsc_ccflags)
  
  DSC = dc_dsc.o rc_calc.o rc_calc_dpi.o
  
Simple merge
diff --cc init/Kconfig
Simple merge
diff --cc kernel/Makefile
Simple merge
index 8c59970a09dce2bd272c99b2a157c81be75795e3,2438a9faf3f18d22d6a54dbe65f7cae9c73a843b..06495379fcd8843d4f49b3237d5f138f4a4a5134
@@@ -56,17 -56,14 +56,19 @@@ modpost_link(
  }
  
  # Link of vmlinux
 -# ${1} - optional extra .o files
 -# ${2} - output file
 +# ${1} - output file
 +# ${2}, ${3}, ... - optional extra .o files
  vmlinux_link()
  {
 -      info LD ${2}
        local lds="${objtree}/${KBUILD_LDS}"
 +      local output=${1}
        local objects
  
++      info LD ${output}
++
 +      # skip output file argument
 +      shift
 +
        if [ "${SRCARCH}" != "um" ]; then
                objects="--whole-archive                        \
                        ${KBUILD_VMLINUX_OBJS}                  \
@@@ -157,6 -139,18 +159,18 @@@ kallsyms(
        ${CC} ${aflags} -c -o ${2} ${afile}
  }
  
 -      vmlinux_link "${kallsymso_prev}" ${kallsyms_vmlinux}
+ # Perform one step in kallsyms generation, including temporary linking of
+ # vmlinux.
+ kallsyms_step()
+ {
+       kallsymso_prev=${kallsymso}
+       kallsymso=.tmp_kallsyms${1}.o
+       kallsyms_vmlinux=.tmp_vmlinux${1}
++      vmlinux_link ${kallsyms_vmlinux} "${kallsymso_prev}" ${btf_vmlinux_bin_o}
+       kallsyms ${kallsyms_vmlinux} ${kallsymso}
+ }
  # Create map file with all symbols from ${1}
  # See mksymap for additional details
  mksysmap()
@@@ -235,14 -228,8 +249,15 @@@ ${MAKE} -f "${srctree}/scripts/Makefile
  info MODINFO modules.builtin.modinfo
  ${OBJCOPY} -j .modinfo -O binary vmlinux.o modules.builtin.modinfo
  
 +btf_vmlinux_bin_o=""
 +if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then
 +      if gen_btf .tmp_vmlinux.btf .btf.vmlinux.bin.o ; then
 +              btf_vmlinux_bin_o=.btf.vmlinux.bin.o
 +      fi
 +fi
 +
  kallsymso=""
+ kallsymso_prev=""
  kallsyms_vmlinux=""
  if [ -n "${CONFIG_KALLSYMS}" ]; then
  
        fi
  fi
  
- info LD vmlinux
- vmlinux_link vmlinux "${kallsymso}" "${btf_vmlinux_bin_o}"
 -vmlinux_link "${kallsymso}" vmlinux
 -
 -if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then
 -      gen_btf vmlinux
 -fi
++vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o}
  
  if [ -n "${CONFIG_BUILDTIME_EXTABLE_SORT}" ]; then
        info SORTEX vmlinux