1
     ˆÄÃ„q¶Dï¿Æ ?÷     # SPDX-License-Identifier: GPL-2.0-only
config CC_VERSION_TEXT
	string
	default "$(CC_VERSION_TEXT)"
	help
	  This is used in unclear ways:

	  - Re-run Kconfig when the compiler is updated
	    The 'default' property references the environment variable,
	    CC_VERSION_TEXT so it is recorded in include/config/auto.conf.cmd.
	    When the compiler is updated, Kconfig will be invoked.

	  - Ensure full rebuild when the compiler is updated
	    include/linux/compiler-version.h contains this option in the comment
	    line so fixdep adds include/config/CC_VERSION_TEXT into the
	    auto-generated dependency. When the compiler is updated, syncconfig
	    will touch it and then every file will be rebuilt.

config CC_IS_GCC
	def_bool $(success,test "$(cc-name)" = GCC)

config GCC_VERSION
	int
	default $(cc-version) if CC_IS_GCC
	default 0

config CC_IS_CLANG
	def_bool $(success,test "$(cc-name)" = Clang)

config CLANG_VERSION
	int
	default $(cc-version) if CC_IS_CLANG
	default 0

config AS_IS_GNU
	def_bool $(success,test "$(as-name)" = GNU)

config AS_IS_LLVM
	def_bool $(success,test "$(as-name)" = LLVM)

config AS_VERSION
	int
	# Use clang version if this is the integrated assembler
	default CLANG_VERSION if AS_IS_LLVM
	default $(as-version)

config LD_IS_BFD
	def_bool $(success,test "$(ld-name)" = BFD)

config LD_VERSION
	int
	default $(ld-version) if LD_IS_BFD
	default 0

config LD_IS_LLD
	def_bool $(success,test "$(ld-name)" = LLD)

config LLD_VERSION
	int
	default $(ld-version) if LD_IS_LLD
	default 0

config CC_CAN_LINK
	bool
	default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag)) if 64BIT
	default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag))

config CC_CAN_LINK_STATIC
	bool
	default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag) -static) if 64BIT
	default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag) -static)

# Fixed in GCC 14, 13.3, 12.4 and 11.5
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921
config GCC_ASM_GOTO_OUTPUT_BROKEN
	bool
	depends on CC_IS_GCC
	default y if GCC_VERSION < 110500
	default y if GCC_VERSION >= 120000 && GCC_VERSION < 120400
	default y if GCC_VERSION >= 130000 && GCC_VERSION < 130300

config CC_HAS_ASM_GOTO_OUTPUT
	def_bool y
	depends on !GCC_ASM_GOTO_OUTPUT_BROKEN
	depends on $(success,echo 'int foo(int x) { asm goto ("": "=r"(x) ::: bar); return x; bar: return 0; }' | $(CC) -x c - -c -o /dev/null)

config CC_HAS_ASM_GOTO_TIED_OUTPUT
	depends on CC_HAS_ASM_GOTO_OUTPUT
	# Detect buggy gcc and clang, fixed in gcc-11 clang-14.
	def_bool $(success,echo 'int foo(int *x) { asm goto (".long (%l[bar]) - .": "+m"(*x) ::: bar); return *x; bar: return 0; }' | $CC -x c - -c -o /dev/null)

config TOOLS_SUPPORT_RELR
	def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)

config CC_HAS_ASM_INLINE
	def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null)

config CC_HAS_NO_PROFILE_FN_ATTR
	def_bool $(success,echo '__attribute__((no_profile_instrument_function)) int x();' | $(CC) -x c - -c -o /dev/null -Werror)

config PAHOLE_VERSION
	int
	default $(shell,$(srctree)/scripts/pahole-version.sh $(PAHOLE))

config CONSTRUCTORS
	bool

config IRQ_WORK
	def_bool y if SMP

config BUILDTIME_TABLE_SORT
	bool

config THREAD_INFO_IN_TASK
	bool
	help
	  Select this to move thread_info off the stack into task_struct.  To
	  make this work, an arch will need to remove all thread_info fields
	  except flags and fix any runtime bugs.

	  One subtle change that will be needed is to use try_get_task_stack()
	  and put_task_stack() in save_thread_stack_tsk() and get_wchan().

menu "General setup"

config BROKEN
	bool

config BROKEN_ON_SMP
	bool
	depends on BROKEN || !SMP
	default y

config INIT_ENV_ARG_LIMIT
	int
	default 32 if !UML
	default 128 if UML
	help