- add hostcc-option checker
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 23 Jan 2007 11:44:14 +0000 (11:44 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 23 Jan 2007 11:44:14 +0000 (11:44 -0000)
scripts/Kbuild.include

index a7fb4d521255ec0310341a81afc4a11382689db5..c6599c8f53e9e5353885668efac69ed113c58de1 100644 (file)
@@ -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 \