Commit ff8583d6 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'kbuild-v5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull more Kbuild updates from Masahiro Yamada:

 - remove unneeded use of cc-option, cc-disable-warning, cc-ldoption

 - exclude tracked files from .gitignore

 - re-enable -Wint-in-bool-context warning

 - refactor samples/Makefile

 - stop building immediately if syncconfig fails

 - do not sprinkle error messages when $(CC) does not exist

 - move arch/alpha/defconfig to the configs subdirectory

 - remove crappy header search path manipulation

 - add comment lines to .config to clarify the end of menu blocks

 - check uniqueness of module names (adding new warnings intentionally)

* tag 'kbuild-v5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (24 commits)
  kconfig: use 'else ifneq' for Makefile to improve readability
  kbuild: check uniqueness of module names
  kconfig: Terminate menu blocks with a comment in the generated config
  kbuild: add LICENSES to KBUILD_ALLDIRS
  kbuild: remove 'addtree' and 'flags' magic for header search paths
  treewide: prefix header search paths with $(srctree)/
  media: prefix header search paths with $(srctree)/
  media: remove unneeded header search paths
  alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfig
  kbuild: terminate Kconfig when $(CC) or $(LD) is missing
  kbuild: turn auto.conf.cmd into a mandatory include file
  .gitignore: exclude .get_maintainer.ignore and .gitattributes
  kbuild: add all Clang-specific flags unconditionally
  kbuild: Don't try to add '-fcatch-undefined-behavior' flag
  kbuild: add some extra warning flags unconditionally
  kbuild: add -Wvla flag unconditionally
  arch: remove dangling asm-generic wrappers
  samples: guard sub-directories with CONFIG options
  kbuild: re-enable int-in-bool-context warning
  MAINTAINERS: kbuild: Add pattern for scripts/*vmlinux*
  ...
parents f23d8719 fc2694ec
...@@ -81,12 +81,14 @@ modules.builtin ...@@ -81,12 +81,14 @@ modules.builtin
/tar-install/ /tar-install/
# #
# git files that we don't want to ignore even if they are dot-files # We don't want to ignore the following even if they are dot-files
# #
!.clang-format
!.cocciconfig
!.get_maintainer.ignore
!.gitattributes
!.gitignore !.gitignore
!.mailmap !.mailmap
!.cocciconfig
!.clang-format
# #
# Generated include files # Generated include files
......
...@@ -8542,6 +8542,7 @@ F: scripts/Kbuild* ...@@ -8542,6 +8542,7 @@ F: scripts/Kbuild*
F: scripts/Makefile* F: scripts/Makefile*
F: scripts/basic/ F: scripts/basic/
F: scripts/mk* F: scripts/mk*
F: scripts/*vmlinux*
F: scripts/mod/ F: scripts/mod/
F: scripts/package/ F: scripts/package/
......
...@@ -537,7 +537,7 @@ endif ...@@ -537,7 +537,7 @@ endif
# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile. # Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
# CC_VERSION_TEXT is referenced from Kconfig (so it needs export), # CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
# and from include/config/auto.conf.cmd to detect the compiler upgrade. # and from include/config/auto.conf.cmd to detect the compiler upgrade.
CC_VERSION_TEXT = $(shell $(CC) --version | head -n 1) CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1)
ifeq ($(config-targets),1) ifeq ($(config-targets),1)
# =========================================================================== # ===========================================================================
...@@ -651,7 +651,7 @@ ifeq ($(may-sync-config),1) ...@@ -651,7 +651,7 @@ ifeq ($(may-sync-config),1)
# Read in dependencies to all Kconfig* files, make sure to run syncconfig if # Read in dependencies to all Kconfig* files, make sure to run syncconfig if
# changes are detected. This should be included after arch/$(SRCARCH)/Makefile # changes are detected. This should be included after arch/$(SRCARCH)/Makefile
# because some architectures define CROSS_COMPILE there. # because some architectures define CROSS_COMPILE there.
-include include/config/auto.conf.cmd include include/config/auto.conf.cmd
$(KCONFIG_CONFIG): $(KCONFIG_CONFIG):
@echo >&2 '***' @echo >&2 '***'
...@@ -692,7 +692,6 @@ KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) ...@@ -692,7 +692,6 @@ KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,) KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation) KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow) KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context)
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
...@@ -732,16 +731,15 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong ...@@ -732,16 +731,15 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong
KBUILD_CFLAGS += $(stackp-flags-y) KBUILD_CFLAGS += $(stackp-flags-y)
ifdef CONFIG_CC_IS_CLANG ifdef CONFIG_CC_IS_CLANG
KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,) KBUILD_CPPFLAGS += -Qunused-arguments
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier) KBUILD_CFLAGS += -Wno-format-invalid-specifier
KBUILD_CFLAGS += $(call cc-disable-warning, gnu) KBUILD_CFLAGS += -Wno-gnu
# Quiet clang warning: comparison of unsigned expression < 0 is always false # Quiet clang warning: comparison of unsigned expression < 0 is always false
KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) KBUILD_CFLAGS += -Wno-tautological-compare
# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the
# source of a reference will be _MergedGlobals and not on of the whitelisted names. # source of a reference will be _MergedGlobals and not on of the whitelisted names.
# See modpost pattern 2 # See modpost pattern 2
KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,) KBUILD_CFLAGS += -mno-global-merge
KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
else else
# These warnings generated too much noise in a regular build. # These warnings generated too much noise in a regular build.
...@@ -842,7 +840,7 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) ...@@ -842,7 +840,7 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
KBUILD_CFLAGS += -Wdeclaration-after-statement KBUILD_CFLAGS += -Wdeclaration-after-statement
# Variable Length Arrays (VLAs) should not be used anywhere in the kernel # Variable Length Arrays (VLAs) should not be used anywhere in the kernel
KBUILD_CFLAGS += $(call cc-option,-Wvla) KBUILD_CFLAGS += -Wvla
# disable pointer signed / unsigned warnings in gcc 4.0 # disable pointer signed / unsigned warnings in gcc 4.0
KBUILD_CFLAGS += -Wno-pointer-sign KBUILD_CFLAGS += -Wno-pointer-sign
...@@ -1018,7 +1016,7 @@ export KBUILD_VMLINUX_LIBS := $(libs-y1) ...@@ -1018,7 +1016,7 @@ export KBUILD_VMLINUX_LIBS := $(libs-y1)
export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
export LDFLAGS_vmlinux export LDFLAGS_vmlinux
# used by scripts/package/Makefile # used by scripts/package/Makefile
export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch include scripts tools) export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) LICENSES arch include scripts tools)
vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS) vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)
...@@ -1290,6 +1288,7 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin ...@@ -1290,6 +1288,7 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
@$(kecho) ' Building modules, stage 2.'; @$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh
modules.builtin: $(vmlinux-dirs:%=%/modules.builtin) modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
$(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin $(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
# Copyright (C) 1994 by Linus Torvalds # Copyright (C) 1994 by Linus Torvalds
# #
KBUILD_DEFCONFIG := defconfig
NM := $(NM) -B NM := $(NM) -B
LDFLAGS_vmlinux := -static -N #-relax LDFLAGS_vmlinux := -static -N #-relax
......
../../../../../include/dt-bindings
\ No newline at end of file
generic-y += asm-offsets.h generic-y += asm-offsets.h
generic-y += bugs.h generic-y += bugs.h
generic-y += clkdev.h
generic-y += compat.h generic-y += compat.h
generic-y += current.h generic-y += current.h
generic-y += delay.h generic-y += delay.h
...@@ -29,15 +28,12 @@ generic-y += local64.h ...@@ -29,15 +28,12 @@ generic-y += local64.h
generic-y += mm-arch-hooks.h generic-y += mm-arch-hooks.h
generic-y += mmiowb.h generic-y += mmiowb.h
generic-y += module.h generic-y += module.h
generic-y += mutex.h
generic-y += pci.h generic-y += pci.h
generic-y += percpu.h generic-y += percpu.h
generic-y += preempt.h generic-y += preempt.h
generic-y += qrwlock.h generic-y += qrwlock.h
generic-y += scatterlist.h
generic-y += sections.h generic-y += sections.h
generic-y += serial.h generic-y += serial.h
generic-y += shm.h
generic-y += timex.h generic-y += timex.h
generic-y += topology.h generic-y += topology.h
generic-y += trace_clock.h generic-y += trace_clock.h
......
...@@ -38,7 +38,6 @@ generic-y += pci.h ...@@ -38,7 +38,6 @@ generic-y += pci.h
generic-y += percpu.h generic-y += percpu.h
generic-y += pgalloc.h generic-y += pgalloc.h
generic-y += preempt.h generic-y += preempt.h
generic-y += scatterlist.h
generic-y += sections.h generic-y += sections.h
generic-y += serial.h generic-y += serial.h
generic-y += shmparam.h generic-y += shmparam.h
......
...@@ -11,7 +11,7 @@ quiet_cmd_gate = GATE $@ ...@@ -11,7 +11,7 @@ quiet_cmd_gate = GATE $@
cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@ cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \ GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \
$(call cc-ldoption, -Wl$(comma)--hash-style=sysv) -Wl,--hash-style=sysv
$(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE $(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE
$(call if_changed,gate) $(call if_changed,gate)
......
# NXP STB225 # NXP STB225
platform-$(CONFIG_SOC_PNX833X) += pnx833x/ platform-$(CONFIG_SOC_PNX833X) += pnx833x/
cflags-$(CONFIG_SOC_PNX833X) += -Iarch/mips/include/asm/mach-pnx833x cflags-$(CONFIG_SOC_PNX833X) += -I $(srctree)/arch/mips/include/asm/mach-pnx833x
load-$(CONFIG_NXP_STB220) += 0xffffffff80001000 load-$(CONFIG_NXP_STB220) += 0xffffffff80001000
load-$(CONFIG_NXP_STB225) += 0xffffffff80001000 load-$(CONFIG_NXP_STB225) += 0xffffffff80001000
...@@ -4,10 +4,8 @@ generic-y += bitops.h ...@@ -4,10 +4,8 @@ generic-y += bitops.h
generic-y += bug.h generic-y += bug.h
generic-y += bugs.h generic-y += bugs.h
generic-y += checksum.h generic-y += checksum.h
generic-y += clkdev.h
generic-y += cmpxchg.h generic-y += cmpxchg.h
generic-y += compat.h generic-y += compat.h
generic-y += cputime.h
generic-y += device.h generic-y += device.h
generic-y += div64.h generic-y += div64.h
generic-y += dma.h generic-y += dma.h
...@@ -26,7 +24,6 @@ generic-y += kdebug.h ...@@ -26,7 +24,6 @@ generic-y += kdebug.h
generic-y += kmap_types.h generic-y += kmap_types.h
generic-y += kprobes.h generic-y += kprobes.h
generic-y += kvm_para.h generic-y += kvm_para.h
generic-y += limits.h
generic-y += local.h generic-y += local.h
generic-y += local64.h generic-y += local64.h
generic-y += mm-arch-hooks.h generic-y += mm-arch-hooks.h
......
...@@ -211,7 +211,7 @@ endif ...@@ -211,7 +211,7 @@ endif
asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1) asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)
KBUILD_CPPFLAGS += -Iarch/$(ARCH) $(asinstr) KBUILD_CPPFLAGS += -I $(srctree)/arch/$(ARCH) $(asinstr)
KBUILD_AFLAGS += $(AFLAGS-y) KBUILD_AFLAGS += $(AFLAGS-y)
KBUILD_CFLAGS += $(call cc-option,-msoft-float) KBUILD_CFLAGS += $(call cc-option,-msoft-float)
KBUILD_CFLAGS += -pipe $(CFLAGS-y) KBUILD_CFLAGS += -pipe $(CFLAGS-y)
......
generic-y += bugs.h generic-y += bugs.h
generic-y += checksum.h generic-y += checksum.h
generic-y += compat.h generic-y += compat.h
generic-y += cputime.h
generic-y += device.h generic-y += device.h
generic-y += div64.h generic-y += div64.h
generic-y += extable.h generic-y += extable.h
...@@ -12,7 +11,6 @@ generic-y += emergency-restart.h ...@@ -12,7 +11,6 @@ generic-y += emergency-restart.h
generic-y += exec.h generic-y += exec.h
generic-y += fb.h generic-y += fb.h
generic-y += hardirq.h generic-y += hardirq.h
generic-y += hash.h
generic-y += hw_irq.h generic-y += hw_irq.h
generic-y += irq_regs.h generic-y += irq_regs.h
generic-y += irq_work.h generic-y += irq_work.h
...@@ -22,10 +20,8 @@ generic-y += kvm_para.h ...@@ -22,10 +20,8 @@ generic-y += kvm_para.h
generic-y += local.h generic-y += local.h
generic-y += local64.h generic-y += local64.h
generic-y += mm-arch-hooks.h generic-y += mm-arch-hooks.h
generic-y += mutex.h
generic-y += percpu.h generic-y += percpu.h
generic-y += preempt.h generic-y += preempt.h
generic-y += scatterlist.h
generic-y += sections.h generic-y += sections.h
generic-y += serial.h generic-y += serial.h
generic-y += shmparam.h generic-y += shmparam.h
......
...@@ -191,8 +191,8 @@ cpuincdir-y += cpu-common # Must be last ...@@ -191,8 +191,8 @@ cpuincdir-y += cpu-common # Must be last
drivers-y += arch/sh/drivers/ drivers-y += arch/sh/drivers/
drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/ drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/
cflags-y += $(foreach d, $(cpuincdir-y), -Iarch/sh/include/$(d)) \ cflags-y += $(foreach d, $(cpuincdir-y), -I $(srctree)/arch/sh/include/$(d)) \
$(foreach d, $(machdir-y), -Iarch/sh/include/$(d)) $(foreach d, $(machdir-y), -I $(srctree)/arch/sh/include/$(d))
KBUILD_CFLAGS += -pipe $(cflags-y) KBUILD_CFLAGS += -pipe $(cflags-y)
KBUILD_CPPFLAGS += $(cflags-y) KBUILD_CPPFLAGS += $(cflags-y)
......
zImage zImage
vmlinux* vmlinux*
uImage* uImage*
!vmlinux.scr
...@@ -15,8 +15,7 @@ quiet_cmd_syscall = SYSCALL $@ ...@@ -15,8 +15,7 @@ quiet_cmd_syscall = SYSCALL $@
export CPPFLAGS_vsyscall.lds += -P -C -Ush export CPPFLAGS_vsyscall.lds += -P -C -Ush
vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 \ vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 -Wl,--hash-style=sysv
$(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
SYSCFLAGS_vsyscall-trapa.so = $(vsyscall-flags) SYSCFLAGS_vsyscall-trapa.so = $(vsyscall-flags)
......
...@@ -42,7 +42,7 @@ endif ...@@ -42,7 +42,7 @@ endif
# non-deterministic coverage. # non-deterministic coverage.
KCOV_INSTRUMENT := n KCOV_INSTRUMENT := n
CFLAGS_irq.o := -I$(src)/../include/asm/trace CFLAGS_irq.o := -I $(srctree)/$(src)/../include/asm/trace
obj-y := process_$(BITS).o signal.o obj-y := process_$(BITS).o signal.o
obj-$(CONFIG_COMPAT) += signal_compat.o obj-$(CONFIG_COMPAT) += signal_compat.o
......
...@@ -21,7 +21,7 @@ CFLAGS_physaddr.o := $(nostackp) ...@@ -21,7 +21,7 @@ CFLAGS_physaddr.o := $(nostackp)
CFLAGS_setup_nx.o := $(nostackp) CFLAGS_setup_nx.o := $(nostackp)
CFLAGS_mem_encrypt_identity.o := $(nostackp) CFLAGS_mem_encrypt_identity.o := $(nostackp)
CFLAGS_fault.o := -I$(src)/../include/asm/trace CFLAGS_fault.o := -I $(srctree)/$(src)/../include/asm/trace
obj-$(CONFIG_X86_PAT) += pat_rbtree.o obj-$(CONFIG_X86_PAT) += pat_rbtree.o
......
...@@ -7,7 +7,7 @@ zlib := inffast.c inflate.c inftrees.c ...@@ -7,7 +7,7 @@ zlib := inffast.c inflate.c inftrees.c
lib-y += $(zlib:.c=.o) zmem.o lib-y += $(zlib:.c=.o) zmem.o
ccflags-y := -Ilib/zlib_inflate ccflags-y := -I $(srctree)/lib/zlib_inflate
ifdef CONFIG_FUNCTION_TRACER ifdef CONFIG_FUNCTION_TRACER
CFLAGS_REMOVE_inflate.o = -pg CFLAGS_REMOVE_inflate.o = -pg
CFLAGS_REMOVE_zmem.o = -pg CFLAGS_REMOVE_zmem.o = -pg
......
...@@ -27,7 +27,6 @@ generic-y += preempt.h ...@@ -27,7 +27,6 @@ generic-y += preempt.h
generic-y += qrwlock.h generic-y += qrwlock.h
generic-y += qspinlock.h generic-y += qspinlock.h
generic-y += sections.h generic-y += sections.h
generic-y += socket.h
generic-y += topology.h generic-y += topology.h
generic-y += trace_clock.h generic-y += trace_clock.h
generic-y += vga.h generic-y += vga.h
......
...@@ -23,4 +23,4 @@ intel-ishtp-hid-objs += ishtp-hid-client.o ...@@ -23,4 +23,4 @@ intel-ishtp-hid-objs += ishtp-hid-client.o
obj-$(CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ishtp-loader.o obj-$(CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ishtp-loader.o
intel-ishtp-loader-objs += ishtp-fw-loader.o intel-ishtp-loader-objs += ishtp-fw-loader.o
ccflags-y += -Idrivers/hid/intel-ish-hid/ishtp ccflags-y += -I $(srctree)/$(src)/ishtp
...@@ -4,5 +4,5 @@ b2c2-flexcop-objs += flexcop-sram.o flexcop-eeprom.o flexcop-misc.o ...@@ -4,5 +4,5 @@ b2c2-flexcop-objs += flexcop-sram.o flexcop-eeprom.o flexcop-misc.o
b2c2-flexcop-objs += flexcop-hw-filter.o b2c2-flexcop-objs += flexcop-hw-filter.o
obj-$(CONFIG_DVB_B2C2_FLEXCOP) += b2c2-flexcop.o obj-$(CONFIG_DVB_B2C2_FLEXCOP) += b2c2-flexcop.o
ccflags-y += -Idrivers/media/dvb-frontends/ ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
ccflags-y += -Idrivers/media/tuners/ ccflags-y += -I $(srctree)/drivers/media/tuners/
...@@ -14,5 +14,3 @@ cxd2880-objs := cxd2880_common.o \ ...@@ -14,5 +14,3 @@ cxd2880-objs := cxd2880_common.o \
cxd2880_top.o cxd2880_top.o
obj-$(CONFIG_DVB_CXD2880) += cxd2880.o obj-$(CONFIG_DVB_CXD2880) += cxd2880.o
ccflags-y += -Idrivers/media/dvb-frontends
...@@ -2,4 +2,4 @@ smiapp-objs += smiapp-core.o smiapp-regs.o \ ...@@ -2,4 +2,4 @@ smiapp-objs += smiapp-core.o smiapp-regs.o \
smiapp-quirk.o smiapp-limits.o smiapp-quirk.o smiapp-limits.o
obj-$(CONFIG_VIDEO_SMIAPP) += smiapp.o obj-$(CONFIG_VIDEO_SMIAPP) += smiapp.o
ccflags-y += -Idrivers/media/i2c ccflags-y += -I $(srctree)/drivers/media/i2c
obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o
ccflags-y += -Idrivers/media/common/siano ccflags-y += -I $(srctree)/drivers/media/common/siano
...@@ -6,4 +6,4 @@ endif ...@@ -6,4 +6,4 @@ endif
b2c2-flexcop-pci-objs += flexcop-pci.o b2c2-flexcop-pci-objs += flexcop-pci.o
obj-$(CONFIG_DVB_B2C2_FLEXCOP_PCI) += b2c2-flexcop-pci.o obj-$(CONFIG_DVB_B2C2_FLEXCOP_PCI) += b2c2-flexcop-pci.o
ccflags-y += -Idrivers/media/common/b2c2/ ccflags-y += -I $(srctree)/drivers/media/common/b2c2/
...@@ -6,6 +6,5 @@ bttv-objs := bttv-driver.o bttv-cards.o bttv-if.o \ ...@@ -6,6 +6,5 @@ bttv-objs := bttv-driver.o bttv-cards.o bttv-if.o \
obj-$(CONFIG_VIDEO_BT848) += bttv.o obj-$(CONFIG_VIDEO_BT848) += bttv.o
obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o dst.o dst_ca.o obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o dst.o dst_ca.o
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
ccflags-y += -Idrivers/media/common ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -Idrivers/media/tuners
...@@ -9,5 +9,5 @@ cx18-alsa-objs := cx18-alsa-main.o cx18-alsa-pcm.o ...@@ -9,5 +9,5 @@ cx18-alsa-objs := cx18-alsa-main.o cx18-alsa-pcm.o
obj-$(CONFIG_VIDEO_CX18) += cx18.o obj-$(CONFIG_VIDEO_CX18) += cx18.o
obj-$(CONFIG_VIDEO_CX18_ALSA) += cx18-alsa.o obj-$(CONFIG_VIDEO_CX18_ALSA) += cx18-alsa.o
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
ccflags-y += -Idrivers/media/tuners ccflags-y += -I $(srctree)/drivers/media/tuners
...@@ -8,7 +8,7 @@ cx23885-objs := cx23885-cards.o cx23885-video.o cx23885-vbi.o \ ...@@ -8,7 +8,7 @@ cx23885-objs := cx23885-cards.o cx23885-video.o cx23885-vbi.o \
obj-$(CONFIG_VIDEO_CX23885) += cx23885.o obj-$(CONFIG_VIDEO_CX23885) += cx23885.o
obj-$(CONFIG_MEDIA_ALTERA_CI) += altera-ci.o obj-$(CONFIG_MEDIA_ALTERA_CI) += altera-ci.o
ccflags-y += -Idrivers/media/tuners ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
ccflags-y += $(extra-cflags-y) $(extra-cflags-m) ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
...@@ -10,5 +10,5 @@ obj-$(CONFIG_VIDEO_CX88_ALSA) += cx88-alsa.o ...@@ -10,5 +10,5 @@ obj-$(CONFIG_VIDEO_CX88_ALSA) += cx88-alsa.o
obj-$(CONFIG_VIDEO_CX88_BLACKBIRD) += cx88-blackbird.o obj-$(CONFIG_VIDEO_CX88_BLACKBIRD) += cx88-blackbird.o
obj-$(CONFIG_VIDEO_CX88_DVB) += cx88-dvb.o obj-$(CONFIG_VIDEO_CX88_DVB) += cx88-dvb.o
obj-$(CONFIG_VIDEO_CX88_VP3054) += cx88-vp3054-i2c.o obj-$(CONFIG_VIDEO_CX88_VP3054) += cx88-vp3054-i2c.o
ccflags-y += -Idrivers/media/tuners ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
...@@ -9,5 +9,5 @@ ddbridge-objs := ddbridge-main.o ddbridge-core.o ddbridge-ci.o \ ...@@ -9,5 +9,5 @@ ddbridge-objs := ddbridge-main.o ddbridge-core.o ddbridge-ci.o \
obj-$(CONFIG_DVB_DDBRIDGE) += ddbridge.o obj-$(CONFIG_DVB_DDBRIDGE) += ddbridge.o
ccflags-y += -Idrivers/media/dvb-frontends/ ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
ccflags-y += -Idrivers/media/tuners/ ccflags-y += -I $(srctree)/drivers/media/tuners/
obj-$(CONFIG_DVB_DM1105) += dm1105.o obj-$(CONFIG_DVB_DM1105) += dm1105.o
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
...@@ -26,4 +26,4 @@ obj-$(CONFIG_MANTIS_CORE) += mantis_core.o ...@@ -26,4 +26,4 @@ obj-$(CONFIG_MANTIS_CORE) += mantis_core.o
obj-$(CONFIG_DVB_MANTIS) += mantis.o obj-$(CONFIG_DVB_MANTIS) += mantis.o
obj-$(CONFIG_DVB_HOPPER) += hopper.o obj-$(CONFIG_DVB_HOPPER) += hopper.o
ccflags-y += -Idrivers/media/dvb-frontends/ ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
...@@ -6,4 +6,4 @@ netup-unidvb-objs += netup_unidvb_spi.o ...@@ -6,4 +6,4 @@ netup-unidvb-objs += netup_unidvb_spi.o
obj-$(CONFIG_DVB_NETUP_UNIDVB) += netup-unidvb.o obj-$(CONFIG_DVB_NETUP_UNIDVB) += netup-unidvb.o
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
...@@ -7,5 +7,5 @@ ngene-objs := ngene-core.o ngene-i2c.o ngene-cards.o ngene-dvb.o ...@@ -7,5 +7,5 @@ ngene-objs := ngene-core.o ngene-i2c.o ngene-cards.o ngene-dvb.o
obj-$(CONFIG_DVB_NGENE) += ngene.o obj-$(CONFIG_DVB_NGENE) += ngene.o
ccflags-y += -Idrivers/media/dvb-frontends/ ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
ccflags-y += -Idrivers/media/tuners/ ccflags-y += -I $(srctree)/drivers/media/tuners/
obj-$(CONFIG_DVB_PLUTO2) += pluto2.o obj-$(CONFIG_DVB_PLUTO2) += pluto2.o
ccflags-y += -Idrivers/media/dvb-frontends/ ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
...@@ -2,5 +2,5 @@ earth-pt1-objs := pt1.o ...@@ -2,5 +2,5 @@ earth-pt1-objs := pt1.o
obj-$(CONFIG_DVB_PT1) += earth-pt1.o obj-$(CONFIG_DVB_PT1) += earth-pt1.o
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
ccflags-y += -Idrivers/media/tuners ccflags-y += -I $(srctree)/drivers/media/tuners
...@@ -4,5 +4,5 @@ earth-pt3-objs += pt3.o pt3_i2c.o pt3_dma.o ...@@ -4,5 +4,5 @@ earth-pt3-objs += pt3.o pt3_i2c.o pt3_dma.o
obj-$(CONFIG_DVB_PT3) += earth-pt3.o obj-$(CONFIG_DVB_PT3) += earth-pt3.o
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
ccflags-y += -Idrivers/media/tuners ccflags-y += -I $(srctree)/drivers/media/tuners
...@@ -4,6 +4,5 @@ smipcie-objs := smipcie-main.o smipcie-ir.o ...@@ -4,6 +4,5 @@ smipcie-objs := smipcie-main.o smipcie-ir.o
obj-$(CONFIG_DVB_SMIPCIE) += smipcie.o obj-$(CONFIG_DVB_SMIPCIE) += smipcie.o
ccflags-y += -Idrivers/media/tuners ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
...@@ -18,5 +18,5 @@ obj-$(CONFIG_DVB_BUDGET_CI) += budget-ci.o ...@@ -18,5 +18,5 @@ obj-$(CONFIG_DVB_BUDGET_CI) += budget-ci.o
obj-$(CONFIG_DVB_BUDGET_PATCH) += budget-patch.o obj-$(CONFIG_DVB_BUDGET_PATCH) += budget-patch.o
obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o
ccflags-y += -Idrivers/media/dvb-frontends/ ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
ccflags-y += -Idrivers/media/tuners ccflags-y += -I $(srctree)/drivers/media/tuners
...@@ -4,6 +4,5 @@ c8sectpfe-y += c8sectpfe-core.o c8sectpfe-common.o c8sectpfe-dvb.o \ ...@@ -4,6 +4,5 @@ c8sectpfe-y += c8sectpfe-core.o c8sectpfe-common.o c8sectpfe-dvb.o \
obj-$(CONFIG_DVB_C8SECTPFE) += c8sectpfe.o obj-$(CONFIG_DVB_C8SECTPFE) += c8sectpfe.o
ccflags-y += -Idrivers/media/common ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/
ccflags-y += -Idrivers/media/dvb-frontends/ ccflags-y += -I $(srctree)/drivers/media/tuners/
ccflags-y += -Idrivers/media/tuners/
...@@ -36,5 +36,3 @@ obj-$(CONFIG_RADIO_TEA575X) += tea575x.o ...@@ -36,5 +36,3 @@ obj-$(CONFIG_RADIO_TEA575X) += tea575x.o
obj-$(CONFIG_USB_RAREMONO) += radio-raremono.o obj-$(CONFIG_USB_RAREMONO) += radio-raremono.o
shark2-objs := radio-shark2.o radio-tea5777.o shark2-objs := radio-shark2.o radio-tea5777.o
ccflags-y += -Isound
obj-$(CONFIG_VIDEO_GS1662) += gs1662.o obj-$(CONFIG_VIDEO_GS1662) += gs1662.o
obj-$(CONFIG_CXD2880_SPI_DRV) += cxd2880-spi.o obj-$(CONFIG_CXD2880_SPI_DRV) += cxd2880-spi.o
ccflags-y += -Idrivers/media/dvb-core ccflags-y += -I $(srctree)/drivers/media/dvb-frontends/cxd2880
ccflags-y += -Idrivers/media/dvb-frontends
ccflags-y += -Idrivers/media/dvb-frontends/cxd2880
...@@ -4,4 +4,4 @@ dvb-as102-objs := as102_drv.o as102_fw.o as10x_cmd.o as10x_cmd_stream.o \ ...@@ -4,4 +4,4 @@ dvb-as102-objs := as102_drv.o as102_fw.o as10x_cmd.o as10x_cmd_stream.o \
obj-$(CONFIG_DVB_AS102) += dvb-as102.o obj-$(CONFIG_DVB_AS102) += dvb-as102.o
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
...@@ -11,7 +11,7 @@ endif ...@@ -11,7 +11,7 @@ endif
obj-$(CONFIG_VIDEO_AU0828) += au0828.o obj-$(CONFIG_VIDEO_AU0828) += au0828.o
ccflags-y += -Idrivers/media/tuners ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
ccflags-y += $(extra-cflags-y) $(extra-cflags-m) ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
b2c2-flexcop-usb-objs := flexcop-usb.o b2c2-flexcop-usb-objs := flexcop-usb.o
obj-$(CONFIG_DVB_B2C2_FLEXCOP_USB) += b2c2-flexcop-usb.o obj-$(CONFIG_DVB_B2C2_FLEXCOP_USB) += b2c2-flexcop-usb.o
ccflags-y += -Idrivers/media/common/b2c2/ ccflags-y += -I $(srctree)/drivers/media/common/b2c2/
...@@ -9,6 +9,5 @@ obj-$(CONFIG_VIDEO_CX231XX) += cx231xx.o ...@@ -9,6 +9,5 @@ obj-$(CONFIG_VIDEO_CX231XX) += cx231xx.o
obj-$(CONFIG_VIDEO_CX231XX_ALSA) += cx231xx-alsa.o obj-$(CONFIG_VIDEO_CX231XX_ALSA) += cx231xx-alsa.o
obj-$(CONFIG_VIDEO_CX231XX_DVB) += cx231xx-dvb.o obj-$(CONFIG_VIDEO_CX231XX_DVB) += cx231xx-dvb.o
ccflags-y += -Idrivers/media/tuners ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
ccflags-y += -Idrivers/media/usb/dvb-usb
...@@ -11,5 +11,5 @@ obj-$(CONFIG_VIDEO_EM28XX_ALSA) += em28xx-alsa.o ...@@ -11,5 +11,5 @@ obj-$(CONFIG_VIDEO_EM28XX_ALSA) += em28xx-alsa.o
obj-$(CONFIG_VIDEO_EM28XX_DVB) += em28xx-dvb.o obj-$(CONFIG_VIDEO_EM28XX_DVB) += em28xx-dvb.o
obj-$(CONFIG_VIDEO_EM28XX_RC) += em28xx-rc.o obj-$(CONFIG_VIDEO_EM28XX_RC) += em28xx-rc.o
ccflags-y += -Idrivers/media/tuners ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
...@@ -9,4 +9,4 @@ go7007-y := go7007-v4l2.o go7007-driver.o go7007-i2c.o go7007-fw.o \ ...@@ -9,4 +9,4 @@ go7007-y := go7007-v4l2.o go7007-driver.o go7007-i2c.o go7007-fw.o \
s2250-y := s2250-board.o s2250-y := s2250-board.o
ccflags-$(CONFIG_VIDEO_GO7007_LOADER:m=y) += -Idrivers/media/common ccflags-$(CONFIG_VIDEO_GO7007_LOADER:m=y) += -I $(srctree)/drivers/media/common
...@@ -17,5 +17,5 @@ pvrusb2-objs := pvrusb2-i2c-core.o \ ...@@ -17,5 +17,5 @@ pvrusb2-objs := pvrusb2-i2c-core.o \
obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2.o obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2.o
ccflags-y += -Idrivers/media/tuners ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
obj-$(CONFIG_SMS_USB_DRV) += smsusb.o obj-$(CONFIG_SMS_USB_DRV) += smsusb.o
ccflags-y += -Idrivers/media/common/siano ccflags-y += -I $(srctree)/drivers/media/common/siano
ccflags-y += $(extra-cflags-y) $(extra-cflags-m) ccflags-y += $(extra-cflags-y) $(extra-cflags-m)
...@@ -10,5 +10,5 @@ obj-$(CONFIG_VIDEO_TM6000) += tm6000.o ...@@ -10,5 +10,5 @@ obj-$(CONFIG_VIDEO_TM6000) += tm6000.o
obj-$(CONFIG_VIDEO_TM6000_ALSA) += tm6000-alsa.o obj-$(CONFIG_VIDEO_TM6000_ALSA) += tm6000-alsa.o
obj-$(CONFIG_VIDEO_TM6000_DVB) += tm6000-dvb.o obj-$(CONFIG_VIDEO_TM6000_DVB) += tm6000-dvb.o
ccflags-y += -Idrivers/media/tuners ccflags-y += -I $(srctree)/drivers/media/tuners
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
obj-$(CONFIG_DVB_TTUSB_BUDGET) += dvb-ttusb-budget.o obj-$(CONFIG_DVB_TTUSB_BUDGET) += dvb-ttusb-budget.o
ccflags-y += -Idrivers/media/dvb-frontends ccflags-y += -I $(srctree)/drivers/media/dvb-frontends
usbvision-objs := usbvision-core.o usbvision-video.o usbvision-i2c.o usbvision-cards.o usbvision-objs := usbvision-core.o usbvision-video.o usbvision-i2c.o usbvision-cards.o
obj-$(CONFIG_VIDEO_USBVISION) += usbvision.o obj-$(CONFIG_VIDEO_USBVISION) += usbvision.o
ccflags-y += -Idrivers/media/tuners
ccflags-y := -Idrivers/net/ethernet/chelsio/cxgb4 ccflags-y := -I $(srctree)/$(src)/../cxgb4
obj-$(CONFIG_CHELSIO_LIB) += libcxgb.o obj-$(CONFIG_CHELSIO_LIB) += libcxgb.o
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
ccflags-y := -Idrivers/net/ethernet/chelsio/cxgb4 ccflags-y := -I $(srctree)/drivers/net/ethernet/chelsio/cxgb4
ccflags-y += -Idrivers/net/ethernet/chelsio/libcxgb ccflags-y += -I $(srctree)/drivers/net/ethernet/chelsio/libcxgb
ccflags-y += -Idrivers/target/iscsi ccflags-y += -I $(srctree)/drivers/target/iscsi
obj-$(CONFIG_ISCSI_TARGET_CXGB4) += cxgbit.o obj-$(CONFIG_ISCSI_TARGET_CXGB4) += cxgbit.o
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Rewritten to use lists instead of if-statements. # Rewritten to use lists instead of if-statements.
# #
ccflags-y := -Idrivers/scsi ccflags-y := -I $(srctree)/drivers/scsi
obj-$(CONFIG_USB_UAS) += uas.o obj-$(CONFIG_USB_UAS) += uas.o
obj-$(CONFIG_USB_STORAGE) += usb-storage.o obj-$(CONFIG_USB_STORAGE) += usb-storage.o
......
ccflags-y := -I$(src)/.. ccflags-y := -I $(srctree)/$(src)/..
obj-$(CONFIG_OCFS2_FS_O2CB) += ocfs2_dlm.o obj-$(CONFIG_OCFS2_FS_O2CB) += ocfs2_dlm.o
ocfs2_dlm-objs := dlmdomain.o dlmdebug.o dlmthread.o dlmrecovery.o \ ocfs2_dlm-objs := dlmdomain.o dlmdebug.o dlmthread.o dlmrecovery.o \
dlmmaster.o dlmast.o dlmconvert.o dlmlock.o dlmunlock.o dlmmaster.o dlmast.o dlmconvert.o dlmlock.o dlmunlock.o
ccflags-y := -I$(src)/.. ccflags-y := -I $(srctree)/$(src)/..
obj-$(CONFIG_OCFS2_FS) += ocfs2_dlmfs.o obj-$(CONFIG_OCFS2_FS) += ocfs2_dlmfs.o
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
# All Rights Reserved. # All Rights Reserved.
# #
ccflags-y += -I$(src) # needed for trace events ccflags-y += -I $(srctree)/$(src) # needed for trace events
ccflags-y += -I$(src)/libxfs ccflags-y += -I $(srctree)/$(src)/libxfs
ccflags-$(CONFIG_XFS_DEBUG) += -g ccflags-$(CONFIG_XFS_DEBUG) += -g
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
hostprogs-y := bpfilter_umh hostprogs-y := bpfilter_umh
bpfilter_umh-objs := main.o bpfilter_umh-objs := main.o
KBUILD_HOSTCFLAGS += -Itools/include/ -Itools/include/uapi KBUILD_HOSTCFLAGS += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi
HOSTCC := $(CC) HOSTCC := $(CC)
ifeq ($(CONFIG_BPFILTER_UMH), y) ifeq ($(CONFIG_BPFILTER_UMH), y)
......
# SPDX-License-Identifier: GPL-2.0
# Makefile for Linux samples code # Makefile for Linux samples code
obj-y += kobject/ kprobes/ trace_events/ livepatch/ \ obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs/
hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \ obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs/
configfs/ connector/ v4l/ trace_printk/ \ obj-$(CONFIG_SAMPLE_CONNECTOR) += connector/
vfio-mdev/ vfs/ qmi/ binderfs/ pidfd/ subdir-y += hidraw
obj-$(CONFIG_SAMPLE_HW_BREAKPOINT) += hw_breakpoint/
obj-$(CONFIG_SAMPLE_KDB) += kdb/
obj-$(CONFIG_SAMPLE_KFIFO) += kfifo/
obj-$(CONFIG_SAMPLE_KOBJECT) += kobject/
obj-$(CONFIG_SAMPLE_KPROBES) += kprobes/
obj-$(CONFIG_SAMPLE_LIVEPATCH) += livepatch/
subdir-y += pidfd
obj-$(CONFIG_SAMPLE_QMI_CLIENT) += qmi/
obj-$(CONFIG_SAMPLE_RPMSG_CLIENT) += rpmsg/
subdir-$(CONFIG_SAMPLE_SECCOMP) += seccomp
obj-$(CONFIG_SAMPLE_TRACE_EVENTS) += trace_events/
obj-$(CONFIG_SAMPLE_TRACE_PRINTK) += trace_printk/
obj-$(CONFIG_VIDEO_PCI_SKELETON) += v4l/
obj-y += vfio-mdev/
subdir-$(CONFIG_SAMPLE_VFS) += vfs
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
ifndef CROSS_COMPILE ifndef CROSS_COMPILE
hostprogs-$(CONFIG_SAMPLE_SECCOMP) := bpf-fancy dropper bpf-direct user-trap hostprogs-y := bpf-fancy dropper bpf-direct user-trap
HOSTCFLAGS_bpf-fancy.o += -I$(objtree)/usr/include HOSTCFLAGS_bpf-fancy.o += -I$(objtree)/usr/include
HOSTCFLAGS_bpf-fancy.o += -idirafter $(objtree)/include HOSTCFLAGS_bpf-fancy.o += -idirafter $(objtree)/include
......
# List of programs to build # List of programs to build
hostprogs-$(CONFIG_SAMPLE_VFS) := \ hostprogs-y := \
test-fsmount \ test-fsmount \
test-statx test-statx
......
...@@ -192,14 +192,6 @@ clean := -f $(srctree)/scripts/Makefile.clean obj ...@@ -192,14 +192,6 @@ clean := -f $(srctree)/scripts/Makefile.clean obj
# $(Q)$(MAKE) $(hdr-inst)=dir # $(Q)$(MAKE) $(hdr-inst)=dir
hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj
# Prefix -I with $(srctree) if it is not an absolute path.
# skip if -I has no parameter
addtree = $(if $(patsubst -I%,%,$(1)), \
$(if $(filter-out -I/% -I./% -I../%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1)),$(1))
# Find all -I options and call addtree
flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))
# echo command. # echo command.
# Short version is used, if $(quiet) equals `quiet_', otherwise full one. # Short version is used, if $(quiet) equals `quiet_', otherwise full one.
echo-cmd = $(if $($(quiet)cmd_$(1)),\ echo-cmd = $(if $($(quiet)cmd_$(1)),\
......
...@@ -18,6 +18,10 @@ if-success = $(shell,{ $(1); } >/dev/null 2>&1 && echo "$(2)" || echo "$(3)") ...@@ -18,6 +18,10 @@ if-success = $(shell,{ $(1); } >/dev/null 2>&1 && echo "$(2)" || echo "$(3)")
# Return y if <command> exits with 0, n otherwise # Return y if <command> exits with 0, n otherwise
success = $(if-success,$(1),y,n) success = $(if-success,$(1),y,n)
# $(failure,<command>)
# Return n if <command> exits with 0, y otherwise
failure = $(if-success,$(1),n,y)
# $(cc-option,<flag>) # $(cc-option,<flag>)
# Return y if the compiler supports <flag>, n otherwise # Return y if the compiler supports <flag>, n otherwise
cc-option = $(success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null) cc-option = $(success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null)
...@@ -26,5 +30,9 @@ cc-option = $(success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null) ...@@ -26,5 +30,9 @@ cc-option = $(success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null)
# Return y if the linker supports <flag>, n otherwise # Return y if the linker supports <flag>, n otherwise
ld-option = $(success,$(LD) -v $(1)) ld-option = $(success,$(LD) -v $(1))
# check if $(CC) and $(LD) exist
$(error-if,$(failure,command -v $(CC)),compiler '$(CC)' not found)
$(error-if,$(failure,command -v $(LD)),linker '$(LD)' not found)
# gcc version including patch level # gcc version including patch level
gcc-version := $(shell,$(srctree)/scripts/gcc-version.sh $(CC)) gcc-version := $(shell,$(srctree)/scripts/gcc-version.sh $(CC))
...@@ -23,15 +23,16 @@ warning- := $(empty) ...@@ -23,15 +23,16 @@ warning- := $(empty)
warning-1 := -Wextra -Wunused -Wno-unused-parameter warning-1 := -Wextra -Wunused -Wno-unused-parameter
warning-1 += -Wmissing-declarations warning-1 += -Wmissing-declarations
warning-1 += -Wmissing-format-attribute warning-1 += -Wmissing-format-attribute
warning-1 += $(call cc-option, -Wmissing-prototypes) warning-1 += -Wmissing-prototypes
warning-1 += -Wold-style-definition warning-1 += -Wold-style-definition
warning-1 += $(call cc-option, -Wmissing-include-dirs) warning-1 += -Wmissing-include-dirs
warning-1 += $(call cc-option, -Wunused-but-set-variable) warning-1 += $(call cc-option, -Wunused-but-set-variable)
warning-1 += $(call cc-option, -Wunused-const-variable) warning-1 += $(call cc-option, -Wunused-const-variable)
warning-1 += $(call cc-option, -Wpacked-not-aligned) warning-1 += $(call cc-option, -Wpacked-not-aligned)
warning-1 += $(call cc-option, -Wstringop-truncation) warning-1 += $(call cc-option, -Wstringop-truncation)
warning-1 += $(call cc-disable-warning, missing-field-initializers) # The following turn off the warnings enabled by -Wextra
warning-1 += $(call cc-disable-warning, sign-compare) warning-1 += -Wno-missing-field-initializers
warning-1 += -Wno-sign-compare
warning-2 := -Waggregate-return warning-2 := -Waggregate-return
warning-2 += -Wcast-align warning-2 += -Wcast-align
...@@ -39,8 +40,8 @@ warning-2 += -Wdisabled-optimization ...@@ -39,8 +40,8 @@ warning-2 += -Wdisabled-optimization
warning-2 += -Wnested-externs warning-2 += -Wnested-externs
warning-2 += -Wshadow warning-2 += -Wshadow
warning-2 += $(call cc-option, -Wlogical-op) warning-2 += $(call cc-option, -Wlogical-op)
warning-2 += $(call cc-option, -Wmissing-field-initializers) warning-2 += -Wmissing-field-initializers
warning-2 += $(call cc-option, -Wsign-compare) warning-2 += -Wsign-compare
warning-2 += $(call cc-option, -Wmaybe-uninitialized) warning-2 += $(call cc-option, -Wmaybe-uninitialized)
warning-2 += $(call cc-option, -Wunused-macros) warning-2 += $(call cc-option, -Wunused-macros)
...@@ -66,11 +67,11 @@ KBUILD_CFLAGS += $(warning) ...@@ -66,11 +67,11 @@ KBUILD_CFLAGS += $(warning)
else else
ifdef CONFIG_CC_IS_CLANG ifdef CONFIG_CC_IS_CLANG
KBUILD_CFLAGS += $(call cc-disable-warning, initializer-overrides) KBUILD_CFLAGS += -Wno-initializer-overrides
KBUILD_CFLAGS += $(call cc-disable-warning, unused-value) KBUILD_CFLAGS += -Wno-unused-value
KBUILD_CFLAGS += $(call cc-disable-warning, format) KBUILD_CFLAGS += -Wno-format
KBUILD_CFLAGS += $(call cc-disable-warning, sign-compare) KBUILD_CFLAGS += -Wno-sign-compare
KBUILD_CFLAGS += $(call cc-disable-warning, format-zero-length) KBUILD_CFLAGS += -Wno-format-zero-length
KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized) KBUILD_CFLAGS += -Wno-uninitialized
endif endif
endif endif
...@@ -67,18 +67,16 @@ _hostc_flags = $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ ...@@ -67,18 +67,16 @@ _hostc_flags = $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
_hostcxx_flags = $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ _hostcxx_flags = $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
$(HOSTCXXFLAGS_$(basetarget).o) $(HOSTCXXFLAGS_$(basetarget).o)
__hostc_flags = $(_hostc_flags) # $(objtree)/$(obj) for including generated headers from checkin source files
__hostcxx_flags = $(_hostcxx_flags)
ifeq ($(KBUILD_EXTMOD),) ifeq ($(KBUILD_EXTMOD),)
ifneq ($(srctree),.) ifneq ($(srctree),.)
__hostc_flags = -I$(obj) $(call flags,_hostc_flags) _hostc_flags += -I $(objtree)/$(obj)
__hostcxx_flags = -I$(obj) $(call flags,_hostcxx_flags) _hostcxx_flags += -I $(objtree)/$(obj)
endif endif
endif endif
hostc_flags = -Wp,-MD,$(depfile) $(__hostc_flags) hostc_flags = -Wp,-MD,$(depfile) $(_hostc_flags)
hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags) hostcxx_flags = -Wp,-MD,$(depfile) $(_hostcxx_flags)
##### #####
# Compile programs on the host # Compile programs on the host
......
...@@ -137,36 +137,26 @@ _c_flags += $(if $(patsubst n%,, \ ...@@ -137,36 +137,26 @@ _c_flags += $(if $(patsubst n%,, \
$(CFLAGS_KCOV)) $(CFLAGS_KCOV))
endif endif
__c_flags = $(_c_flags) # $(srctree)/$(src) for including checkin headers from generated source files
__a_flags = $(_a_flags) # $(objtree)/$(obj) for including generated headers from checkin source files
__cpp_flags = $(_cpp_flags)
# If building the kernel in a separate objtree expand all occurrences
# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
ifeq ($(KBUILD_EXTMOD),) ifeq ($(KBUILD_EXTMOD),)
ifneq ($(srctree),.) ifneq ($(srctree),.)
_c_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj)
# -I$(obj) locates generated .h files _a_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj)
# $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files _cpp_flags += -I $(srctree)/$(src) -I $(objtree)/$(obj)
# and locates generated .h files
# FIXME: Replace both with specific CFLAGS* statements in the makefiles
__c_flags = $(if $(obj),$(call addtree,-I$(src)) -I$(obj)) \
$(call flags,_c_flags)
__a_flags = $(call flags,_a_flags)
__cpp_flags = $(call flags,_cpp_flags)
endif endif
endif endif
c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
-include $(srctree)/include/linux/compiler_types.h \ -include $(srctree)/include/linux/compiler_types.h \
$(__c_flags) $(modkern_cflags) \ $(_c_flags) $(modkern_cflags) \
$(basename_flags) $(modname_flags) $(basename_flags) $(modname_flags)
a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
$(__a_flags) $(modkern_aflags) $(_a_flags) $(modkern_aflags)
cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
$(__cpp_flags) $(_cpp_flags)
ld_flags = $(KBUILD_LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) ld_flags = $(KBUILD_LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F))
......
...@@ -9,7 +9,7 @@ dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \ ...@@ -9,7 +9,7 @@ dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o
# Source files need to get at the userspace version of libfdt_env.h to compile # Source files need to get at the userspace version of libfdt_env.h to compile
HOST_EXTRACFLAGS := -I$(src)/libfdt HOST_EXTRACFLAGS := -I $(srctree)/$(src)/libfdt
ifeq ($(wildcard /usr/include/yaml.h),) ifeq ($(wildcard /usr/include/yaml.h),)
ifneq ($(CHECK_DTBS),) ifneq ($(CHECK_DTBS),)
...@@ -23,8 +23,8 @@ HOSTLDLIBS_dtc := -lyaml ...@@ -23,8 +23,8 @@ HOSTLDLIBS_dtc := -lyaml
endif endif
# Generated files need one more search path to include headers in source tree # Generated files need one more search path to include headers in source tree
HOSTCFLAGS_dtc-lexer.lex.o := -I$(src) HOSTCFLAGS_dtc-lexer.lex.o := -I $(srctree)/$(src)
HOSTCFLAGS_dtc-parser.tab.o := -I$(src) HOSTCFLAGS_dtc-parser.tab.o := -I $(srctree)/$(src)
# dependencies on generated files need to be listed explicitly # dependencies on generated files need to be listed explicitly
$(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h
...@@ -31,8 +31,8 @@ $(obj)/parse.tab.h: $(src)/parse.y FORCE ...@@ -31,8 +31,8 @@ $(obj)/parse.tab.h: $(src)/parse.y FORCE
endif endif
# -I needed for generated C source (shipped source) # -I needed for generated C source (shipped source)
HOSTCFLAGS_parse.tab.o := -I$(src) HOSTCFLAGS_parse.tab.o := -I $(srctree)/$(src)
HOSTCFLAGS_lex.lex.o := -I$(src) HOSTCFLAGS_lex.lex.o := -I $(srctree)/$(src)
# dependencies on generated files need to be listed explicitly # dependencies on generated files need to be listed explicitly
$(obj)/lex.lex.o: $(obj)/parse.tab.h $(obj)/lex.lex.o: $(obj)/parse.tab.h
...@@ -76,15 +76,13 @@ savedefconfig: $(obj)/conf ...@@ -76,15 +76,13 @@ savedefconfig: $(obj)/conf
defconfig: $(obj)/conf defconfig: $(obj)/conf
ifeq ($(KBUILD_DEFCONFIG),) ifeq ($(KBUILD_DEFCONFIG),)
$< $(silent) --defconfig $(Kconfig) $< $(silent) --defconfig $(Kconfig)
else else ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),)
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),)
@$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
else else
@$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'" @$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'"
$(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG) $(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG)
endif endif
endif
%_defconfig: $(obj)/conf %_defconfig: $(obj)/conf
$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
...@@ -147,8 +145,8 @@ common-objs := confdata.o expr.o lexer.lex.o parser.tab.o preprocess.o \ ...@@ -147,8 +145,8 @@ common-objs := confdata.o expr.o lexer.lex.o parser.tab.o preprocess.o \
symbol.o symbol.o
$(obj)/lexer.lex.o: $(obj)/parser.tab.h $(obj)/lexer.lex.o: $(obj)/parser.tab.h
HOSTCFLAGS_lexer.lex.o := -I$(src) HOSTCFLAGS_lexer.lex.o := -I $(srctree)/$(src)
HOSTCFLAGS_parser.tab.o := -I$(src) HOSTCFLAGS_parser.tab.o := -I $(srctree)/$(src)
# conf: Used for defconfig, oldconfig and related targets # conf: Used for defconfig, oldconfig and related targets
hostprogs-y += conf hostprogs-y += conf
......
...@@ -867,6 +867,7 @@ int conf_write(const char *name) ...@@ -867,6 +867,7 @@ int conf_write(const char *name)
const char *str; const char *str;
char tmpname[PATH_MAX + 1], oldname[PATH_MAX + 1]; char tmpname[PATH_MAX + 1], oldname[PATH_MAX + 1];
char *env; char *env;
bool need_newline = false;
if (!name) if (!name)
name = conf_get_configname(); name = conf_get_configname();
...@@ -912,12 +913,16 @@ int conf_write(const char *name) ...@@ -912,12 +913,16 @@ int conf_write(const char *name)
"#\n" "#\n"
"# %s\n" "# %s\n"
"#\n", str); "#\n", str);
need_newline = false;
} else if (!(sym->flags & SYMBOL_CHOICE)) { } else if (!(sym->flags & SYMBOL_CHOICE)) {
sym_calc_value(sym); sym_calc_value(sym);
if (!(sym->flags & SYMBOL_WRITE)) if (!(sym->flags & SYMBOL_WRITE))
goto next; goto next;
if (need_newline) {
fprintf(out, "\n");
need_newline = false;
}
sym->flags &= ~SYMBOL_WRITE; sym->flags &= ~SYMBOL_WRITE;
conf_write_symbol(out, sym, &kconfig_printer_cb, NULL); conf_write_symbol(out, sym, &kconfig_printer_cb, NULL);
} }
...@@ -929,6 +934,12 @@ int conf_write(const char *name) ...@@ -929,6 +934,12 @@ int conf_write(const char *name)
if (menu->next) if (menu->next)
menu = menu->next; menu = menu->next;
else while ((menu = menu->parent)) { else while ((menu = menu->parent)) {
if (!menu->sym && menu_is_visible(menu) &&
menu != &rootmenu) {
str = menu_get_prompt(menu);
fprintf(out, "# end of %s\n", str);
need_newline = true;
}
if (menu->next) { if (menu->next) {
menu = menu->next; menu = menu->next;
break; break;
......
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
set -e
# Check uniqueness of module names
check_same_name_modules()
{
for m in $(sed 's:.*/::' modules.order modules.builtin | sort | uniq -d)
do
echo "warning: same basename if the following are built as modules:" >&2
sed "/\/$m/!d;s:^kernel/: :" modules.order modules.builtin >&2
done
}
check_same_name_modules
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment