Commit ff9a7930 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull Kbuild updates from Masahiro Yamada:

 - Avoid 'constexpr', which is a keyword in C23

 - Allow 'dtbs_check' and 'dt_compatible_check' run independently of
   'dt_binding_check'

 - Fix weak references to avoid GOT entries in position-independent code
   generation

 - Convert the last use of 'optional' property in arch/sh/Kconfig

 - Remove support for the 'optional' property in Kconfig

 - Remove support for Clang's ThinLTO caching, which does not work with
   the .incbin directive

 - Change the semantics of $(src) so it always points to the source
   directory, which fixes Makefile inconsistencies between upstream and
   downstream

 - Fix 'make tar-pkg' for RISC-V to produce a consistent package

 - Provide reasonable default coverage for objtool, sanitizers, and
   profilers

 - Remove redundant OBJECT_FILES_NON_STANDARD, KASAN_SANITIZE, etc.

 - Remove the last use of tristate choice in drivers/rapidio/Kconfig

 - Various cleanups and fixes in Kconfig

* tag 'kbuild-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (46 commits)
  kconfig: use sym_get_choice_menu() in sym_check_prop()
  rapidio: remove choice for enumeration
  kconfig: lxdialog: remove initialization with A_NORMAL
  kconfig: m/nconf: merge two item_add_str() calls
  kconfig: m/nconf: remove dead code to display value of bool choice
  kconfig: m/nconf: remove dead code to display children of choice members
  kconfig: gconf: show checkbox for choice correctly
  kbuild: use GCOV_PROFILE and KCSAN_SANITIZE in scripts/Makefile.modfinal
  Makefile: remove redundant tool coverage variables
  kbuild: provide reasonable defaults for tool coverage
  modules: Drop the .export_symbol section from the final modules
  kconfig: use menu_list_for_each_sym() in sym_check_choice_deps()
  kconfig: use sym_get_choice_menu() in conf_write_defconfig()
  kconfig: add sym_get_choice_menu() helper
  kconfig: turn defaults and additional prompt for choice members into error
  kconfig: turn missing prompt for choice members into error
  kconfig: turn conf_choice() into void function
  kconfig: use linked list in sym_set_changed()
  kconfig: gconf: use MENU_CHANGED instead of SYMBOL_CHANGED
  kconfig: gconf: remove debug code
  ...
