aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-23 11:44:14 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-23 11:44:14 +0000
commit1c747b32c752e927cd37d8b39246992d4eec3904 (patch)
tree978b9a6ffc08cf83028e15eb2c7327cf32a99142 /scripts
parent82f8788acc1705a735cfa752b3f37b0de32ba390 (diff)
downloadbusybox-1c747b32c752e927cd37d8b39246992d4eec3904.tar.gz
- add hostcc-option checker
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index a7fb4d521..c6599c8f5 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -61,6 +61,12 @@ as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \
cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
+# hostcc-option
+# Usage: hostcflags-y += $(call hostcc-option, -march=winchip-c6, -march=i586)
+
+hostcc-option = $(shell if $(HOSTCC) $(HOSTCFLAGS) $(1) -S -o /dev/null -xc /dev/null \
+ > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
+
# cc-option-yn
# Usage: flag := $(call cc-option-yn, -march=winchip-c6)
cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \