mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
Merge tag 'kbuild-v5.18-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada: - Add new environment variables, USERCFLAGS and USERLDFLAGS to allow additional flags to be passed to user-space programs. - Fix missing fflush() bugs in Kconfig and fixdep - Fix a minor bug in the comment format of the .config file - Make kallsyms ignore llvm's local labels, .L* - Fix UAPI compile-test for cross-compiling with Clang - Extend the LLVM= syntax to support LLVM=<suffix> form for using a particular version of LLVm, and LLVM=<prefix> form for using custom LLVM in a particular directory path. - Clean up Makefiles * tag 'kbuild-v5.18-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: Make $(LLVM) more flexible kbuild: add --target to correctly cross-compile UAPI headers with Clang fixdep: use fflush() and ferror() to ensure successful write to files arch: syscalls: simplify uapi/kapi directory creation usr/include: replace extra-y with always-y certs: simplify empty certs creation in certs/Makefile certs: include certs/signing_key.x509 unconditionally kallsyms: ignore all local labels prefixed by '.L' kconfig: fix missing '# end of' for empty menu kconfig: add fflush() before ferror() check kbuild: replace $(if A,A,B) with $(or A,B) kbuild: Add environment variables for userprogs flags kbuild: unify cmd_copy and cmd_shipped
This commit is contained in:
@@ -52,11 +52,17 @@ define allow-override
|
||||
endef
|
||||
|
||||
ifneq ($(LLVM),)
|
||||
$(call allow-override,CC,clang)
|
||||
$(call allow-override,AR,llvm-ar)
|
||||
$(call allow-override,LD,ld.lld)
|
||||
$(call allow-override,CXX,clang++)
|
||||
$(call allow-override,STRIP,llvm-strip)
|
||||
ifneq ($(filter %/,$(LLVM)),)
|
||||
LLVM_PREFIX := $(LLVM)
|
||||
else ifneq ($(filter -%,$(LLVM)),)
|
||||
LLVM_SUFFIX := $(LLVM)
|
||||
endif
|
||||
|
||||
$(call allow-override,CC,$(LLVM_PREFIX)clang$(LLVM_SUFFIX))
|
||||
$(call allow-override,AR,$(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX))
|
||||
$(call allow-override,LD,$(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX))
|
||||
$(call allow-override,CXX,$(LLVM_PREFIX)clang++$(LLVM_SUFFIX))
|
||||
$(call allow-override,STRIP,$(LLVM_PREFIX)llvm-strip$(LLVM_SUFFIX))
|
||||
else
|
||||
# Allow setting various cross-compile vars or setting CROSS_COMPILE as a prefix.
|
||||
$(call allow-override,CC,$(CROSS_COMPILE)gcc)
|
||||
@@ -69,9 +75,9 @@ endif
|
||||
CC_NO_CLANG := $(shell $(CC) -dM -E -x c /dev/null | grep -Fq "__clang__"; echo $$?)
|
||||
|
||||
ifneq ($(LLVM),)
|
||||
HOSTAR ?= llvm-ar
|
||||
HOSTCC ?= clang
|
||||
HOSTLD ?= ld.lld
|
||||
HOSTAR ?= $(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX)
|
||||
HOSTCC ?= $(LLVM_PREFIX)clang$(LLVM_SUFFIX)
|
||||
HOSTLD ?= $(LLVM_PREFIX)ld.lld$(LLVM_SUFFIX)
|
||||
else
|
||||
HOSTAR ?= ar
|
||||
HOSTCC ?= gcc
|
||||
|
@@ -175,5 +175,5 @@ _ge-abspath = $(if $(is-executable),$(1))
|
||||
define get-executable-or-default
|
||||
$(if $($(1)),$(call _ge_attempt,$($(1)),$(1)),$(call _ge_attempt,$(2)))
|
||||
endef
|
||||
_ge_attempt = $(if $(get-executable),$(get-executable),$(call _gea_err,$(2)))
|
||||
_ge_attempt = $(or $(get-executable),$(call _gea_err,$(2)))
|
||||
_gea_err = $(if $(1),$(error Please set '$(1)' appropriately))
|
||||
|
Reference in New Issue
Block a user