Makefile.include (063565aca3734de4e73639a0e460a58d9418b3cd) Makefile.include (b7892f7d5cb2b8187c603dd8ea3a7c44059ccfc2)
1# SPDX-License-Identifier: GPL-2.0
2ifneq ($(O),)
3ifeq ($(origin O), command line)
4 dummy := $(if $(shell cd $(PWD); test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
5 ABSOLUTE_O := $(shell cd $(PWD); cd $(O) ; pwd)
6 OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/)
7 COMMAND_O := O=$(ABSOLUTE_O)
8ifeq ($(objtree),)

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

85LLVM_OBJCOPY ?= llvm-objcopy
86LLVM_STRIP ?= llvm-strip
87
88ifeq ($(CC_NO_CLANG), 1)
89EXTRA_WARNINGS += -Wstrict-aliasing=3
90
91else ifneq ($(CROSS_COMPILE),)
92CLANG_CROSS_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%))
1# SPDX-License-Identifier: GPL-2.0
2ifneq ($(O),)
3ifeq ($(origin O), command line)
4 dummy := $(if $(shell cd $(PWD); test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
5 ABSOLUTE_O := $(shell cd $(PWD); cd $(O) ; pwd)
6 OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/)
7 COMMAND_O := O=$(ABSOLUTE_O)
8ifeq ($(objtree),)

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

85LLVM_OBJCOPY ?= llvm-objcopy
86LLVM_STRIP ?= llvm-strip
87
88ifeq ($(CC_NO_CLANG), 1)
89EXTRA_WARNINGS += -Wstrict-aliasing=3
90
91else ifneq ($(CROSS_COMPILE),)
92CLANG_CROSS_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%))
93GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)gcc))
93GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)gcc 2>/dev/null))
94ifneq ($(GCC_TOOLCHAIN_DIR),)
95CLANG_CROSS_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE))
96CLANG_CROSS_FLAGS += --sysroot=$(shell $(CROSS_COMPILE)gcc -print-sysroot)
97CLANG_CROSS_FLAGS += --gcc-toolchain=$(realpath $(GCC_TOOLCHAIN_DIR)/..)
98endif # GCC_TOOLCHAIN_DIR
99CFLAGS += $(CLANG_CROSS_FLAGS)
100AFLAGS += $(CLANG_CROSS_FLAGS)
101endif # CROSS_COMPILE

--- 70 unchanged lines hidden ---
94ifneq ($(GCC_TOOLCHAIN_DIR),)
95CLANG_CROSS_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE))
96CLANG_CROSS_FLAGS += --sysroot=$(shell $(CROSS_COMPILE)gcc -print-sysroot)
97CLANG_CROSS_FLAGS += --gcc-toolchain=$(realpath $(GCC_TOOLCHAIN_DIR)/..)
98endif # GCC_TOOLCHAIN_DIR
99CFLAGS += $(CLANG_CROSS_FLAGS)
100AFLAGS += $(CLANG_CROSS_FLAGS)
101endif # CROSS_COMPILE

--- 70 unchanged lines hidden ---