summaryrefslogtreecommitdiffstats
path: root/scripts/Kbuild.klibc.include
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Kbuild.klibc.include')
-rw-r--r--scripts/Kbuild.klibc.include11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/Kbuild.klibc.include b/scripts/Kbuild.klibc.include
new file mode 100644
index 0000000..b317286
--- /dev/null
+++ b/scripts/Kbuild.klibc.include
@@ -0,0 +1,11 @@
+
+# klibc-cc-option
+# Usage: cflags-y += $(call klibc-cc-option,-march=winchip-c6,-march=i586)
+
+klibc-cc-option = $(call try-run,\
+ $(CC) $(KLIBCCPPFLAGS) $(KLIBCCFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
+
+# klibc-cc-option-yn
+# Usage: flag := $(call klibc-cc-option-yn,-march=winchip-c6)
+klibc-cc-option-yn = $(call try-run,\
+ $(CC) $(KLIBCCPPFLAGS) $(KLIBCCFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)