diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-06-06 10:45:37 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-06-06 10:45:37 -0700 |
| commit | 8dd06ef34b6e2f41b29fbf5fc1663780f2524285 (patch) | |
| tree | d59152f37ea7b36c3cf1778e20b85239f89c4e77 /scripts/Kconfig.include | |
| parent | 642aa86eaf8f1e6fe894f20fd7f12f0db52ee03c (diff) | |
| parent | d0ac7079d5fcaaaf3eb99c197a08ac1b399754f4 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 5.8 merge window.
Diffstat (limited to 'scripts/Kconfig.include')
| -rw-r--r-- | scripts/Kconfig.include | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include index d4adfbe42690..496d11c92c97 100644 --- a/scripts/Kconfig.include +++ b/scripts/Kconfig.include @@ -25,12 +25,16 @@ failure = $(if-success,$(1),n,y) # $(cc-option,<flag>) # Return y if the compiler supports <flag>, n otherwise -cc-option = $(success,$(CC) -Werror $(CLANG_FLAGS) $(1) -E -x c /dev/null -o /dev/null) +cc-option = $(success,$(CC) -Werror $(CLANG_FLAGS) $(1) -S -x c /dev/null -o /dev/null) # $(ld-option,<flag>) # Return y if the linker supports <flag>, n otherwise ld-option = $(success,$(LD) -v $(1)) +# $(as-instr,<instr>) +# Return y if the assembler supports <instr>, n otherwise +as-instr = $(success,printf "%b\n" "$(1)" | $(CC) $(CLANG_FLAGS) -c -x assembler -o /dev/null -) + # check if $(CC) and $(LD) exist $(error-if,$(failure,command -v $(CC)),compiler '$(CC)' not found) $(error-if,$(failure,command -v $(LD)),linker '$(LD)' not found) @@ -40,3 +44,10 @@ $(error-if,$(success, $(LD) -v | grep -q gold), gold linker '$(LD)' not supporte # gcc version including patch level gcc-version := $(shell,$(srctree)/scripts/gcc-version.sh $(CC)) + +# machine bit flags +# $(m32-flag): -m32 if the compiler supports it, or an empty string otherwise. +# $(m64-flag): -m64 if the compiler supports it, or an empty string otherwise. +cc-option-bit = $(if-success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null,$(1)) +m32-flag := $(cc-option-bit,-m32) +m64-flag := $(cc-option-bit,-m64) |
