Deleted Added
full compact
Makefile (d8285639) Makefile (6072b2c4)
1# SPDX-License-Identifier: GPL-2.0
2VERSION = 5
3PATCHLEVEL = 14
4SUBLEVEL = 0
5EXTRAVERSION = -rc5
6NAME = Opossums on Parade
7
8# *DOCUMENTATION*

--- 567 unchanged lines hidden (view full) ---

576 $(Q)test -e .gitignore || \
577 { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
578endif
579
580# The expansion should be delayed until arch/$(SRCARCH)/Makefile is included.
581# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
582# CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
583# and from include/config/auto.conf.cmd to detect the compiler upgrade.
1# SPDX-License-Identifier: GPL-2.0
2VERSION = 5
3PATCHLEVEL = 14
4SUBLEVEL = 0
5EXTRAVERSION = -rc5
6NAME = Opossums on Parade
7
8# *DOCUMENTATION*

--- 567 unchanged lines hidden (view full) ---

576 $(Q)test -e .gitignore || \
577 { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
578endif
579
580# The expansion should be delayed until arch/$(SRCARCH)/Makefile is included.
581# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
582# CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
583# and from include/config/auto.conf.cmd to detect the compiler upgrade.
584CC_VERSION_TEXT = $(subst $(pound),,$(shell $(CC) --version 2>/dev/null | head -n 1))
584CC_VERSION_TEXT = $(subst $(pound),,$(shell LC_ALL=C $(CC) --version 2>/dev/null | head -n 1))
585
586ifneq ($(findstring clang,$(CC_VERSION_TEXT)),)
587ifneq ($(CROSS_COMPILE),)
588CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%))
589endif
590ifeq ($(LLVM_IAS),1)
591CLANG_FLAGS += -integrated-as
592else

--- 1141 unchanged lines hidden (view full) ---

1734
1735compile_commands.json: $(extmod_prefix)compile_commands.json
1736PHONY += compile_commands.json
1737
1738clean-dirs := $(KBUILD_EXTMOD)
1739clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers $(KBUILD_EXTMOD)/modules.nsdeps \
1740 $(KBUILD_EXTMOD)/compile_commands.json $(KBUILD_EXTMOD)/.thinlto-cache
1741
585
586ifneq ($(findstring clang,$(CC_VERSION_TEXT)),)
587ifneq ($(CROSS_COMPILE),)
588CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%))
589endif
590ifeq ($(LLVM_IAS),1)
591CLANG_FLAGS += -integrated-as
592else

--- 1141 unchanged lines hidden (view full) ---

1734
1735compile_commands.json: $(extmod_prefix)compile_commands.json
1736PHONY += compile_commands.json
1737
1738clean-dirs := $(KBUILD_EXTMOD)
1739clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers $(KBUILD_EXTMOD)/modules.nsdeps \
1740 $(KBUILD_EXTMOD)/compile_commands.json $(KBUILD_EXTMOD)/.thinlto-cache
1741
1742PHONY += prepare
1743# now expand this into a simple variable to reduce the cost of shell evaluations
1744prepare: CC_VERSION_TEXT := $(CC_VERSION_TEXT)
1745prepare:
1746 @if [ "$(CC_VERSION_TEXT)" != $(CONFIG_CC_VERSION_TEXT) ]; then \
1747 echo >&2 "warning: the compiler differs from the one used to build the kernel"; \
1748 echo >&2 " The kernel was built by: "$(CONFIG_CC_VERSION_TEXT); \
1749 echo >&2 " You are using: $(CC_VERSION_TEXT)"; \
1750 fi
1751
1742PHONY += help
1743help:
1744 @echo ' Building external modules.'
1745 @echo ' Syntax: make -C path/to/kernel/src M=$$PWD target'
1746 @echo ''
1747 @echo ' modules - default target, build the module(s)'
1748 @echo ' modules_install - install the module'
1749 @echo ' clean - remove generated files in module directory only'
1750 @echo ''
1751
1752# no-op for external module builds
1752PHONY += help
1753help:
1754 @echo ' Building external modules.'
1755 @echo ' Syntax: make -C path/to/kernel/src M=$$PWD target'
1756 @echo ''
1757 @echo ' modules - default target, build the module(s)'
1758 @echo ' modules_install - install the module'
1759 @echo ' clean - remove generated files in module directory only'
1760 @echo ''
1761
1762# no-op for external module builds
1753PHONY += prepare modules_prepare
1763PHONY += modules_prepare
1754
1755endif # KBUILD_EXTMOD
1756
1757# ---------------------------------------------------------------------------
1758# Modules
1759
1760PHONY += modules modules_install
1761

--- 221 unchanged lines hidden ---
1764
1765endif # KBUILD_EXTMOD
1766
1767# ---------------------------------------------------------------------------
1768# Modules
1769
1770PHONY += modules modules_install
1771

--- 221 unchanged lines hidden ---