kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / Documentation / kbuild / makefiles.txt
index 71c602d61680d422694a81c08b0cd4f802e18e7c..802341abf702afc0195d7fdd97a63257050349f6 100644 (file)
@@ -928,11 +928,23 @@ When kbuild executes, the following steps are followed (roughly):
        $(CFLAGS_KERNEL) contains extra C compiler flags used to compile
        resident kernel code.
 
-    CFLAGS_MODULE      $(CC) options specific for modules
+    KBUILD_AFLAGS_MODULE   Options for $(AS) when building modules
 
-       $(CFLAGS_MODULE) contains extra C compiler flags used to compile code
-       for loadable kernel modules.
+       $(KBUILD_AFLAGS_MODULE) is used to add arch specific options that
+       are used for $(AS).
+       From commandline AFLAGS_MODULE shall be used (see kbuild.txt).
 
+    KBUILD_CFLAGS_MODULE   Options for $(CC) when building modules
+
+       $(KBUILD_CFLAGS_MODULE) is used to add arch specific options that
+       are used for $(CC).
+       From commandline CFLAGS_MODULE shall be used (see kbuild.txt).
+
+    KBUILD_LDFLAGS_MODULE   Options for $(LD) when linking modules
+
+       $(KBUILD_LDFLAGS_MODULE) is used to add arch specific options
+       used when linking modules. This is often a linker script.
+       From commandline LDFLAGS_MODULE shall be used (see kbuild.txt).
 
 --- 6.2 Add prerequisites to archprepare: