aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Kconfig.include
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Kconfig.include')
-rw-r--r--scripts/Kconfig.include9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include
index 4bbf4fc163a2..e9551628ca6c 100644
--- a/scripts/Kconfig.include
+++ b/scripts/Kconfig.include
@@ -25,7 +25,7 @@ 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
@@ -37,3 +37,10 @@ $(error-if,$(failure,command -v $(LD)),linker '$(LD)' not found)
# 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)