diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2010-07-28 11:33:09 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-08-03 08:09:45 -0400 |
commit | 6588169d516560f68672e2928680b71c647b7806 (patch) | |
tree | 91b20bf9197c718ff4b5830bb1aea0b1bc0de272 /Documentation/kbuild | |
parent | d6f4ceb796ebf1a8c8a9ad4a8ea0d181aaec7de6 (diff) |
kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
It is now possible to assign options to AS, CC and LD
on the command line - which is only used when building modules.
{A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC, LD when building modules
without overriding the original value.
Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
that is used by arch specific files and free up
{A,C,LD}FLAGS_MODULE so they can be assigned on
the command line.
All arch Makefiles that used the old variables has been updated.
Note: Previously we had a MODFLAGS variable for both
AS and CC. But in favour of consistency this was dropped.
So in some cases arch Makefile has one assignmnet replaced by
two assignmnets.
Note2: MODFLAGS was not documented and is dropped
without any notice. I do not expect much/any breakage
from this.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'Documentation/kbuild')
-rw-r--r-- | Documentation/kbuild/kbuild.txt | 16 | ||||
-rw-r--r-- | Documentation/kbuild/makefiles.txt | 18 |
2 files changed, 29 insertions, 5 deletions
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index 634c625da8ce..d9c655433ec6 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt | |||
@@ -22,11 +22,23 @@ building C files and assembler files. | |||
22 | 22 | ||
23 | KAFLAGS | 23 | KAFLAGS |
24 | -------------------------------------------------- | 24 | -------------------------------------------------- |
25 | Additional options to the assembler. | 25 | Additional options to the assembler (for built-in and modules). |
26 | |||
27 | AFLAGS_MODULE | ||
28 | -------------------------------------------------- | ||
29 | Addtional module specific options to use for $(AS). | ||
26 | 30 | ||
27 | KCFLAGS | 31 | KCFLAGS |
28 | -------------------------------------------------- | 32 | -------------------------------------------------- |
29 | Additional options to the C compiler. | 33 | Additional options to the C compiler (for built-in and modules). |
34 | |||
35 | CFLAGS_MODULE | ||
36 | -------------------------------------------------- | ||
37 | Addtional module specific options to use for $(CC). | ||
38 | |||
39 | LDFLAGS_MODULE | ||
40 | -------------------------------------------------- | ||
41 | Additional options used for $(LD) when linking modules. | ||
30 | 42 | ||
31 | KBUILD_VERBOSE | 43 | KBUILD_VERBOSE |
32 | -------------------------------------------------- | 44 | -------------------------------------------------- |
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 71c602d61680..802341abf702 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
@@ -928,11 +928,23 @@ When kbuild executes, the following steps are followed (roughly): | |||
928 | $(CFLAGS_KERNEL) contains extra C compiler flags used to compile | 928 | $(CFLAGS_KERNEL) contains extra C compiler flags used to compile |
929 | resident kernel code. | 929 | resident kernel code. |
930 | 930 | ||
931 | CFLAGS_MODULE $(CC) options specific for modules | 931 | KBUILD_AFLAGS_MODULE Options for $(AS) when building modules |
932 | 932 | ||
933 | $(CFLAGS_MODULE) contains extra C compiler flags used to compile code | 933 | $(KBUILD_AFLAGS_MODULE) is used to add arch specific options that |
934 | for loadable kernel modules. | 934 | are used for $(AS). |
935 | From commandline AFLAGS_MODULE shall be used (see kbuild.txt). | ||
935 | 936 | ||
937 | KBUILD_CFLAGS_MODULE Options for $(CC) when building modules | ||
938 | |||
939 | $(KBUILD_CFLAGS_MODULE) is used to add arch specific options that | ||
940 | are used for $(CC). | ||
941 | From commandline CFLAGS_MODULE shall be used (see kbuild.txt). | ||
942 | |||
943 | KBUILD_LDFLAGS_MODULE Options for $(LD) when linking modules | ||
944 | |||
945 | $(KBUILD_LDFLAGS_MODULE) is used to add arch specific options | ||
946 | used when linking modules. This is often a linker script. | ||
947 | From commandline LDFLAGS_MODULE shall be used (see kbuild.txt). | ||
936 | 948 | ||
937 | --- 6.2 Add prerequisites to archprepare: | 949 | --- 6.2 Add prerequisites to archprepare: |
938 | 950 | ||