mqueue: apply mathematics distributivity on mq_bytes calculation
[safe/jmp/linux-2.6] / Documentation / kbuild / makefiles.txt
index d4b0567..71c602d 100644 (file)
@@ -18,6 +18,7 @@ This document describes the Linux kernel Makefiles.
           --- 3.9 Dependency tracking
           --- 3.10 Special Rules
           --- 3.11 $(CC) support functions
+          --- 3.12 $(LD) support functions
 
        === 4 Host Program support
           --- 4.1 Simple Host Program
@@ -316,6 +317,16 @@ more details, with real examples.
                #arch/m68k/fpsp040/Makefile
                ldflags-y := -x
 
+    subdir-ccflags-y, subdir-asflags-y
+       The two flags listed above are similar to ccflags-y and as-falgs-y.
+       The difference is that the subdir- variants has effect for the kbuild
+       file where tey are present and all subdirectories.
+       Options specified using subdir-* are added to the commandline before
+       the options specified using the non-subdir variants.
+
+       Example:
+               subdir-ccflags-y := -Werror
+
     CFLAGS_$@, AFLAGS_$@
 
        CFLAGS_$@ and AFLAGS_$@ only apply to commands in current
@@ -425,14 +436,14 @@ more details, with real examples.
        The second argument is optional, and if supplied will be used
        if first argument is not supported.
 
-    ld-option
-       ld-option is used to check if $(CC) when used to link object files
+    cc-ldoption
+       cc-ldoption is used to check if $(CC) when used to link object files
        supports the given option.  An optional second option may be
        specified if first option are not supported.
 
        Example:
                #arch/i386/kernel/Makefile
-               vsyscall-flags += $(call ld-option, -Wl$(comma)--hash-style=sysv)
+               vsyscall-flags += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
 
        In the above example, vsyscall-flags will be assigned the option
        -Wl$(comma)--hash-style=sysv if it is supported by $(CC).
@@ -560,6 +571,19 @@ more details, with real examples.
                        endif
                endif
 
+--- 3.12 $(LD) support functions
+
+    ld-option
+       ld-option is used to check if $(LD) supports the supplied option.
+       ld-option takes two options as arguments.
+       The second argument is an optional option that can be used if the
+       first option is not supported by $(LD).
+
+       Example:
+               #Makefile
+               LDFLAGS_vmlinux += $(call really-ld-option, -X)
+
+
 === 4 Host Program support
 
 Kbuild supports building executables on the host for use during the