[MIPS] Change libgcc-style functions from lib-y to obj-y
[linux-drm-fsl-dcu.git] / Kbuild
diff --git a/Kbuild b/Kbuild
index 95d6a00bace08c0ac50b80356847d5f19f6dc55a..163f8cb020a489a5f62d3ca995702b5565bc94e3 100644 (file)
--- a/Kbuild
+++ b/Kbuild
@@ -2,6 +2,7 @@
 # Kbuild for top-level directory of the kernel
 # This file takes care of the following:
 # 1) Generate asm-offsets.h
+# 2) Check for missing system calls
 
 #####
 # 1) Generate asm-offsets.h
@@ -18,7 +19,7 @@ define sed-y
        "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"
 endef
 # Override default regexp for specific architectures
-sed-$(CONFIG_MIPS) := "/^@@@/s///p"
+sed-$(CONFIG_MIPS) := "/^@@@/{s/^@@@//; s/ \#.*\$$//; p;}"
 
 quiet_cmd_offsets = GEN     $@
 define cmd_offsets
@@ -28,7 +29,7 @@ define cmd_offsets
         echo "/*"; \
         echo " * DO NOT MODIFY."; \
         echo " *"; \
-        echo " * This file was generated by $(srctree)/Kbuild"; \
+        echo " * This file was generated by Kbuild"; \
         echo " *"; \
         echo " */"; \
         echo ""; \
@@ -46,3 +47,13 @@ $(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
        $(Q)mkdir -p $(dir $@)
        $(call cmd,offsets)
 
+#####
+# 2) Check for missing system calls
+#
+
+quiet_cmd_syscalls = CALL    $<
+      cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags)
+
+PHONY += missing-syscalls
+missing-syscalls: scripts/checksyscalls.sh FORCE
+       $(call cmd,syscalls)