summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2022-10-14 22:52:33 +0200
committerSimon Glass <sjg@chromium.org>2022-10-29 07:36:33 -0600
commit5bde2e06caba0f072d0d3788fafcedafd11ae28a (patch)
tree62037d4716b3e4167ad87f9c463edac596cbb374 /scripts
parent6792bd999b03bef74fc0762510f8a98eebb8c161 (diff)
downloadu-boot-5bde2e06caba0f072d0d3788fafcedafd11ae28a.tar.gz
tests: Build correct sandbox configuration on 32bit
Currently sandbox configuration defautls to 64bit and there is no automation for building 32bit sandbox on 32bit hosts. Use _LP64 macro as heuristic for detecting 64bit targets. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kconfig.include4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include
index dad5583451..b7598ca5d9 100644
--- a/scripts/Kconfig.include
+++ b/scripts/Kconfig.include
@@ -22,6 +22,10 @@ success = $(if-success,$(1),y,n)
# Return y if the compiler supports <flag>, n otherwise
cc-option = $(success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null)
+# $(cc-define,<macro>)
+# Return y if the compiler defines <macro>, n otherwise
+cc-define = $(success,$(CC) -dM -E -x c /dev/null | grep -q '^#define \<$(1)\>')
+
# $(ld-option,<flag>)
# Return y if the linker supports <flag>, n otherwise
ld-option = $(success,$(LD) -v $(1))