X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2FKbuild.include;h=4f5ff19b992b1f8a8db6f28a96cbace409db3baa;hb=1143e5a6d4d69cd36d44e0184769aa2b17041a10;hp=3d523899fdc05dc56e5a2eb6c18e88b26390d102;hpb=250d375d1da45a5e08ab8baf5eaa7eb258afd82b;p=pandora-kernel.git diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 3d523899fdc0..4f5ff19b992b 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -63,6 +63,13 @@ as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \ -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \ else echo "$(2)"; fi ;) +# as-instr +# Usage: cflags-y += $(call as-instr, instr, option1, option2) + +as-instr = $(shell if echo -e "$(1)" | $(AS) >/dev/null 2>&1 -W -Z -o astest$$$$.out ; \ + then echo "$(2)"; else echo "$(3)"; fi; \ + rm -f astest$$$$.out) + # cc-option # Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)