parents 0cc6f45c 6ffe4fdf
...@@ -80,22 +80,22 @@ loop_cmd = $(echo-cmd) $(cmd_$(1)) || exit; ...@@ -80,22 +80,22 @@ loop_cmd = $(echo-cmd) $(cmd_$(1)) || exit;
# * dest folder relative to $(BUILDDIR) and # * dest folder relative to $(BUILDDIR) and
# * cache folder relative to $(BUILDDIR)/.doctrees # * cache folder relative to $(BUILDDIR)/.doctrees
# $4 dest subfolder e.g. "man" for man pages at userspace-api/media/man # $4 dest subfolder e.g. "man" for man pages at userspace-api/media/man
# $5 reST source folder relative to $(srctree)/$(src), # $5 reST source folder relative to $(src),
# e.g. "userspace-api/media" for the linux-tv book-set at ./Documentation/userspace-api/media # e.g. "userspace-api/media" for the linux-tv book-set at ./Documentation/userspace-api/media
quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/userspace-api/media $2 && \ cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/userspace-api/media $2 && \
PYTHONDONTWRITEBYTECODE=1 \ PYTHONDONTWRITEBYTECODE=1 \
BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \ BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(src)/$5/$(SPHINX_CONF)) \
$(PYTHON3) $(srctree)/scripts/jobserver-exec \ $(PYTHON3) $(srctree)/scripts/jobserver-exec \
$(CONFIG_SHELL) $(srctree)/Documentation/sphinx/parallel-wrapper.sh \ $(CONFIG_SHELL) $(srctree)/Documentation/sphinx/parallel-wrapper.sh \
$(SPHINXBUILD) \ $(SPHINXBUILD) \
-b $2 \ -b $2 \
-c $(abspath $(srctree)/$(src)) \ -c $(abspath $(src)) \
-d $(abspath $(BUILDDIR)/.doctrees/$3) \ -d $(abspath $(BUILDDIR)/.doctrees/$3) \
-D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \ -D version=$(KERNELVERSION) -D release=$(KERNELRELEASE) \
$(ALLSPHINXOPTS) \ $(ALLSPHINXOPTS) \
$(abspath $(srctree)/$(src)/$5) \ $(abspath $(src)/$5) \
$(abspath $(BUILDDIR)/$3/$4) && \ $(abspath $(BUILDDIR)/$3/$4) && \
if [ "x$(DOCS_CSS)" != "x" ]; then \ if [ "x$(DOCS_CSS)" != "x" ]; then \
cp $(if $(patsubst /%,,$(DOCS_CSS)),$(abspath $(srctree)/$(DOCS_CSS)),$(DOCS_CSS)) $(BUILDDIR)/$3/_static/; \ cp $(if $(patsubst /%,,$(DOCS_CSS)),$(abspath $(srctree)/$(DOCS_CSS)),$(DOCS_CSS)) $(BUILDDIR)/$3/_static/; \
......
...@@ -25,23 +25,25 @@ quiet_cmd_extract_ex = DTEX $@ ...@@ -25,23 +25,25 @@ quiet_cmd_extract_ex = DTEX $@
$(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE $(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE
$(call if_changed,extract_ex) $(call if_changed,extract_ex)
find_all_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \ find_all_cmd = find $(src) \( -name '*.yaml' ! \
-name 'processed-schema*' \) -name 'processed-schema*' \)
find_cmd = $(find_all_cmd) | \ find_cmd = $(find_all_cmd) | \
sed 's|^$(srctree)/||' | \ sed 's|^$(srctree)/||' | \
grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | \ grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | \
sed 's|^|$(srctree)/|' sed 's|^|$(srctree)/|'
CHK_DT_DOCS := $(shell $(find_cmd)) CHK_DT_EXAMPLES := $(patsubst $(srctree)/%.yaml,%.example.dtb, $(shell $(find_cmd)))
quiet_cmd_yamllint = LINT $(src) quiet_cmd_yamllint = LINT $(src)
cmd_yamllint = ($(find_cmd) | \ cmd_yamllint = ($(find_cmd) | \
xargs -n200 -P$$(nproc) \ xargs -n200 -P$$(nproc) \
$(DT_SCHEMA_LINT) -f parsable -c $(srctree)/$(src)/.yamllint >&2) || true $(DT_SCHEMA_LINT) -f parsable -c $(src)/.yamllint >&2) \
&& touch $@ || true
quiet_cmd_chk_bindings = CHKDT $@ quiet_cmd_chk_bindings = CHKDT $(src)
cmd_chk_bindings = ($(find_cmd) | \ cmd_chk_bindings = ($(find_cmd) | \
xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(srctree)/$(src)) || true xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(src)) \
&& touch $@ || true
quiet_cmd_mk_schema = SCHEMA $@ quiet_cmd_mk_schema = SCHEMA $@
cmd_mk_schema = f=$$(mktemp) ; \ cmd_mk_schema = f=$$(mktemp) ; \
...@@ -49,12 +51,6 @@ quiet_cmd_mk_schema = SCHEMA $@ ...@@ -49,12 +51,6 @@ quiet_cmd_mk_schema = SCHEMA $@
$(DT_MK_SCHEMA) -j $(DT_MK_SCHEMA_FLAGS) @$$f > $@ ; \ $(DT_MK_SCHEMA) -j $(DT_MK_SCHEMA_FLAGS) @$$f > $@ ; \
rm -f $$f rm -f $$f
define rule_chkdt
$(if $(DT_SCHEMA_LINT),$(call cmd,yamllint),)
$(call cmd,chk_bindings)
$(call cmd,mk_schema)
endef
DT_DOCS = $(patsubst $(srctree)/%,%,$(shell $(find_all_cmd))) DT_DOCS = $(patsubst $(srctree)/%,%,$(shell $(find_all_cmd)))
override DTC_FLAGS := \ override DTC_FLAGS := \
...@@ -64,12 +60,19 @@ override DTC_FLAGS := \ ...@@ -64,12 +60,19 @@ override DTC_FLAGS := \
-Wno-unique_unit_address \ -Wno-unique_unit_address \
-Wunique_unit_address_if_enabled -Wunique_unit_address_if_enabled
$(obj)/processed-schema.json: $(DT_DOCS) $(src)/.yamllint check_dtschema_version FORCE $(obj)/processed-schema.json: $(DT_DOCS) check_dtschema_version FORCE
$(call if_changed_rule,chkdt) $(call if_changed,mk_schema)
targets += .dt-binding.checked .yamllint.checked
$(obj)/.yamllint.checked: $(DT_DOCS) $(src)/.yamllint FORCE
$(if $(DT_SCHEMA_LINT),$(call if_changed,yamllint),)
$(obj)/.dt-binding.checked: $(DT_DOCS) FORCE
$(call if_changed,chk_bindings)
always-y += processed-schema.json always-y += processed-schema.json
always-$(CHECK_DT_BINDING) += $(patsubst $(srctree)/$(src)/%.yaml,%.example.dts, $(CHK_DT_DOCS)) targets += $(patsubst $(obj)/%,%, $(CHK_DT_EXAMPLES))
always-$(CHECK_DT_BINDING) += $(patsubst $(srctree)/$(src)/%.yaml,%.example.dtb, $(CHK_DT_DOCS)) targets += $(patsubst $(obj)/%.dtb,%.dts, $(CHK_DT_EXAMPLES))
# Hack: avoid 'Argument list too long' error for 'make clean'. Remove most of # Hack: avoid 'Argument list too long' error for 'make clean'. Remove most of
# build artifacts here before they are processed by scripts/Makefile.clean # build artifacts here before they are processed by scripts/Makefile.clean
...@@ -78,3 +81,6 @@ clean-files = $(shell find $(obj) \( -name '*.example.dts' -o \ ...@@ -78,3 +81,6 @@ clean-files = $(shell find $(obj) \( -name '*.example.dts' -o \
dt_compatible_check: $(obj)/processed-schema.json dt_compatible_check: $(obj)/processed-schema.json
$(Q)$(srctree)/scripts/dtc/dt-extract-compatibles $(srctree) | xargs dt-check-compatible -v -s $< $(Q)$(srctree)/scripts/dtc/dt-extract-compatibles $(srctree) | xargs dt-check-compatible -v -s $<
PHONY += dt_binding_check
dt_binding_check: $(obj)/.dt-binding.checked $(obj)/.yamllint.checked $(CHK_DT_EXAMPLES)
...@@ -410,9 +410,6 @@ to be set to 'm'. This can be used if multiple drivers for a single ...@@ -410,9 +410,6 @@ to be set to 'm'. This can be used if multiple drivers for a single
hardware exists and only a single driver can be compiled/loaded into hardware exists and only a single driver can be compiled/loaded into
the kernel, but all drivers can be compiled as modules. the kernel, but all drivers can be compiled as modules.
A choice accepts another option "optional", which allows to set the
choice to 'n' and no entry needs to be selected.
comment:: comment::
"comment" <prompt> "comment" <prompt>
......
...@@ -346,7 +346,7 @@ ccflags-y, asflags-y and ldflags-y ...@@ -346,7 +346,7 @@ ccflags-y, asflags-y and ldflags-y
Example:: Example::
#arch/cris/boot/compressed/Makefile #arch/cris/boot/compressed/Makefile
ldflags-y += -T $(srctree)/$(src)/decompress_$(arch-y).lds ldflags-y += -T $(src)/decompress_$(arch-y).lds
subdir-ccflags-y, subdir-asflags-y subdir-ccflags-y, subdir-asflags-y
The two flags listed above are similar to ccflags-y and asflags-y. The two flags listed above are similar to ccflags-y and asflags-y.
...@@ -426,14 +426,14 @@ path to prerequisite files and target files. ...@@ -426,14 +426,14 @@ path to prerequisite files and target files.
Two variables are used when defining custom rules: Two variables are used when defining custom rules:
$(src) $(src)
$(src) is a relative path which points to the directory $(src) is the directory where the Makefile is located. Always use $(src) when
where the Makefile is located. Always use $(src) when
referring to files located in the src tree. referring to files located in the src tree.
$(obj) $(obj)
$(obj) is a relative path which points to the directory $(obj) is the directory where the target is saved. Always use $(obj) when
where the target is saved. Always use $(obj) when referring to generated files. Use $(obj) for pattern rules that need to work
referring to generated files. for both generated files and real sources (VPATH will help to find the
prerequisites not only in the object tree but also in the source tree).
Example:: Example::
......
...@@ -263,7 +263,14 @@ srctree := $(abs_srctree) ...@@ -263,7 +263,14 @@ srctree := $(abs_srctree)
endif endif
objtree := . objtree := .
VPATH :=
ifeq ($(KBUILD_EXTMOD),)
ifdef building_out_of_srctree
VPATH := $(srctree) VPATH := $(srctree)
endif
endif
export building_out_of_srctree srctree objtree VPATH export building_out_of_srctree srctree objtree VPATH
...@@ -942,7 +949,6 @@ endif ...@@ -942,7 +949,6 @@ endif
ifdef CONFIG_LTO_CLANG ifdef CONFIG_LTO_CLANG
ifdef CONFIG_LTO_CLANG_THIN ifdef CONFIG_LTO_CLANG_THIN
CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit
KBUILD_LDFLAGS += --thinlto-cache-dir=$(extmod_prefix).thinlto-cache
else else
CC_FLAGS_LTO := -flto CC_FLAGS_LTO := -flto
endif endif
...@@ -1248,8 +1254,8 @@ define filechk_version.h ...@@ -1248,8 +1254,8 @@ define filechk_version.h
echo \#define LINUX_VERSION_SUBLEVEL $(SUBLEVEL) echo \#define LINUX_VERSION_SUBLEVEL $(SUBLEVEL)
endef endef
$(version_h): PATCHLEVEL := $(or $(PATCHLEVEL), 0) $(version_h): private PATCHLEVEL := $(or $(PATCHLEVEL), 0)
$(version_h): SUBLEVEL := $(or $(SUBLEVEL), 0) $(version_h): private SUBLEVEL := $(or $(SUBLEVEL), 0)
$(version_h): FORCE $(version_h): FORCE
$(call filechk,version.h) $(call filechk,version.h)
...@@ -1403,7 +1409,7 @@ export CHECK_DTBS=y ...@@ -1403,7 +1409,7 @@ export CHECK_DTBS=y
endif endif
ifneq ($(CHECK_DTBS),) ifneq ($(CHECK_DTBS),)
dtbs_prepare: dt_binding_check dtbs_prepare: dt_binding_schemas
endif endif
dtbs_check: dtbs dtbs_check: dtbs
...@@ -1422,15 +1428,18 @@ scripts_dtc: scripts_basic ...@@ -1422,15 +1428,18 @@ scripts_dtc: scripts_basic
$(Q)$(MAKE) $(build)=scripts/dtc $(Q)$(MAKE) $(build)=scripts/dtc
ifneq ($(filter dt_binding_check, $(MAKECMDGOALS)),) ifneq ($(filter dt_binding_check, $(MAKECMDGOALS)),)
export CHECK_DT_BINDING=y export CHECK_DTBS=y
endif endif
PHONY += dt_binding_check PHONY += dt_binding_check dt_binding_schemas
dt_binding_check: scripts_dtc dt_binding_check: dt_binding_schemas scripts_dtc
$(Q)$(MAKE) $(build)=Documentation/devicetree/bindings $@
dt_binding_schemas:
$(Q)$(MAKE) $(build)=Documentation/devicetree/bindings $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings
PHONY += dt_compatible_check PHONY += dt_compatible_check
dt_compatible_check: dt_binding_check dt_compatible_check: dt_binding_schemas
$(Q)$(MAKE) $(build)=Documentation/devicetree/bindings $@ $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings $@
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
...@@ -1477,7 +1486,7 @@ endif # CONFIG_MODULES ...@@ -1477,7 +1486,7 @@ endif # CONFIG_MODULES
# Directories & files removed with 'make clean' # Directories & files removed with 'make clean'
CLEAN_FILES += vmlinux.symvers modules-only.symvers \ CLEAN_FILES += vmlinux.symvers modules-only.symvers \
modules.builtin modules.builtin.modinfo modules.nsdeps \ modules.builtin modules.builtin.modinfo modules.nsdeps \
compile_commands.json .thinlto-cache rust/test \ compile_commands.json rust/test \
rust-project.json .vmlinux.objs .vmlinux.export.c rust-project.json .vmlinux.objs .vmlinux.export.c
# Directories & files removed with 'make mrproper' # Directories & files removed with 'make mrproper'
...@@ -1494,7 +1503,7 @@ MRPROPER_FILES += include/config include/generated \ ...@@ -1494,7 +1503,7 @@ MRPROPER_FILES += include/config include/generated \
# clean - Delete most, but leave enough to build external modules # clean - Delete most, but leave enough to build external modules
# #
clean: rm-files := $(CLEAN_FILES) clean: private rm-files := $(CLEAN_FILES)
PHONY += archclean vmlinuxclean PHONY += archclean vmlinuxclean
...@@ -1506,7 +1515,7 @@ clean: archclean vmlinuxclean resolve_btfids_clean ...@@ -1506,7 +1515,7 @@ clean: archclean vmlinuxclean resolve_btfids_clean
# mrproper - Delete all generated files, including .config # mrproper - Delete all generated files, including .config
# #
mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) mrproper: private rm-files := $(MRPROPER_FILES)
mrproper-dirs := $(addprefix _mrproper_,scripts) mrproper-dirs := $(addprefix _mrproper_,scripts)
PHONY += $(mrproper-dirs) mrproper PHONY += $(mrproper-dirs) mrproper
...@@ -1626,10 +1635,11 @@ help: ...@@ -1626,10 +1635,11 @@ help:
@echo '' @echo ''
@$(if $(dtstree), \ @$(if $(dtstree), \
echo 'Devicetree:'; \ echo 'Devicetree:'; \
echo '* dtbs - Build device tree blobs for enabled boards'; \ echo '* dtbs - Build device tree blobs for enabled boards'; \
echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \ echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \
echo ' dt_binding_check - Validate device tree binding documents'; \ echo ' dt_binding_check - Validate device tree binding documents and examples'; \
echo ' dtbs_check - Validate device tree source files';\ echo ' dt_binding_schema - Build processed device tree binding schemas'; \
echo ' dtbs_check - Validate device tree source files';\
echo '') echo '')
@echo 'Userspace tools targets:' @echo 'Userspace tools targets:'
...@@ -1782,8 +1792,8 @@ compile_commands.json: $(extmod_prefix)compile_commands.json ...@@ -1782,8 +1792,8 @@ compile_commands.json: $(extmod_prefix)compile_commands.json
PHONY += compile_commands.json PHONY += compile_commands.json
clean-dirs := $(KBUILD_EXTMOD) clean-dirs := $(KBUILD_EXTMOD)
clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers $(KBUILD_EXTMOD)/modules.nsdeps \ clean: private rm-files := $(KBUILD_EXTMOD)/Module.symvers $(KBUILD_EXTMOD)/modules.nsdeps \
$(KBUILD_EXTMOD)/compile_commands.json $(KBUILD_EXTMOD)/.thinlto-cache $(KBUILD_EXTMOD)/compile_commands.json
PHONY += prepare PHONY += prepare
# now expand this into a simple variable to reduce the cost of shell evaluations # now expand this into a simple variable to reduce the cost of shell evaluations
......
...@@ -10,8 +10,7 @@ obj-y += $(builtindtb-y).dtb.o ...@@ -10,8 +10,7 @@ obj-y += $(builtindtb-y).dtb.o
dtb-y := $(builtindtb-y).dtb dtb-y := $(builtindtb-y).dtb
# for CONFIG_OF_ALL_DTBS test # for CONFIG_OF_ALL_DTBS test
dtstree := $(srctree)/$(src) dtb- := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
dtb- := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
# board-specific dtc flags # board-specific dtc flags
DTC_FLAGS_hsdk += --pad 20 DTC_FLAGS_hsdk += --pad 20
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_FPE_NWFPE) += nwfpe/ obj-$(CONFIG_FPE_NWFPE) += nwfpe/
# Put arch/arm/fastfpe/ to use this. # Put arch/arm/fastfpe/ to use this.
obj-$(CONFIG_FPE_FASTFPE) += $(patsubst $(srctree)/$(src)/%,%,$(wildcard $(srctree)/$(src)/fastfpe/)) obj-$(CONFIG_FPE_FASTFPE) += $(patsubst $(src)/%,%,$(wildcard $(src)/fastfpe/))
obj-$(CONFIG_VFP) += vfp/ obj-$(CONFIG_VFP) += vfp/
obj-$(CONFIG_XEN) += xen/ obj-$(CONFIG_XEN) += xen/
obj-$(CONFIG_VDSO) += vdso/ obj-$(CONFIG_VDSO) += vdso/
......
...@@ -25,8 +25,7 @@ targets := Image zImage xipImage bootpImage uImage ...@@ -25,8 +25,7 @@ targets := Image zImage xipImage bootpImage uImage
ifeq ($(CONFIG_XIP_KERNEL),y) ifeq ($(CONFIG_XIP_KERNEL),y)
cmd_deflate_xip_data = $(CONFIG_SHELL) -c \ cmd_deflate_xip_data = $(CONFIG_SHELL) -c '$(src)/deflate_xip_data.sh $< $@'
'$(srctree)/$(src)/deflate_xip_data.sh $< $@'
ifeq ($(CONFIG_XIP_DEFLATED_DATA),y) ifeq ($(CONFIG_XIP_DEFLATED_DATA),y)
quiet_cmd_mkxip = XIPZ $@ quiet_cmd_mkxip = XIPZ $@
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
# This file is included by the global makefile so that you can add your own # This file is included by the global makefile so that you can add your own
# architecture-specific flags and dependencies. # architecture-specific flags and dependencies.
# #
GCOV_PROFILE := n
ifdef PHYS_OFFSET ifdef PHYS_OFFSET
add_hex = $(shell printf 0x%x $$(( $(1) + $(2) )) ) add_hex = $(shell printf 0x%x $$(( $(1) + $(2) )) )
......
...@@ -22,13 +22,6 @@ ifeq ($(CONFIG_ARM_VIRT_EXT),y) ...@@ -22,13 +22,6 @@ ifeq ($(CONFIG_ARM_VIRT_EXT),y)
OBJS += hyp-stub.o OBJS += hyp-stub.o
endif endif
GCOV_PROFILE := n
KASAN_SANITIZE := n
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
KCOV_INSTRUMENT := n
UBSAN_SANITIZE := n
# #
# Architecture dependencies # Architecture dependencies
# #
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Copyright 2009 Simtec Electronics # Copyright 2009 Simtec Electronics
include $(srctree)/$(src)/Makefile.s3c64xx include $(src)/Makefile.s3c64xx
# Objects we always build independent of SoC choice # Objects we always build independent of SoC choice
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Makefile for the linux kernel. # Makefile for the linux kernel.
# #
ccflags-y := -I$(srctree)/$(src)/include ccflags-y := -I$(src)/include
orion-gpio-$(CONFIG_GPIOLIB) += gpio.o orion-gpio-$(CONFIG_GPIOLIB) += gpio.o
obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o
......
...@@ -9,7 +9,7 @@ gen := arch/$(ARCH)/include/generated ...@@ -9,7 +9,7 @@ gen := arch/$(ARCH)/include/generated
kapi := $(gen)/asm kapi := $(gen)/asm
uapi := $(gen)/uapi/asm uapi := $(gen)/uapi/asm
syshdr := $(srctree)/scripts/syscallhdr.sh syshdr := $(srctree)/scripts/syscallhdr.sh
sysnr := $(srctree)/$(src)/syscallnr.sh sysnr := $(src)/syscallnr.sh
systbl := $(srctree)/scripts/syscalltbl.sh systbl := $(srctree)/scripts/syscalltbl.sh
syscall := $(src)/syscall.tbl syscall := $(src)/syscall.tbl
......
...@@ -33,15 +33,6 @@ else ...@@ -33,15 +33,6 @@ else
CFLAGS_vgettimeofday.o = -O2 -include $(c-gettimeofday-y) CFLAGS_vgettimeofday.o = -O2 -include $(c-gettimeofday-y)
endif endif
# Disable gcov profiling for VDSO code
GCOV_PROFILE := n
UBSAN_SANITIZE := n
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
KCOV_INSTRUMENT := n
KASAN_SANITIZE := n
# Force dependency # Force dependency
$(obj)/vdso.o : $(obj)/vdso.so $(obj)/vdso.o : $(obj)/vdso.so
......
...@@ -19,12 +19,6 @@ KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS)) ...@@ -19,12 +19,6 @@ KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS))
# disable LTO # disable LTO
KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS)) KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS))
GCOV_PROFILE := n
KASAN_SANITIZE := n
KCSAN_SANITIZE := n
UBSAN_SANITIZE := n
KCOV_INSTRUMENT := n
hostprogs := relacheck hostprogs := relacheck
quiet_cmd_piobjcopy = $(quiet_cmd_objcopy) quiet_cmd_piobjcopy = $(quiet_cmd_objcopy)
......
...@@ -40,11 +40,6 @@ CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) \ ...@@ -40,11 +40,6 @@ CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) \
$(RANDSTRUCT_CFLAGS) $(GCC_PLUGINS_CFLAGS) \ $(RANDSTRUCT_CFLAGS) $(GCC_PLUGINS_CFLAGS) \
$(CC_FLAGS_LTO) $(CC_FLAGS_CFI) \ $(CC_FLAGS_LTO) $(CC_FLAGS_CFI) \
-Wmissing-prototypes -Wmissing-declarations -Wmissing-prototypes -Wmissing-declarations
KASAN_SANITIZE := n
KCSAN_SANITIZE := n
UBSAN_SANITIZE := n
OBJECT_FILES_NON_STANDARD := y
KCOV_INSTRUMENT := n
CFLAGS_vgettimeofday.o = -O2 -mcmodel=tiny -fasynchronous-unwind-tables CFLAGS_vgettimeofday.o = -O2 -mcmodel=tiny -fasynchronous-unwind-tables
...@@ -52,9 +47,6 @@ ifneq ($(c-gettimeofday-y),) ...@@ -52,9 +47,6 @@ ifneq ($(c-gettimeofday-y),)
CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y) CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
endif endif
# Disable gcov profiling for VDSO code
GCOV_PROFILE := n
targets += vdso.lds targets += vdso.lds
CPPFLAGS_vdso.lds += -P -C -U$(ARCH) CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
...@@ -68,7 +60,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE ...@@ -68,7 +60,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
# Generate VDSO offsets using helper script # Generate VDSO offsets using helper script
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh gen-vdsosym := $(src)/gen_vdso_offsets.sh
quiet_cmd_vdsosym = VDSOSYM $@ quiet_cmd_vdsosym = VDSOSYM $@
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
......
...@@ -136,7 +136,7 @@ $(obj)/vdso32.so.dbg: $(obj)/vdso.so.raw $(obj)/$(munge) FORCE ...@@ -136,7 +136,7 @@ $(obj)/vdso32.so.dbg: $(obj)/vdso.so.raw $(obj)/$(munge) FORCE
$(call if_changed,vdsomunge) $(call if_changed,vdsomunge)
# Link rule for the .so file, .lds has to be first # Link rule for the .so file, .lds has to be first
$(obj)/vdso.so.raw: $(src)/vdso.lds $(obj-vdso) FORCE $(obj)/vdso.so.raw: $(obj)/vdso.lds $(obj-vdso) FORCE
$(call if_changed,vdsold_and_vdso_check) $(call if_changed,vdsold_and_vdso_check)
# Compilation rules for the vDSO sources # Compilation rules for the vDSO sources
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Makefile for Kernel-based Virtual Machine module # Makefile for Kernel-based Virtual Machine module
# #
ccflags-y += -I $(srctree)/$(src) ccflags-y += -I $(src)
include $(srctree)/virt/kvm/Makefile.kvm include $(srctree)/virt/kvm/Makefile.kvm
...@@ -31,7 +31,7 @@ define rule_gen_hyp_constants ...@@ -31,7 +31,7 @@ define rule_gen_hyp_constants
$(call filechk,offsets,__HYP_CONSTANTS_H__) $(call filechk,offsets,__HYP_CONSTANTS_H__)
endef endef
CFLAGS_hyp-constants.o = -I $(srctree)/$(src)/hyp/include CFLAGS_hyp-constants.o = -I $(src)/hyp/include
$(obj)/hyp-constants.s: $(src)/hyp/hyp-constants.c FORCE $(obj)/hyp-constants.s: $(src)/hyp/hyp-constants.c FORCE
$(call if_changed_dep,cc_s_c) $(call if_changed_dep,cc_s_c)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Makefile for Kernel-based Virtual Machine module, HYP part # Makefile for Kernel-based Virtual Machine module, HYP part
# #
incdir := $(srctree)/$(src)/include incdir := $(src)/include
subdir-asflags-y := -I$(incdir) subdir-asflags-y := -I$(incdir)
subdir-ccflags-y := -I$(incdir) subdir-ccflags-y := -I$(incdir)
......
...@@ -97,16 +97,3 @@ KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS) $(CC_FLAGS_CFI) ...@@ -97,16 +97,3 @@ KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS) $(CC_FLAGS_CFI)
# causes a build failure. Remove profile optimization flags. # causes a build failure. Remove profile optimization flags.
KBUILD_CFLAGS := $(filter-out -fprofile-sample-use=% -fprofile-use=%, $(KBUILD_CFLAGS)) KBUILD_CFLAGS := $(filter-out -fprofile-sample-use=% -fprofile-use=%, $(KBUILD_CFLAGS))
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables
# KVM nVHE code is run at a different exception code with a different map, so
# compiler instrumentation that inserts callbacks or checks into the code may
# cause crashes. Just disable it.
GCOV_PROFILE := n
KASAN_SANITIZE := n
KCSAN_SANITIZE := n
UBSAN_SANITIZE := n
KCOV_INSTRUMENT := n
# Skip objtool checking for this directory because nVHE code is compiled with
# non-standard build rules.
OBJECT_FILES_NON_STANDARD := y
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
dtstree := $(srctree)/$(src) dtb-y := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
dtb-y := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
...@@ -23,15 +23,11 @@ obj-vdso := $(addprefix $(obj)/, $(obj-vdso)) ...@@ -23,15 +23,11 @@ obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
obj-y += vdso.o vdso-syms.o obj-y += vdso.o vdso-syms.o
CPPFLAGS_vdso.lds += -P -C -U$(ARCH) CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
# Disable gcov profiling for VDSO code
GCOV_PROFILE := n
KCOV_INSTRUMENT := n
# Force dependency # Force dependency
$(obj)/vdso.o: $(obj)/vdso.so $(obj)/vdso.o: $(obj)/vdso.so
SYSCFLAGS_vdso.so.dbg = $(c_flags) SYSCFLAGS_vdso.so.dbg = $(c_flags)
$(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE $(obj)/vdso.so.dbg: $(obj)/vdso.lds $(obj-vdso) FORCE
$(call if_changed,vdsold) $(call if_changed,vdsold)
SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \ SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
-Wl,--build-id=sha1 -Wl,--hash-style=both -Wl,--build-id=sha1 -Wl,--hash-style=both
...@@ -57,4 +53,4 @@ quiet_cmd_vdsold = VDSOLD $@ ...@@ -57,4 +53,4 @@ quiet_cmd_vdsold = VDSOLD $@
# Extracts symbol offsets from the VDSO, converting them into an assembly file # Extracts symbol offsets from the VDSO, converting them into an assembly file
# that contains the same symbols at the same offsets. # that contains the same symbols at the same offsets.
quiet_cmd_so2s = SO2S $@ quiet_cmd_so2s = SO2S $@
cmd_so2s = $(NM) -D $< | $(srctree)/$(src)/so2s.sh > $@ cmd_so2s = $(NM) -D $< | $(src)/so2s.sh > $@
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Makefile for LoongArch KVM support # Makefile for LoongArch KVM support
# #
ccflags-y += -I $(srctree)/$(src) ccflags-y += -I $(src)
include $(srctree)/virt/kvm/Makefile.kvm include $(srctree)/virt/kvm/Makefile.kvm
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
# Objects to go into the VDSO. # Objects to go into the VDSO.
KASAN_SANITIZE := n
UBSAN_SANITIZE := n
KCOV_INSTRUMENT := n
OBJECT_FILES_NON_STANDARD := y
# Include the generic Makefile to check the built vdso. # Include the generic Makefile to check the built vdso.
include $(srctree)/lib/vdso/Makefile include $(srctree)/lib/vdso/Makefile
...@@ -39,8 +34,6 @@ ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \ ...@@ -39,8 +34,6 @@ ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \
$(filter -E%,$(KBUILD_CFLAGS)) -nostdlib -shared \ $(filter -E%,$(KBUILD_CFLAGS)) -nostdlib -shared \
--hash-style=sysv --build-id -T --hash-style=sysv --build-id -T
GCOV_PROFILE := n
# #
# Shared build commands. # Shared build commands.
# #
...@@ -52,7 +45,7 @@ quiet_cmd_vdsoas_o_S = AS $@ ...@@ -52,7 +45,7 @@ quiet_cmd_vdsoas_o_S = AS $@
cmd_vdsoas_o_S = $(CC) $(a_flags) -c -o $@ $< cmd_vdsoas_o_S = $(CC) $(a_flags) -c -o $@ $<
# Generate VDSO offsets using helper script # Generate VDSO offsets using helper script
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh gen-vdsosym := $(src)/gen_vdso_offsets.sh
quiet_cmd_vdsosym = VDSOSYM $@ quiet_cmd_vdsosym = VDSOSYM $@
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
......
...@@ -34,12 +34,6 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ ...@@ -34,12 +34,6 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \ -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \
-DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS) -DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS)
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
KCOV_INSTRUMENT := n
GCOV_PROFILE := n
UBSAN_SANITIZE := n
KCSAN_SANITIZE := n
# decompressor objects (linked with vmlinuz) # decompressor objects (linked with vmlinuz)
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o
......
...@@ -5,7 +5,7 @@ uapi := arch/$(SRCARCH)/include/generated/uapi/asm ...@@ -5,7 +5,7 @@ uapi := arch/$(SRCARCH)/include/generated/uapi/asm
$(shell mkdir -p $(uapi) $(kapi)) $(shell mkdir -p $(uapi) $(kapi))
syshdr := $(srctree)/scripts/syscallhdr.sh syshdr := $(srctree)/scripts/syscallhdr.sh
sysnr := $(srctree)/$(src)/syscallnr.sh sysnr := $(src)/syscallnr.sh
systbl := $(srctree)/scripts/syscalltbl.sh systbl := $(srctree)/scripts/syscalltbl.sh
quiet_cmd_syshdr = SYSHDR $@ quiet_cmd_syshdr = SYSHDR $@
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
# Objects to go into the VDSO. # Objects to go into the VDSO.
# Sanitizer runtimes are unavailable and cannot be linked here.
KCSAN_SANITIZE := n
# Include the generic Makefile to check the built vdso. # Include the generic Makefile to check the built vdso.
include $(srctree)/lib/vdso/Makefile include $(srctree)/lib/vdso/Makefile
...@@ -43,8 +40,8 @@ CFLAGS_vgettimeofday.o = -include $(c-gettimeofday-y) ...@@ -43,8 +40,8 @@ CFLAGS_vgettimeofday.o = -include $(c-gettimeofday-y)
# config-n32-o32-env.c prepares the environment to build a 32bit vDSO # config-n32-o32-env.c prepares the environment to build a 32bit vDSO
# library on a 64bit kernel. # library on a 64bit kernel.
# Note: Needs to be included before than the generic library. # Note: Needs to be included before than the generic library.
CFLAGS_vgettimeofday-o32.o = -include $(srctree)/$(src)/config-n32-o32-env.c -include $(c-gettimeofday-y) CFLAGS_vgettimeofday-o32.o = -include $(src)/config-n32-o32-env.c -include $(c-gettimeofday-y)
CFLAGS_vgettimeofday-n32.o = -include $(srctree)/$(src)/config-n32-o32-env.c -include $(c-gettimeofday-y) CFLAGS_vgettimeofday-n32.o = -include $(src)/config-n32-o32-env.c -include $(c-gettimeofday-y)
endif endif
CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE)
...@@ -60,10 +57,6 @@ ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \ ...@@ -60,10 +57,6 @@ ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \
CFLAGS_REMOVE_vdso.o = $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_vdso.o = $(CC_FLAGS_FTRACE)
GCOV_PROFILE := n
UBSAN_SANITIZE := n
KCOV_INSTRUMENT := n
# Check that we don't have PIC 'jalr t9' calls left # Check that we don't have PIC 'jalr t9' calls left
quiet_cmd_vdso_mips_check = VDSOCHK $@ quiet_cmd_vdso_mips_check = VDSOCHK $@
cmd_vdso_mips_check = if $(OBJDUMP) --disassemble $@ | grep -E -h "jalr.*t9" > /dev/null; \ cmd_vdso_mips_check = if $(OBJDUMP) --disassemble $@ | grep -E -h "jalr.*t9" > /dev/null; \
......
...@@ -2,5 +2,4 @@ ...@@ -2,5 +2,4 @@
obj-y := $(patsubst %.dts,%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE)) obj-y := $(patsubst %.dts,%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE))
dtstree := $(srctree)/$(src) dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
...@@ -5,10 +5,6 @@ ...@@ -5,10 +5,6 @@
# create a compressed self-extracting vmlinux image from the original vmlinux # create a compressed self-extracting vmlinux image from the original vmlinux
# #
KCOV_INSTRUMENT := n
GCOV_PROFILE := n
UBSAN_SANITIZE := n
OBJECTS := head.o real2.o firmware.o misc.o piggy.o OBJECTS := head.o real2.o firmware.o misc.o piggy.o
targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4 targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4
......
...@@ -26,26 +26,21 @@ $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so FORCE ...@@ -26,26 +26,21 @@ $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so FORCE
# Force dependency (incbin is bad) # Force dependency (incbin is bad)
# link rule for the .so file, .lds has to be first # link rule for the .so file, .lds has to be first
$(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32) $(obj-cvdso32) $(VDSO_LIBGCC) FORCE $(obj)/vdso32.so: $(obj)/vdso32.lds $(obj-vdso32) $(VDSO_LIBGCC) FORCE
$(call if_changed,vdso32ld) $(call if_changed,vdso32ld)
# assembly rules for the .S files # assembly rules for the .S files
$(obj-vdso32): %.o: %.S FORCE $(obj-vdso32): %.o: %.S FORCE
$(call if_changed_dep,vdso32as) $(call if_changed_dep,vdso32as)
$(obj-cvdso32): %.o: %.c FORCE
$(call if_changed_dep,vdso32cc)
# actual build commands # actual build commands
quiet_cmd_vdso32ld = VDSO32L $@ quiet_cmd_vdso32ld = VDSO32L $@
cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $(filter-out FORCE, $^) -o $@ cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $(filter-out FORCE, $^) -o $@
quiet_cmd_vdso32as = VDSO32A $@ quiet_cmd_vdso32as = VDSO32A $@
cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $<
quiet_cmd_vdso32cc = VDSO32C $@
cmd_vdso32cc = $(CROSS32CC) $(c_flags) -c -fPIC -mno-fast-indirect-calls -o $@ $<
# Generate VDSO offsets using helper script # Generate VDSO offsets using helper script
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh gen-vdsosym := $(src)/gen_vdso_offsets.sh
quiet_cmd_vdsosym = VDSOSYM $@ quiet_cmd_vdsosym = VDSOSYM $@
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
......
...@@ -26,7 +26,7 @@ $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so FORCE ...@@ -26,7 +26,7 @@ $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so FORCE
# Force dependency (incbin is bad) # Force dependency (incbin is bad)
# link rule for the .so file, .lds has to be first # link rule for the .so file, .lds has to be first
$(obj)/vdso64.so: $(src)/vdso64.lds $(obj-vdso64) $(VDSO_LIBGCC) FORCE $(obj)/vdso64.so: $(obj)/vdso64.lds $(obj-vdso64) $(VDSO_LIBGCC) FORCE
$(call if_changed,vdso64ld) $(call if_changed,vdso64ld)
# assembly rules for the .S files # assembly rules for the .S files
...@@ -40,7 +40,7 @@ quiet_cmd_vdso64as = VDSO64A $@ ...@@ -40,7 +40,7 @@ quiet_cmd_vdso64as = VDSO64A $@
cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $<
# Generate VDSO offsets using helper script # Generate VDSO offsets using helper script
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh gen-vdsosym := $(src)/gen_vdso_offsets.sh
quiet_cmd_vdsosym = VDSOSYM $@ quiet_cmd_vdsosym = VDSOSYM $@
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
......
...@@ -218,7 +218,7 @@ $(addprefix $(obj)/,$(libfdt) $(libfdtheader)): $(obj)/%: $(srctree)/scripts/dtc ...@@ -218,7 +218,7 @@ $(addprefix $(obj)/,$(libfdt) $(libfdtheader)): $(obj)/%: $(srctree)/scripts/dtc
$(obj)/empty.c: $(obj)/empty.c:
$(Q)touch $@ $(Q)touch $@
$(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds : $(obj)/%: $(srctree)/$(src)/%.S $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds : $(obj)/%: $(src)/%.S
$(Q)cp $< $@ $(Q)cp $< $@
clean-files := $(zlib-) $(zlibheader-) $(zliblinuxheader-) \ clean-files := $(zlib-) $(zlibheader-) $(zliblinuxheader-) \
...@@ -252,9 +252,9 @@ targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) zImage.lds ...@@ -252,9 +252,9 @@ targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) zImage.lds
extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
dtstree := $(srctree)/$(src)/dts dtstree := $(src)/dts
wrapper :=$(srctree)/$(src)/wrapper wrapper := $(src)/wrapper
wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \ wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
$(wrapper) FORCE $(wrapper) FORCE
......
...@@ -2,5 +2,4 @@ ...@@ -2,5 +2,4 @@
subdir-y += fsl subdir-y += fsl
dtstree := $(srctree)/$(src) dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
dtstree := $(srctree)/$(src) dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
...@@ -47,12 +47,6 @@ obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) ...@@ -47,12 +47,6 @@ obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32))
targets += $(obj-vdso64) vdso64.so.dbg vgettimeofday-64.o targets += $(obj-vdso64) vdso64.so.dbg vgettimeofday-64.o
obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64))
GCOV_PROFILE := n
KCOV_INSTRUMENT := n
UBSAN_SANITIZE := n
KASAN_SANITIZE := n
KCSAN_SANITIZE := n
ccflags-y := -fno-common -fno-builtin ccflags-y := -fno-common -fno-builtin
ldflags-y := -Wl,--hash-style=both -nostdlib -shared -z noexecstack $(CLANG_FLAGS) ldflags-y := -Wl,--hash-style=both -nostdlib -shared -z noexecstack $(CLANG_FLAGS)
ldflags-$(CONFIG_LD_IS_LLD) += $(call cc-option,--ld-path=$(LD),-fuse-ld=lld) ldflags-$(CONFIG_LD_IS_LLD) += $(call cc-option,--ld-path=$(LD),-fuse-ld=lld)
...@@ -74,9 +68,9 @@ targets += vdso64.lds ...@@ -74,9 +68,9 @@ targets += vdso64.lds
CPPFLAGS_vdso64.lds += -P -C CPPFLAGS_vdso64.lds += -P -C
# link rule for the .so file, .lds has to be first # link rule for the .so file, .lds has to be first
$(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) $(obj)/vgettimeofday-32.o FORCE $(obj)/vdso32.so.dbg: $(obj)/vdso32.lds $(obj-vdso32) $(obj)/vgettimeofday-32.o FORCE
$(call if_changed,vdso32ld_and_check) $(call if_changed,vdso32ld_and_check)
$(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) $(obj)/vgettimeofday-64.o FORCE $(obj)/vdso64.so.dbg: $(obj)/vdso64.lds $(obj-vdso64) $(obj)/vgettimeofday-64.o FORCE
$(call if_changed,vdso64ld_and_check) $(call if_changed,vdso64ld_and_check)
# assembly rules for the .S files # assembly rules for the .S files
...@@ -90,10 +84,10 @@ $(obj)/vgettimeofday-64.o: %-64.o: %.c FORCE ...@@ -90,10 +84,10 @@ $(obj)/vgettimeofday-64.o: %-64.o: %.c FORCE
$(call if_changed_dep,cc_o_c) $(call if_changed_dep,cc_o_c)
# Generate VDSO offsets using helper script # Generate VDSO offsets using helper script
gen-vdso32sym := $(srctree)/$(src)/gen_vdso32_offsets.sh gen-vdso32sym := $(src)/gen_vdso32_offsets.sh
quiet_cmd_vdso32sym = VDSO32SYM $@ quiet_cmd_vdso32sym = VDSO32SYM $@
cmd_vdso32sym = $(NM) $< | $(gen-vdso32sym) | LC_ALL=C sort > $@ cmd_vdso32sym = $(NM) $< | $(gen-vdso32sym) | LC_ALL=C sort > $@
gen-vdso64sym := $(srctree)/$(src)/gen_vdso64_offsets.sh gen-vdso64sym := $(src)/gen_vdso64_offsets.sh
quiet_cmd_vdso64sym = VDSO64SYM $@ quiet_cmd_vdso64sym = VDSO64SYM $@
cmd_vdso64sym = $(NM) $< | $(gen-vdso64sym) | LC_ALL=C sort > $@ cmd_vdso64sym = $(NM) $< | $(gen-vdso64sym) | LC_ALL=C sort > $@
...@@ -114,5 +108,3 @@ quiet_cmd_vdso64ld_and_check = VDSO64L $@ ...@@ -114,5 +108,3 @@ quiet_cmd_vdso64ld_and_check = VDSO64L $@
cmd_vdso64ld_and_check = $(VDSOCC) $(ldflags-y) $(LD64FLAGS) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^); $(cmd_vdso_check) cmd_vdso64ld_and_check = $(VDSOCC) $(ldflags-y) $(LD64FLAGS) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^); $(cmd_vdso_check)
quiet_cmd_vdso64as = VDSO64A $@ quiet_cmd_vdso64as = VDSO64A $@
cmd_vdso64as = $(VDSOCC) $(a_flags) $(AS64FLAGS) -c -o $@ $< cmd_vdso64as = $(VDSOCC) $(a_flags) $(AS64FLAGS) -c -o $@ $<
OBJECT_FILES_NON_STANDARD := y
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
KASAN_SANITIZE := n
KCSAN_SANITIZE := n
targets += trampoline_$(BITS).o purgatory.ro targets += trampoline_$(BITS).o purgatory.ro
# When profile-guided optimization is enabled, llvm emits two different # When profile-guided optimization is enabled, llvm emits two different
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
# Based on the ia64 and arm64 boot/Makefile. # Based on the ia64 and arm64 boot/Makefile.
# #
KCOV_INSTRUMENT := n
OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
OBJCOPYFLAGS_loader.bin :=-O binary OBJCOPYFLAGS_loader.bin :=-O binary
OBJCOPYFLAGS_xipImage :=-O binary -R .note -R .note.gnu.build-id -R .comment -S OBJCOPYFLAGS_xipImage :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
......
...@@ -34,12 +34,6 @@ obj-compat_vdso := $(addprefix $(obj)/, $(obj-compat_vdso)) ...@@ -34,12 +34,6 @@ obj-compat_vdso := $(addprefix $(obj)/, $(obj-compat_vdso))
obj-y += compat_vdso.o obj-y += compat_vdso.o
CPPFLAGS_compat_vdso.lds += -P -C -DCOMPAT_VDSO -U$(ARCH) CPPFLAGS_compat_vdso.lds += -P -C -DCOMPAT_VDSO -U$(ARCH)
# Disable profiling and instrumentation for VDSO code
GCOV_PROFILE := n
KCOV_INSTRUMENT := n
KASAN_SANITIZE := n
UBSAN_SANITIZE := n
# Force dependency # Force dependency
$(obj)/compat_vdso.o: $(obj)/compat_vdso.so $(obj)/compat_vdso.o: $(obj)/compat_vdso.so
...@@ -58,7 +52,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE ...@@ -58,7 +52,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
# Generate VDSO offsets using helper script # Generate VDSO offsets using helper script
gen-compat_vdsosym := $(srctree)/$(src)/gen_compat_vdso_offsets.sh gen-compat_vdsosym := $(src)/gen_compat_vdso_offsets.sh
quiet_cmd_compat_vdsosym = VDSOSYM $@ quiet_cmd_compat_vdsosym = VDSOSYM $@
cmd_compat_vdsosym = $(NM) $< | $(gen-compat_vdsosym) | LC_ALL=C sort > $@ cmd_compat_vdsosym = $(NM) $< | $(gen-compat_vdsosym) | LC_ALL=C sort > $@
......
...@@ -17,12 +17,6 @@ KBUILD_CFLAGS += -mcmodel=medany ...@@ -17,12 +17,6 @@ KBUILD_CFLAGS += -mcmodel=medany
CFLAGS_cmdline_early.o += -D__NO_FORTIFY CFLAGS_cmdline_early.o += -D__NO_FORTIFY
CFLAGS_lib-fdt_ro.o += -D__NO_FORTIFY CFLAGS_lib-fdt_ro.o += -D__NO_FORTIFY
GCOV_PROFILE := n
KASAN_SANITIZE := n
KCSAN_SANITIZE := n
UBSAN_SANITIZE := n
KCOV_INSTRUMENT := n
$(obj)/%.pi.o: OBJCOPYFLAGS := --prefix-symbols=__pi_ \ $(obj)/%.pi.o: OBJCOPYFLAGS := --prefix-symbols=__pi_ \
--remove-section=.note.gnu.property \ --remove-section=.note.gnu.property \
--prefix-alloc-sections=.init.pi --prefix-alloc-sections=.init.pi
......
...@@ -39,12 +39,6 @@ endif ...@@ -39,12 +39,6 @@ endif
CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS) CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS)
CFLAGS_REMOVE_hwprobe.o = $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS) CFLAGS_REMOVE_hwprobe.o = $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS)
# Disable profiling and instrumentation for VDSO code
GCOV_PROFILE := n
KCOV_INSTRUMENT := n
KASAN_SANITIZE := n
UBSAN_SANITIZE := n
# Force dependency # Force dependency
$(obj)/vdso.o: $(obj)/vdso.so $(obj)/vdso.o: $(obj)/vdso.so
...@@ -60,7 +54,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE ...@@ -60,7 +54,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
# Generate VDSO offsets using helper script # Generate VDSO offsets using helper script
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh gen-vdsosym := $(src)/gen_vdso_offsets.sh
quiet_cmd_vdsosym = VDSOSYM $@ quiet_cmd_vdsosym = VDSOSYM $@
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Makefile for RISC-V KVM support # Makefile for RISC-V KVM support
# #
ccflags-y += -I $(srctree)/$(src) ccflags-y += -I $(src)
include $(srctree)/virt/kvm/Makefile.kvm include $(srctree)/virt/kvm/Makefile.kvm
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
OBJECT_FILES_NON_STANDARD := y
purgatory-y := purgatory.o sha256.o entry.o string.o ctype.o memcpy.o memset.o purgatory-y := purgatory.o sha256.o entry.o string.o ctype.o memcpy.o memset.o
purgatory-y += strcmp.o strlen.o strncmp.o purgatory-y += strcmp.o strlen.o strncmp.o
...@@ -47,13 +46,6 @@ LDFLAGS_purgatory.ro := -r $(PURGATORY_LDFLAGS) ...@@ -47,13 +46,6 @@ LDFLAGS_purgatory.ro := -r $(PURGATORY_LDFLAGS)
LDFLAGS_purgatory.chk := $(PURGATORY_LDFLAGS) LDFLAGS_purgatory.chk := $(PURGATORY_LDFLAGS)
targets += purgatory.ro purgatory.chk targets += purgatory.ro purgatory.chk
# Sanitizer, etc. runtimes are unavailable and cannot be linked here.
GCOV_PROFILE := n
KASAN_SANITIZE := n
UBSAN_SANITIZE := n
KCSAN_SANITIZE := n
KCOV_INSTRUMENT := n
# These are adjustments to the compiler flags used for objects that # These are adjustments to the compiler flags used for objects that
# make up the standalone purgatory.ro # make up the standalone purgatory.ro
......
...@@ -4,8 +4,8 @@ gen := arch/$(ARCH)/include/generated ...@@ -4,8 +4,8 @@ gen := arch/$(ARCH)/include/generated
kapi := $(gen)/asm kapi := $(gen)/asm
uapi := $(gen)/uapi/asm uapi := $(gen)/uapi/asm
syscall := $(srctree)/$(src)/syscall.tbl syscall := $(src)/syscall.tbl
systbl := $(srctree)/$(src)/syscalltbl systbl := $(src)/syscalltbl
gen-y := $(kapi)/syscall_table.h gen-y := $(kapi)/syscall_table.h
kapi-hdrs-y := $(kapi)/unistd_nr.h kapi-hdrs-y := $(kapi)/unistd_nr.h
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
# List of files in the vdso # List of files in the vdso
KCOV_INSTRUMENT := n
# Include the generic Makefile to check the built vdso. # Include the generic Makefile to check the built vdso.
include $(srctree)/lib/vdso/Makefile include $(srctree)/lib/vdso/Makefile
obj-vdso32 = vdso_user_wrapper-32.o note-32.o obj-vdso32 = vdso_user_wrapper-32.o note-32.o
...@@ -32,19 +30,13 @@ obj-y += vdso32_wrapper.o ...@@ -32,19 +30,13 @@ obj-y += vdso32_wrapper.o
targets += vdso32.lds targets += vdso32.lds
CPPFLAGS_vdso32.lds += -P -C -U$(ARCH) CPPFLAGS_vdso32.lds += -P -C -U$(ARCH)
# Disable gcov profiling, ubsan and kasan for VDSO code
GCOV_PROFILE := n
UBSAN_SANITIZE := n
KASAN_SANITIZE := n
KCSAN_SANITIZE := n
# Force dependency (incbin is bad) # Force dependency (incbin is bad)
$(obj)/vdso32_wrapper.o : $(obj)/vdso32.so $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so
quiet_cmd_vdso_and_check = VDSO $@ quiet_cmd_vdso_and_check = VDSO $@
cmd_vdso_and_check = $(cmd_ld); $(cmd_vdso_check) cmd_vdso_and_check = $(cmd_ld); $(cmd_vdso_check)
$(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) FORCE $(obj)/vdso32.so.dbg: $(obj)/vdso32.lds $(obj-vdso32) FORCE
$(call if_changed,vdso_and_check) $(call if_changed,vdso_and_check)
# strip rule for the .so file # strip rule for the .so file
...@@ -62,7 +54,7 @@ quiet_cmd_vdso32cc = VDSO32C $@ ...@@ -62,7 +54,7 @@ quiet_cmd_vdso32cc = VDSO32C $@
cmd_vdso32cc = $(CC) $(c_flags) -c -o $@ $< cmd_vdso32cc = $(CC) $(c_flags) -c -o $@ $<
# Generate VDSO offsets using helper script # Generate VDSO offsets using helper script
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh gen-vdsosym := $(src)/gen_vdso_offsets.sh
quiet_cmd_vdsosym = VDSOSYM $@ quiet_cmd_vdsosym = VDSOSYM $@
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
# List of files in the vdso # List of files in the vdso
KCOV_INSTRUMENT := n
# Include the generic Makefile to check the built vdso. # Include the generic Makefile to check the built vdso.
include $(srctree)/lib/vdso/Makefile include $(srctree)/lib/vdso/Makefile
obj-vdso64 = vdso_user_wrapper.o note.o obj-vdso64 = vdso_user_wrapper.o note.o
...@@ -37,12 +35,6 @@ obj-y += vdso64_wrapper.o ...@@ -37,12 +35,6 @@ obj-y += vdso64_wrapper.o
targets += vdso64.lds targets += vdso64.lds
CPPFLAGS_vdso64.lds += -P -C -U$(ARCH) CPPFLAGS_vdso64.lds += -P -C -U$(ARCH)
# Disable gcov profiling, ubsan and kasan for VDSO code
GCOV_PROFILE := n
UBSAN_SANITIZE := n
KASAN_SANITIZE := n
KCSAN_SANITIZE := n
# Force dependency (incbin is bad) # Force dependency (incbin is bad)
$(obj)/vdso64_wrapper.o : $(obj)/vdso64.so $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so
...@@ -50,7 +42,7 @@ quiet_cmd_vdso_and_check = VDSO $@ ...@@ -50,7 +42,7 @@ quiet_cmd_vdso_and_check = VDSO $@
cmd_vdso_and_check = $(cmd_ld); $(cmd_vdso_check) cmd_vdso_and_check = $(cmd_ld); $(cmd_vdso_check)
# link rule for the .so file, .lds has to be first # link rule for the .so file, .lds has to be first
$(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) $(obj-cvdso64) FORCE $(obj)/vdso64.so.dbg: $(obj)/vdso64.lds $(obj-vdso64) $(obj-cvdso64) FORCE
$(call if_changed,vdso_and_check) $(call if_changed,vdso_and_check)
# strip rule for the .so file # strip rule for the .so file
...@@ -72,7 +64,7 @@ quiet_cmd_vdso64cc = VDSO64C $@ ...@@ -72,7 +64,7 @@ quiet_cmd_vdso64cc = VDSO64C $@
cmd_vdso64cc = $(CC) $(c_flags) -c -o $@ $< cmd_vdso64cc = $(CC) $(c_flags) -c -o $@ $<
# Generate VDSO offsets using helper script # Generate VDSO offsets using helper script
gen-vdsosym := $(srctree)/$(src)/gen_vdso_offsets.sh gen-vdsosym := $(src)/gen_vdso_offsets.sh
quiet_cmd_vdsosym = VDSOSYM $@ quiet_cmd_vdsosym = VDSOSYM $@
cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@ cmd_vdsosym = $(NM) $< | $(gen-vdsosym) | LC_ALL=C sort > $@
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
OBJECT_FILES_NON_STANDARD := y
purgatory-y := head.o purgatory.o string.o sha256.o mem.o purgatory-y := head.o purgatory.o string.o sha256.o mem.o
targets += $(purgatory-y) purgatory.lds purgatory purgatory.chk purgatory.ro targets += $(purgatory-y) purgatory.lds purgatory purgatory.chk purgatory.ro
...@@ -15,12 +13,6 @@ CFLAGS_sha256.o := -D__DISABLE_EXPORTS -D__NO_FORTIFY ...@@ -15,12 +13,6 @@ CFLAGS_sha256.o := -D__DISABLE_EXPORTS -D__NO_FORTIFY
$(obj)/mem.o: $(srctree)/arch/s390/lib/mem.S FORCE $(obj)/mem.o: $(srctree)/arch/s390/lib/mem.S FORCE
$(call if_changed_rule,as_o_S) $(call if_changed_rule,as_o_S)
KCOV_INSTRUMENT := n
GCOV_PROFILE := n
UBSAN_SANITIZE := n
KASAN_SANITIZE := n
KCSAN_SANITIZE := n
KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes
KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding
......
...@@ -710,7 +710,6 @@ config ROMIMAGE_MMCIF ...@@ -710,7 +710,6 @@ config ROMIMAGE_MMCIF
choice choice
prompt "Kernel command line" prompt "Kernel command line"
optional
default CMDLINE_OVERWRITE default CMDLINE_OVERWRITE
help help
Setting this option allows the kernel command line arguments Setting this option allows the kernel command line arguments
...@@ -728,6 +727,11 @@ config CMDLINE_EXTEND ...@@ -728,6 +727,11 @@ config CMDLINE_EXTEND
Given string will be concatenated with arguments passed in Given string will be concatenated with arguments passed in
by a bootloader. by a bootloader.
config CMDLINE_FROM_BOOTLOADER
bool "Use bootloader kernel arguments"
help
Uses the command-line options passed by the boot loader.
endchoice endchoice
config CMDLINE config CMDLINE
......
...@@ -11,9 +11,6 @@ OBJECTS := head_32.o misc.o piggy.o \ ...@@ -11,9 +11,6 @@ OBJECTS := head_32.o misc.o piggy.o \
targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \ targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo $(OBJECTS) vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo $(OBJECTS)
GCOV_PROFILE := n
UBSAN_SANITIZE := n
# #
# IMAGE_OFFSET is the load offset of the compression loader # IMAGE_OFFSET is the load offset of the compression loader
# #
......
...@@ -15,6 +15,7 @@ CONFIG_MEMORY_START=0x0C000000 ...@@ -15,6 +15,7 @@ CONFIG_MEMORY_START=0x0C000000
CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM_MANUAL=y
CONFIG_SH_STORE_QUEUES=y CONFIG_SH_STORE_QUEUES=y
CONFIG_SH_APSH4A3A=y CONFIG_SH_APSH4A3A=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_HIGH_RES_TIMERS=y CONFIG_HIGH_RES_TIMERS=y
CONFIG_KEXEC=y CONFIG_KEXEC=y
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
......
...@@ -42,6 +42,7 @@ CONFIG_SECCOMP=y ...@@ -42,6 +42,7 @@ CONFIG_SECCOMP=y
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_BINFMT_MISC=y CONFIG_BINFMT_MISC=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_PM=y CONFIG_PM=y
CONFIG_PM_DEBUG=y CONFIG_PM_DEBUG=y
CONFIG_PM=y CONFIG_PM=y
......
...@@ -19,6 +19,7 @@ CONFIG_BASE_SMALL=y ...@@ -19,6 +19,7 @@ CONFIG_BASE_SMALL=y
CONFIG_CPU_SUBTYPE_SH7705=y CONFIG_CPU_SUBTYPE_SH7705=y
CONFIG_SH_EDOSK7705=y CONFIG_SH_EDOSK7705=y
CONFIG_SH_PCLK_FREQ=31250000 CONFIG_SH_PCLK_FREQ=31250000
CONFIG_CMDLINE_FROM_BOOTLOADER=y
# CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set
# CONFIG_INPUT is not set # CONFIG_INPUT is not set
# CONFIG_SERIO is not set # CONFIG_SERIO is not set
......
...@@ -15,6 +15,7 @@ CONFIG_SH_DMA_API=y ...@@ -15,6 +15,7 @@ CONFIG_SH_DMA_API=y
CONFIG_HD64461_ENABLER=y CONFIG_HD64461_ENABLER=y
CONFIG_PCCARD=y CONFIG_PCCARD=y
CONFIG_PM=y CONFIG_PM=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_APM_EMULATION=y CONFIG_APM_EMULATION=y
# CONFIG_STANDALONE is not set # CONFIG_STANDALONE is not set
CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SD=y
......
...@@ -15,6 +15,7 @@ CONFIG_KEXEC=y ...@@ -15,6 +15,7 @@ CONFIG_KEXEC=y
CONFIG_PCI=y CONFIG_PCI=y
CONFIG_PCCARD=y CONFIG_PCCARD=y
CONFIG_YENTA=y CONFIG_YENTA=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_UNIX=y CONFIG_UNIX=y
......
...@@ -22,6 +22,7 @@ CONFIG_SH_PCLK_FREQ=24000000 ...@@ -22,6 +22,7 @@ CONFIG_SH_PCLK_FREQ=24000000
CONFIG_SH_DMA=y CONFIG_SH_DMA=y
CONFIG_SH_DMA_API=y CONFIG_SH_DMA_API=y
CONFIG_HEARTBEAT=y CONFIG_HEARTBEAT=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_UNIX=y CONFIG_UNIX=y
......
...@@ -21,6 +21,7 @@ CONFIG_MEMORY_START=0x0c000000 ...@@ -21,6 +21,7 @@ CONFIG_MEMORY_START=0x0c000000
CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM_MANUAL=y
CONFIG_CPU_BIG_ENDIAN=y CONFIG_CPU_BIG_ENDIAN=y
CONFIG_SH_RSK=y CONFIG_SH_RSK=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
# CONFIG_SH_TIMER_MTU2 is not set # CONFIG_SH_TIMER_MTU2 is not set
CONFIG_BINFMT_FLAT=y CONFIG_BINFMT_FLAT=y
CONFIG_NET=y CONFIG_NET=y
......
...@@ -10,6 +10,7 @@ CONFIG_MEMORY_SIZE=0x02000000 ...@@ -10,6 +10,7 @@ CONFIG_MEMORY_SIZE=0x02000000
CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM_MANUAL=y
CONFIG_CPU_BIG_ENDIAN=y CONFIG_CPU_BIG_ENDIAN=y
CONFIG_SH_RSK=y CONFIG_SH_RSK=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
# CONFIG_SH_TIMER_MTU2 is not set # CONFIG_SH_TIMER_MTU2 is not set
CONFIG_SH_PCLK_FREQ=66700000 CONFIG_SH_PCLK_FREQ=66700000
CONFIG_BINFMT_FLAT=y CONFIG_BINFMT_FLAT=y
......
...@@ -14,6 +14,7 @@ CONFIG_FLATMEM_MANUAL=y ...@@ -14,6 +14,7 @@ CONFIG_FLATMEM_MANUAL=y
CONFIG_CPU_BIG_ENDIAN=y CONFIG_CPU_BIG_ENDIAN=y
CONFIG_SH_7619_SOLUTION_ENGINE=y CONFIG_SH_7619_SOLUTION_ENGINE=y
CONFIG_HZ_100=y CONFIG_HZ_100=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_BINFMT_FLAT=y CONFIG_BINFMT_FLAT=y
CONFIG_BINFMT_ZFLAT=y CONFIG_BINFMT_ZFLAT=y
# CONFIG_STANDALONE is not set # CONFIG_STANDALONE is not set
......
...@@ -13,6 +13,7 @@ CONFIG_FLATMEM_MANUAL=y ...@@ -13,6 +13,7 @@ CONFIG_FLATMEM_MANUAL=y
# CONFIG_SH_ADC is not set # CONFIG_SH_ADC is not set
CONFIG_SH_SOLUTION_ENGINE=y CONFIG_SH_SOLUTION_ENGINE=y
CONFIG_HEARTBEAT=y CONFIG_HEARTBEAT=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_PACKET=y CONFIG_PACKET=y
......
...@@ -17,6 +17,7 @@ CONFIG_SH_7722_SOLUTION_ENGINE=y ...@@ -17,6 +17,7 @@ CONFIG_SH_7722_SOLUTION_ENGINE=y
CONFIG_NO_HZ=y CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y CONFIG_HIGH_RES_TIMERS=y
CONFIG_HEARTBEAT=y CONFIG_HEARTBEAT=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_KEXEC=y CONFIG_KEXEC=y
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
CONFIG_NET=y CONFIG_NET=y
......
...@@ -15,6 +15,7 @@ CONFIG_FLATMEM_MANUAL=y ...@@ -15,6 +15,7 @@ CONFIG_FLATMEM_MANUAL=y
CONFIG_SH_SOLUTION_ENGINE=y CONFIG_SH_SOLUTION_ENGINE=y
CONFIG_SH_PCLK_FREQ=33333333 CONFIG_SH_PCLK_FREQ=33333333
CONFIG_HEARTBEAT=y CONFIG_HEARTBEAT=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_UNIX=y CONFIG_UNIX=y
......
...@@ -10,6 +10,7 @@ CONFIG_SH_SECUREEDGE5410=y ...@@ -10,6 +10,7 @@ CONFIG_SH_SECUREEDGE5410=y
CONFIG_SH_DMA=y CONFIG_SH_DMA=y
CONFIG_SH_DMA_API=y CONFIG_SH_DMA_API=y
CONFIG_PCI=y CONFIG_PCI=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_INET=y CONFIG_INET=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set # CONFIG_INET_XFRM_MODE_TRANSPORT is not set
......
...@@ -15,6 +15,7 @@ CONFIG_MEMORY_SIZE=0x00800000 ...@@ -15,6 +15,7 @@ CONFIG_MEMORY_SIZE=0x00800000
CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM_MANUAL=y
# CONFIG_SH_ADC is not set # CONFIG_SH_ADC is not set
CONFIG_SH_PCLK_FREQ=32768000 CONFIG_SH_PCLK_FREQ=32768000
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_UNIX=y CONFIG_UNIX=y
......
...@@ -12,6 +12,7 @@ CONFIG_CPU_FREQ=y ...@@ -12,6 +12,7 @@ CONFIG_CPU_FREQ=y
CONFIG_SH_CPU_FREQ=y CONFIG_SH_CPU_FREQ=y
CONFIG_KEXEC=y CONFIG_KEXEC=y
CONFIG_KEXEC_JUMP=y CONFIG_KEXEC_JUMP=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_HIBERNATION=y CONFIG_HIBERNATION=y
CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE=y
# CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set
......
...@@ -14,6 +14,7 @@ CONFIG_SH_CPU_FREQ=y ...@@ -14,6 +14,7 @@ CONFIG_SH_CPU_FREQ=y
CONFIG_KEXEC=y CONFIG_KEXEC=y
CONFIG_KEXEC_JUMP=y CONFIG_KEXEC_JUMP=y
CONFIG_PM=y CONFIG_PM=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_HIBERNATION=y CONFIG_HIBERNATION=y
CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE=y
# CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set
......
...@@ -32,6 +32,7 @@ CONFIG_PREEMPT=y ...@@ -32,6 +32,7 @@ CONFIG_PREEMPT=y
CONFIG_INTC_USERIMASK=y CONFIG_INTC_USERIMASK=y
CONFIG_PCI=y CONFIG_PCI=y
CONFIG_PCI_DEBUG=y CONFIG_PCI_DEBUG=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_PM=y CONFIG_PM=y
CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE=y
CONFIG_NET=y CONFIG_NET=y
......
...@@ -17,6 +17,7 @@ CONFIG_HEARTBEAT=y ...@@ -17,6 +17,7 @@ CONFIG_HEARTBEAT=y
CONFIG_KEXEC=y CONFIG_KEXEC=y
CONFIG_PREEMPT=y CONFIG_PREEMPT=y
CONFIG_PCI=y CONFIG_PCI=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_UNIX=y CONFIG_UNIX=y
......
...@@ -34,6 +34,7 @@ CONFIG_PCIEPORTBUS=y ...@@ -34,6 +34,7 @@ CONFIG_PCIEPORTBUS=y
CONFIG_PCIEASPM_DEBUG=y CONFIG_PCIEASPM_DEBUG=y
CONFIG_PCI_DEBUG=y CONFIG_PCI_DEBUG=y
CONFIG_BINFMT_MISC=y CONFIG_BINFMT_MISC=y
CONFIG_CMDLINE_FROM_BOOTLOADER=y
CONFIG_PM=y CONFIG_PM=y
CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE=y
CONFIG_NET=y CONFIG_NET=y
......
...@@ -19,14 +19,14 @@ vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 -Wl,--hash-style=sysv ...@@ -19,14 +19,14 @@ vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 -Wl,--hash-style=sysv
SYSCFLAGS_vsyscall-trapa.so = $(vsyscall-flags) SYSCFLAGS_vsyscall-trapa.so = $(vsyscall-flags)
$(obj)/vsyscall-trapa.so: \ $(obj)/vsyscall-trapa.so: \
$(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE $(obj)/vsyscall-%.so: $(obj)/vsyscall.lds $(obj)/vsyscall-%.o FORCE
$(call if_changed,syscall) $(call if_changed,syscall)
# We also create a special relocatable object that should mirror the symbol # We also create a special relocatable object that should mirror the symbol
# table and layout of the linked DSO. With ld -R we can then refer to # table and layout of the linked DSO. With ld -R we can then refer to
# these symbols in the kernel code rather than hand-coded addresses. # these symbols in the kernel code rather than hand-coded addresses.
SYSCFLAGS_vsyscall-dummy.o = -r SYSCFLAGS_vsyscall-dummy.o = -r
$(obj)/vsyscall-dummy.o: $(src)/vsyscall.lds \ $(obj)/vsyscall-dummy.o: $(obj)/vsyscall.lds \
$(obj)/vsyscall-trapa.o $(obj)/vsyscall-note.o FORCE $(obj)/vsyscall-trapa.o $(obj)/vsyscall-note.o FORCE
$(call if_changed,syscall) $(call if_changed,syscall)
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
# #
# Building vDSO images for sparc. # Building vDSO images for sparc.
# #
UBSAN_SANITIZE := n
# files to link into the vdso # files to link into the vdso
vobjs-y := vdso-note.o vclock_gettime.o vobjs-y := vdso-note.o vclock_gettime.o
...@@ -103,7 +102,6 @@ quiet_cmd_vdso = VDSO $@ ...@@ -103,7 +102,6 @@ quiet_cmd_vdso = VDSO $@
cmd_vdso = $(LD) -nostdlib -o $@ \ cmd_vdso = $(LD) -nostdlib -o $@ \
$(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
-T $(filter %.lds,$^) $(filter %.o,$^) && \ -T $(filter %.lds,$^) $(filter %.o,$^) && \
sh $(srctree)/$(src)/checkundef.sh '$(OBJDUMP)' '$@' sh $(src)/checkundef.sh '$(OBJDUMP)' '$@'
VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 -Bsymbolic VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 -Bsymbolic
GCOV_PROFILE := n
...@@ -47,7 +47,7 @@ $(obj)/config.c: $(src)/config.c.in $(obj)/config.tmp FORCE ...@@ -47,7 +47,7 @@ $(obj)/config.c: $(src)/config.c.in $(obj)/config.tmp FORCE
$(call if_changed,quote2) $(call if_changed,quote2)
quiet_cmd_mkcapflags = MKCAP $@ quiet_cmd_mkcapflags = MKCAP $@
cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/../../x86/kernel/cpu/mkcapflags.sh $@ $^ cmd_mkcapflags = $(CONFIG_SHELL) $(src)/../../x86/kernel/cpu/mkcapflags.sh $@ $^
cpufeature = $(src)/../../x86/include/asm/cpufeatures.h cpufeature = $(src)/../../x86/include/asm/cpufeatures.h
vmxfeature = $(src)/../../x86/include/asm/vmxfeatures.h vmxfeature = $(src)/../../x86/include/asm/vmxfeatures.h
......
...@@ -9,19 +9,6 @@ ...@@ -9,19 +9,6 @@
# Changed by many, many contributors over the years. # Changed by many, many contributors over the years.
# #
# Sanitizer runtimes are unavailable and cannot be linked for early boot code.
KASAN_SANITIZE := n
KCSAN_SANITIZE := n
KMSAN_SANITIZE := n
OBJECT_FILES_NON_STANDARD := y
# Kernel does not boot with kcov instrumentation here.
# One of the problems observed was insertion of __sanitizer_cov_trace_pc()
# callback into middle of per-cpu data enabling code. Thus the callback observed
# inconsistent state and crashed. We are interested mostly in syscall coverage,
# so boot code is not interesting anyway.
KCOV_INSTRUMENT := n
# If you want to preset the SVGA mode, uncomment the next line and # If you want to preset the SVGA mode, uncomment the next line and
# set SVGA_MODE to whatever number you want. # set SVGA_MODE to whatever number you want.
# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode. # Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
...@@ -69,8 +56,6 @@ KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP ...@@ -69,8 +56,6 @@ KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
GCOV_PROFILE := n
UBSAN_SANITIZE := n
$(obj)/bzImage: asflags-y := $(SVGA_MODE) $(obj)/bzImage: asflags-y := $(SVGA_MODE)
...@@ -129,7 +114,7 @@ targets += mtools.conf ...@@ -129,7 +114,7 @@ targets += mtools.conf
# genimage.sh requires bash, but it also has a bunch of other # genimage.sh requires bash, but it also has a bunch of other
# external dependencies. # external dependencies.
quiet_cmd_genimage = GENIMAGE $3 quiet_cmd_genimage = GENIMAGE $3
cmd_genimage = $(BASH) $(srctree)/$(src)/genimage.sh $2 $3 $(obj)/bzImage \ cmd_genimage = $(BASH) $(src)/genimage.sh $2 $3 $(obj)/bzImage \
$(obj)/mtools.conf '$(FDARGS)' $(FDINITRD) $(obj)/mtools.conf '$(FDARGS)' $(FDINITRD)
PHONY += bzdisk fdimage fdimage144 fdimage288 hdimage isoimage PHONY += bzdisk fdimage fdimage144 fdimage288 hdimage isoimage
......
...@@ -17,15 +17,6 @@ ...@@ -17,15 +17,6 @@
# (see scripts/Makefile.lib size_append) # (see scripts/Makefile.lib size_append)
# compressed vmlinux.bin.all + u32 size of vmlinux.bin.all # compressed vmlinux.bin.all + u32 size of vmlinux.bin.all
# Sanitizer runtimes are unavailable and cannot be linked for early boot code.
KASAN_SANITIZE := n
KCSAN_SANITIZE := n
KMSAN_SANITIZE := n
OBJECT_FILES_NON_STANDARD := y
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
KCOV_INSTRUMENT := n
targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \ targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4 vmlinux.bin.zst vmlinux.bin.xz vmlinux.bin.lzo vmlinux.bin.lz4 vmlinux.bin.zst
...@@ -59,8 +50,6 @@ KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h ...@@ -59,8 +50,6 @@ KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h
CFLAGS_sev.o += -I$(objtree)/arch/x86/lib/ CFLAGS_sev.o += -I$(objtree)/arch/x86/lib/
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
GCOV_PROFILE := n
UBSAN_SANITIZE :=n
KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE)
KBUILD_LDFLAGS += $(call ld-option,--no-ld-generated-unwind-info) KBUILD_LDFLAGS += $(call ld-option,--no-ld-generated-unwind-info)
......
...@@ -6,20 +6,6 @@ ...@@ -6,20 +6,6 @@
# Include the generic Makefile to check the built vDSO: # Include the generic Makefile to check the built vDSO:
include $(srctree)/lib/vdso/Makefile include $(srctree)/lib/vdso/Makefile
# Sanitizer runtimes are unavailable and cannot be linked here.
KASAN_SANITIZE := n
KMSAN_SANITIZE_vclock_gettime.o := n
KMSAN_SANITIZE_vdso32/vclock_gettime.o := n
KMSAN_SANITIZE_vgetcpu.o := n
KMSAN_SANITIZE_vdso32/vgetcpu.o := n
UBSAN_SANITIZE := n
KCSAN_SANITIZE := n
OBJECT_FILES_NON_STANDARD := y
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
KCOV_INSTRUMENT := n
# Files to link into the vDSO: # Files to link into the vDSO:
vobjs-y := vdso-note.o vclock_gettime.o vgetcpu.o vobjs-y := vdso-note.o vclock_gettime.o vgetcpu.o
vobjs32-y := vdso32/note.o vdso32/system_call.o vdso32/sigreturn.o vobjs32-y := vdso32/note.o vdso32/system_call.o vdso32/sigreturn.o
...@@ -28,23 +14,12 @@ vobjs-$(CONFIG_X86_SGX) += vsgx.o ...@@ -28,23 +14,12 @@ vobjs-$(CONFIG_X86_SGX) += vsgx.o
# Files to link into the kernel: # Files to link into the kernel:
obj-y += vma.o extable.o obj-y += vma.o extable.o
KASAN_SANITIZE_vma.o := y
UBSAN_SANITIZE_vma.o := y
KCSAN_SANITIZE_vma.o := y
OBJECT_FILES_NON_STANDARD_vma.o := n
OBJECT_FILES_NON_STANDARD_extable.o := n
# vDSO images to build: # vDSO images to build:
obj-$(CONFIG_X86_64) += vdso-image-64.o obj-$(CONFIG_X86_64) += vdso-image-64.o
obj-$(CONFIG_X86_X32_ABI) += vdso-image-x32.o obj-$(CONFIG_X86_X32_ABI) += vdso-image-x32.o
obj-$(CONFIG_COMPAT_32) += vdso-image-32.o vdso32-setup.o obj-$(CONFIG_COMPAT_32) += vdso-image-32.o vdso32-setup.o
OBJECT_FILES_NON_STANDARD_vdso-image-32.o := n
OBJECT_FILES_NON_STANDARD_vdso-image-x32.o := n
OBJECT_FILES_NON_STANDARD_vdso-image-64.o := n
OBJECT_FILES_NON_STANDARD_vdso32-setup.o := n
vobjs := $(addprefix $(obj)/, $(vobjs-y)) vobjs := $(addprefix $(obj)/, $(vobjs-y))
vobjs32 := $(addprefix $(obj)/, $(vobjs32-y)) vobjs32 := $(addprefix $(obj)/, $(vobjs32-y))
...@@ -176,11 +151,10 @@ quiet_cmd_vdso = VDSO $@ ...@@ -176,11 +151,10 @@ quiet_cmd_vdso = VDSO $@
cmd_vdso = $(LD) -o $@ \ cmd_vdso = $(LD) -o $@ \
$(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
-T $(filter %.lds,$^) $(filter %.o,$^) && \ -T $(filter %.lds,$^) $(filter %.o,$^) && \
sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' sh $(src)/checkundef.sh '$(NM)' '$@'
VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 \ VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 \
$(call ld-option, --eh-frame-hdr) -Bsymbolic -z noexecstack $(call ld-option, --eh-frame-hdr) -Bsymbolic -z noexecstack
GCOV_PROFILE := n
quiet_cmd_vdso_and_check = VDSO $@ quiet_cmd_vdso_and_check = VDSO $@
cmd_vdso_and_check = $(cmd_vdso); $(cmd_vdso_check) cmd_vdso_and_check = $(cmd_vdso); $(cmd_vdso_check)
...@@ -40,7 +40,7 @@ KMSAN_SANITIZE_sev.o := n ...@@ -40,7 +40,7 @@ KMSAN_SANITIZE_sev.o := n
KCOV_INSTRUMENT_head$(BITS).o := n KCOV_INSTRUMENT_head$(BITS).o := n
KCOV_INSTRUMENT_sev.o := n KCOV_INSTRUMENT_sev.o := n
CFLAGS_irq.o := -I $(srctree)/$(src)/../include/asm/trace CFLAGS_irq.o := -I $(src)/../include/asm/trace
obj-y += head_$(BITS).o obj-y += head_$(BITS).o
obj-y += head$(BITS).o obj-y += head$(BITS).o
......
...@@ -60,7 +60,7 @@ obj-$(CONFIG_ACRN_GUEST) += acrn.o ...@@ -60,7 +60,7 @@ obj-$(CONFIG_ACRN_GUEST) += acrn.o
obj-$(CONFIG_DEBUG_FS) += debugfs.o obj-$(CONFIG_DEBUG_FS) += debugfs.o
quiet_cmd_mkcapflags = MKCAP $@ quiet_cmd_mkcapflags = MKCAP $@
cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $@ $^ cmd_mkcapflags = $(CONFIG_SHELL) $(src)/mkcapflags.sh $@ $^
cpufeature = $(src)/../../include/asm/cpufeatures.h cpufeature = $(src)/../../include/asm/cpufeatures.h
vmxfeature = $(src)/../../include/asm/vmxfeatures.h vmxfeature = $(src)/../../include/asm/vmxfeatures.h
......
...@@ -34,7 +34,7 @@ obj-y += pat/ ...@@ -34,7 +34,7 @@ obj-y += pat/
CFLAGS_physaddr.o := -fno-stack-protector CFLAGS_physaddr.o := -fno-stack-protector
CFLAGS_mem_encrypt_identity.o := -fno-stack-protector CFLAGS_mem_encrypt_identity.o := -fno-stack-protector
CFLAGS_fault.o := -I $(srctree)/$(src)/../include/asm/trace CFLAGS_fault.o := -I $(src)/../include/asm/trace
obj-$(CONFIG_X86_32) += pgtable_32.o iomap_32.o obj-$(CONFIG_X86_32) += pgtable_32.o iomap_32.o
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
OBJECT_FILES_NON_STANDARD := y
purgatory-y := purgatory.o stack.o setup-x86_$(BITS).o sha256.o entry64.o string.o purgatory-y := purgatory.o stack.o setup-x86_$(BITS).o sha256.o entry64.o string.o
...@@ -30,14 +29,6 @@ LDFLAGS_purgatory.ro := -r $(PURGATORY_LDFLAGS) ...@@ -30,14 +29,6 @@ LDFLAGS_purgatory.ro := -r $(PURGATORY_LDFLAGS)
LDFLAGS_purgatory.chk := $(PURGATORY_LDFLAGS) LDFLAGS_purgatory.chk := $(PURGATORY_LDFLAGS)
targets += purgatory.ro purgatory.chk targets += purgatory.ro purgatory.chk
# Sanitizer, etc. runtimes are unavailable and cannot be linked here.
GCOV_PROFILE := n
KASAN_SANITIZE := n
UBSAN_SANITIZE := n
KCSAN_SANITIZE := n
KMSAN_SANITIZE := n
KCOV_INSTRUMENT := n
# These are adjustments to the compiler flags used for objects that # These are adjustments to the compiler flags used for objects that
# make up the standalone purgatory.ro # make up the standalone purgatory.ro
......
...@@ -7,15 +7,6 @@ ...@@ -7,15 +7,6 @@
# #
# #
# Sanitizer runtimes are unavailable and cannot be linked here.
KASAN_SANITIZE := n
KCSAN_SANITIZE := n
KMSAN_SANITIZE := n
OBJECT_FILES_NON_STANDARD := y
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
KCOV_INSTRUMENT := n
always-y := realmode.bin realmode.relocs always-y := realmode.bin realmode.relocs
wakeup-objs := wakeup_asm.o wakemain.o video-mode.o wakeup-objs := wakeup_asm.o wakemain.o video-mode.o
...@@ -76,5 +67,3 @@ KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \ ...@@ -76,5 +67,3 @@ KBUILD_CFLAGS := $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \
-I$(srctree)/arch/x86/boot -I$(srctree)/arch/x86/boot
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
GCOV_PROFILE := n
UBSAN_SANITIZE := n
...@@ -3,12 +3,6 @@ ...@@ -3,12 +3,6 @@
# Building vDSO images for x86. # Building vDSO images for x86.
# #
# do not instrument on vdso because KASAN is not compatible with user mode
KASAN_SANITIZE := n
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
KCOV_INSTRUMENT := n
VDSO64-y := y VDSO64-y := y
vdso-install-$(VDSO64-y) += vdso.so vdso-install-$(VDSO64-y) += vdso.so
...@@ -63,7 +57,6 @@ quiet_cmd_vdso = VDSO $@ ...@@ -63,7 +57,6 @@ quiet_cmd_vdso = VDSO $@
cmd_vdso = $(CC) -nostdlib -o $@ \ cmd_vdso = $(CC) -nostdlib -o $@ \
$(CC_FLAGS_LTO) $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ $(CC_FLAGS_LTO) $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
-Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \ -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' sh $(src)/checkundef.sh '$(NM)' '$@'
VDSO_LDFLAGS = -fPIC -shared -Wl,--hash-style=sysv -z noexecstack VDSO_LDFLAGS = -fPIC -shared -Wl,--hash-style=sysv -z noexecstack
GCOV_PROFILE := n
...@@ -10,5 +10,4 @@ ...@@ -10,5 +10,4 @@
obj-$(CONFIG_OF) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE)) obj-$(CONFIG_OF) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE))
# for CONFIG_OF_ALL_DTBS test # for CONFIG_OF_ALL_DTBS test
dtstree := $(srctree)/$(src) dtb- := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
dtb- := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
...@@ -13,7 +13,7 @@ CFLAGS_blacklist_hashes.o := -I $(obj) ...@@ -13,7 +13,7 @@ CFLAGS_blacklist_hashes.o := -I $(obj)
quiet_cmd_check_and_copy_blacklist_hash_list = GEN $@ quiet_cmd_check_and_copy_blacklist_hash_list = GEN $@
cmd_check_and_copy_blacklist_hash_list = \ cmd_check_and_copy_blacklist_hash_list = \
$(if $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST), \ $(if $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST), \
$(AWK) -f $(srctree)/$(src)/check-blacklist-hashes.awk $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) >&2; \ $(AWK) -f $(src)/check-blacklist-hashes.awk $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) >&2; \
{ cat $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST); echo $(comma) NULL; } > $@, \ { cat $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST); echo $(comma) NULL; } > $@, \
echo NULL > $@) echo NULL > $@)
...@@ -55,7 +55,7 @@ $(obj)/signing_key.pem: $(obj)/x509.genkey FORCE ...@@ -55,7 +55,7 @@ $(obj)/signing_key.pem: $(obj)/x509.genkey FORCE
targets += signing_key.pem targets += signing_key.pem
quiet_cmd_copy_x509_config = COPY $@ quiet_cmd_copy_x509_config = COPY $@
cmd_copy_x509_config = cat $(srctree)/$(src)/default_x509.genkey > $@ cmd_copy_x509_config = cat $(src)/default_x509.genkey > $@
# You can provide your own config file. If not present, copy the default one. # You can provide your own config file. If not present, copy the default one.
$(obj)/x509.genkey: $(obj)/x509.genkey:
......
...@@ -6,11 +6,6 @@ ...@@ -6,11 +6,6 @@
# Rewritten to use lists instead of if-statements. # Rewritten to use lists instead of if-statements.
# #
# Some driver Makefiles miss $(srctree)/ for include directive.
ifdef building_out_of_srctree
MAKEFLAGS += --include-dir=$(srctree)
endif
obj-y += cache/ obj-y += cache/
obj-y += irqchip/ obj-y += irqchip/
obj-y += bus/ obj-y += bus/
......
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
ccflags-y := -I $(srctree)/$(src)/../qat_common ccflags-y := -I $(src)/../qat_common
obj-$(CONFIG_CRYPTO_DEV_QAT_420XX) += qat_420xx.o obj-$(CONFIG_CRYPTO_DEV_QAT_420XX) += qat_420xx.o
qat_420xx-objs := adf_drv.o adf_420xx_hw_data.o qat_420xx-objs := adf_drv.o adf_420xx_hw_data.o
# SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only) # SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only)
ccflags-y := -I $(srctree)/$(src)/../qat_common ccflags-y := -I $(src)/../qat_common
obj-$(CONFIG_CRYPTO_DEV_QAT_4XXX) += qat_4xxx.o obj-$(CONFIG_CRYPTO_DEV_QAT_4XXX) += qat_4xxx.o
qat_4xxx-objs := adf_drv.o adf_4xxx_hw_data.o qat_4xxx-objs := adf_drv.o adf_4xxx_hw_data.o
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
ccflags-y := -I $(srctree)/$(src)/../qat_common ccflags-y := -I $(src)/../qat_common
obj-$(CONFIG_CRYPTO_DEV_QAT_C3XXX) += qat_c3xxx.o obj-$(CONFIG_CRYPTO_DEV_QAT_C3XXX) += qat_c3xxx.o
qat_c3xxx-objs := adf_drv.o adf_c3xxx_hw_data.o qat_c3xxx-objs := adf_drv.o adf_c3xxx_hw_data.o
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
ccflags-y := -I $(srctree)/$(src)/../qat_common ccflags-y := -I $(src)/../qat_common
obj-$(CONFIG_CRYPTO_DEV_QAT_C3XXXVF) += qat_c3xxxvf.o obj-$(CONFIG_CRYPTO_DEV_QAT_C3XXXVF) += qat_c3xxxvf.o
qat_c3xxxvf-objs := adf_drv.o adf_c3xxxvf_hw_data.o qat_c3xxxvf-objs := adf_drv.o adf_c3xxxvf_hw_data.o
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
ccflags-y := -I $(srctree)/$(src)/../qat_common ccflags-y := -I $(src)/../qat_common
obj-$(CONFIG_CRYPTO_DEV_QAT_C62X) += qat_c62x.o obj-$(CONFIG_CRYPTO_DEV_QAT_C62X) += qat_c62x.o
qat_c62x-objs := adf_drv.o adf_c62x_hw_data.o qat_c62x-objs := adf_drv.o adf_c62x_hw_data.o
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
ccflags-y := -I $(srctree)/$(src)/../qat_common ccflags-y := -I $(src)/../qat_common
obj-$(CONFIG_CRYPTO_DEV_QAT_C62XVF) += qat_c62xvf.o obj-$(CONFIG_CRYPTO_DEV_QAT_C62XVF) += qat_c62xvf.o
qat_c62xvf-objs := adf_drv.o adf_c62xvf_hw_data.o qat_c62xvf-objs := adf_drv.o adf_c62xvf_hw_data.o
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
ccflags-y := -I $(srctree)/$(src)/../qat_common ccflags-y := -I $(src)/../qat_common
obj-$(CONFIG_CRYPTO_DEV_QAT_DH895xCC) += qat_dh895xcc.o obj-$(CONFIG_CRYPTO_DEV_QAT_DH895xCC) += qat_dh895xcc.o
qat_dh895xcc-objs := adf_drv.o adf_dh895xcc_hw_data.o qat_dh895xcc-objs := adf_drv.o adf_dh895xcc_hw_data.o
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
ccflags-y := -I $(srctree)/$(src)/../qat_common ccflags-y := -I $(src)/../qat_common
obj-$(CONFIG_CRYPTO_DEV_QAT_DH895xCCVF) += qat_dh895xccvf.o obj-$(CONFIG_CRYPTO_DEV_QAT_DH895xCCVF) += qat_dh895xccvf.o
qat_dh895xccvf-objs := adf_drv.o adf_dh895xccvf_hw_data.o qat_dh895xccvf-objs := adf_drv.o adf_dh895xccvf_hw_data.o
...@@ -56,17 +56,6 @@ KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_CFI), $(KBUILD_CFLAGS)) ...@@ -56,17 +56,6 @@ KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_CFI), $(KBUILD_CFLAGS))
# disable LTO # disable LTO
KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS)) KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS))
GCOV_PROFILE := n
# Sanitizer runtimes are unavailable and cannot be linked here.
KASAN_SANITIZE := n
KCSAN_SANITIZE := n
KMSAN_SANITIZE := n
UBSAN_SANITIZE := n
OBJECT_FILES_NON_STANDARD := y
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
KCOV_INSTRUMENT := n
lib-y := efi-stub-helper.o gop.o secureboot.o tpm.o \ lib-y := efi-stub-helper.o gop.o secureboot.o tpm.o \
file.o mem.o random.o randomalloc.o pci.o \ file.o mem.o random.o randomalloc.o pci.o \
skip_spaces.o lib-cmdline.o lib-ctype.o \ skip_spaces.o lib-cmdline.o lib-ctype.o \
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
# Makefile for the drm device driver. This driver provides support for the # Makefile for the drm device driver. This driver provides support for the
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
FULL_AMD_PATH=$(srctree)/$(src)/.. FULL_AMD_PATH=$(src)/..
DISPLAY_FOLDER_NAME=display DISPLAY_FOLDER_NAME=display
FULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME) FULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME)
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
ccflags-y := \ ccflags-y := \
-I $(srctree)/$(src)/../include \ -I $(src)/../include \
-I $(srctree)/$(src) -I $(src)
komeda-y := \ komeda-y := \
komeda_drv.o \ komeda_drv.o \
......
...@@ -36,7 +36,7 @@ subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror ...@@ -36,7 +36,7 @@ subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
# drivers. Define I915 when building i915. # drivers. Define I915 when building i915.
subdir-ccflags-y += -DI915 subdir-ccflags-y += -DI915
subdir-ccflags-y += -I$(srctree)/$(src) subdir-ccflags-y += -I$(src)
# Please keep these build lists sorted! # Please keep these build lists sorted!
...@@ -430,7 +430,7 @@ no-header-test := \ ...@@ -430,7 +430,7 @@ no-header-test := \
always-$(CONFIG_DRM_I915_WERROR) += \ always-$(CONFIG_DRM_I915_WERROR) += \
$(patsubst %.h,%.hdrtest, $(filter-out $(no-header-test), \ $(patsubst %.h,%.hdrtest, $(filter-out $(no-header-test), \
$(shell cd $(srctree)/$(src) && find * -name '*.h'))) $(shell cd $(src) && find * -name '*.h')))
quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@) quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@)
cmd_hdrtest = $(CC) $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o /dev/null -x c /dev/null -include $<; \ cmd_hdrtest = $(CC) $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o /dev/null -x c /dev/null -include $<; \
......
# SPDX-License-Identifier: GPL-2.0-only OR MIT # SPDX-License-Identifier: GPL-2.0-only OR MIT
# Copyright (c) 2023 Imagination Technologies Ltd. # Copyright (c) 2023 Imagination Technologies Ltd.
subdir-ccflags-y := -I$(srctree)/$(src) subdir-ccflags-y := -I$(src)
powervr-y := \ powervr-y := \
pvr_ccb.o \ pvr_ccb.o \
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
ccflags-y := -I $(srctree)/$(src) ccflags-y := -I $(src)
ccflags-y += -I $(obj)/generated ccflags-y += -I $(obj)/generated
ccflags-y += -I $(srctree)/$(src)/disp/dpu1 ccflags-y += -I $(src)/disp/dpu1
ccflags-$(CONFIG_DRM_MSM_DSI) += -I $(srctree)/$(src)/dsi ccflags-$(CONFIG_DRM_MSM_DSI) += -I $(src)/dsi
ccflags-$(CONFIG_DRM_MSM_DP) += -I $(srctree)/$(src)/dp ccflags-$(CONFIG_DRM_MSM_DP) += -I $(src)/dp
adreno-y := \ adreno-y := \
adreno/adreno_device.o \ adreno/adreno_device.o \
...@@ -163,8 +163,8 @@ else ...@@ -163,8 +163,8 @@ else
endif endif
quiet_cmd_headergen = GENHDR $@ quiet_cmd_headergen = GENHDR $@
cmd_headergen = mkdir -p $(obj)/generated && $(PYTHON3) $(srctree)/$(src)/registers/gen_header.py \ cmd_headergen = mkdir -p $(obj)/generated && $(PYTHON3) $(src)/registers/gen_header.py \
$(headergen-opts) --rnn $(srctree)/$(src)/registers --xml $< c-defines > $@ $(headergen-opts) --rnn $(src)/registers --xml $< c-defines > $@
$(obj)/generated/%.xml.h: $(src)/registers/adreno/%.xml \ $(obj)/generated/%.xml.h: $(src)/registers/adreno/%.xml \
$(src)/registers/adreno/adreno_common.xml \ $(src)/registers/adreno/adreno_common.xml \
......
NOUVEAU_PATH ?= $(srctree)
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
ccflags-y += -I $(NOUVEAU_PATH)/$(src)/include ccflags-y += -I $(src)/include
ccflags-y += -I $(NOUVEAU_PATH)/$(src)/include/nvkm ccflags-y += -I $(src)/include/nvkm
ccflags-y += -I $(NOUVEAU_PATH)/$(src)/nvkm ccflags-y += -I $(src)/nvkm
ccflags-y += -I $(NOUVEAU_PATH)/$(src) ccflags-y += -I $(src)
# NVKM - HW resource manager # NVKM - HW resource manager
#- code also used by various userspace tools/tests #- code also used by various userspace tools/tests
......
...@@ -32,7 +32,7 @@ endif ...@@ -32,7 +32,7 @@ endif
# Enable -Werror in CI and development # Enable -Werror in CI and development
subdir-ccflags-$(CONFIG_DRM_XE_WERROR) += -Werror subdir-ccflags-$(CONFIG_DRM_XE_WERROR) += -Werror
subdir-ccflags-y += -I$(obj) -I$(srctree)/$(src) subdir-ccflags-y += -I$(obj) -I$(src)
# generated sources # generated sources
hostprogs := xe_gen_wa_oob hostprogs := xe_gen_wa_oob
...@@ -43,7 +43,7 @@ quiet_cmd_wa_oob = GEN $(notdir $(generated_oob)) ...@@ -43,7 +43,7 @@ quiet_cmd_wa_oob = GEN $(notdir $(generated_oob))
cmd_wa_oob = mkdir -p $(@D); $^ $(generated_oob) cmd_wa_oob = mkdir -p $(@D); $^ $(generated_oob)
$(obj)/generated/%_wa_oob.c $(obj)/generated/%_wa_oob.h: $(obj)/xe_gen_wa_oob \ $(obj)/generated/%_wa_oob.c $(obj)/generated/%_wa_oob.h: $(obj)/xe_gen_wa_oob \
$(srctree)/$(src)/xe_wa_oob.rules $(src)/xe_wa_oob.rules
$(call cmd,wa_oob) $(call cmd,wa_oob)
uses_generated_oob := \ uses_generated_oob := \
...@@ -176,8 +176,8 @@ endif ...@@ -176,8 +176,8 @@ endif
# i915 Display compat #defines and #includes # i915 Display compat #defines and #includes
subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \ subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \
-I$(srctree)/$(src)/display/ext \ -I$(src)/display/ext \
-I$(srctree)/$(src)/compat-i915-headers \ -I$(src)/compat-i915-headers \
-I$(srctree)/drivers/gpu/drm/i915/display/ \ -I$(srctree)/drivers/gpu/drm/i915/display/ \
-Ddrm_i915_gem_object=xe_bo \ -Ddrm_i915_gem_object=xe_bo \
-Ddrm_i915_private=xe_device -Ddrm_i915_private=xe_device
...@@ -319,7 +319,7 @@ ifneq ($(CONFIG_DRM_XE_DISPLAY),y) ...@@ -319,7 +319,7 @@ ifneq ($(CONFIG_DRM_XE_DISPLAY),y)
endif endif
always-$(CONFIG_DRM_XE_WERROR) += \ always-$(CONFIG_DRM_XE_WERROR) += \
$(patsubst %.h,%.hdrtest, $(shell cd $(srctree)/$(src) && find * -name '*.h' $(hdrtest_find_args))) $(patsubst %.h,%.hdrtest, $(shell cd $(src) && find * -name '*.h' $(hdrtest_find_args)))
quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@) quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@)
cmd_hdrtest = $(CC) -DHDRTEST $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o /dev/null -x c /dev/null -include $<; touch $@ cmd_hdrtest = $(CC) -DHDRTEST $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o /dev/null -x c /dev/null -include $<; touch $@
......
...@@ -13,4 +13,4 @@ amd_sfh-objs += sfh1_1/amd_sfh_init.o ...@@ -13,4 +13,4 @@ amd_sfh-objs += sfh1_1/amd_sfh_init.o
amd_sfh-objs += sfh1_1/amd_sfh_interface.o amd_sfh-objs += sfh1_1/amd_sfh_interface.o
amd_sfh-objs += sfh1_1/amd_sfh_desc.o amd_sfh-objs += sfh1_1/amd_sfh_desc.o
ccflags-y += -I $(srctree)/$(src)/ ccflags-y += -I $(src)/
...@@ -24,4 +24,4 @@ intel-ishtp-hid-objs += ishtp-hid-client.o ...@@ -24,4 +24,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 += -I $(srctree)/$(src)/ishtp ccflags-y += -I $(src)/ishtp
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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