diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2010-07-28 13:11:27 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-08-03 08:09:45 -0400 |
commit | 80c00ba942ee39c9a95c06959223560400bbb86e (patch) | |
tree | c0ff9363d1e3ab372ae8ed1137b1d012c88e683a /Makefile | |
parent | 6588169d516560f68672e2928680b71c647b7806 (diff) |
kbuild: allow assignment to {A,C}FLAGS_KERNEL on the command line
It is now possible to assign options to AS and CC
on the command line - which is only used for built-in code.
{A,C}FLAGS_KERNEL was used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC without overriding
the original value.
Introduce a new set of variables KBUILD_{A,C}FLAGS_KERNEL
that is used by arch specific files and free up
{A,C}FLAGS_KERNEL so they can be assigned on
the command line.
All arch Makefiles that used the old variables has been updated.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -353,6 +353,8 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ | |||
353 | -Werror-implicit-function-declaration \ | 353 | -Werror-implicit-function-declaration \ |
354 | -Wno-format-security \ | 354 | -Wno-format-security \ |
355 | -fno-delete-null-pointer-checks | 355 | -fno-delete-null-pointer-checks |
356 | KBUILD_AFLAGS_KERNEL := | ||
357 | KBUILD_CFLAGS_KERNEL := | ||
356 | KBUILD_AFLAGS := -D__ASSEMBLY__ | 358 | KBUILD_AFLAGS := -D__ASSEMBLY__ |
357 | KBUILD_AFLAGS_MODULE := -DMODULE | 359 | KBUILD_AFLAGS_MODULE := -DMODULE |
358 | KBUILD_CFLAGS_MODULE := -DMODULE | 360 | KBUILD_CFLAGS_MODULE := -DMODULE |
@@ -372,6 +374,7 @@ export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS | |||
372 | export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV | 374 | export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV |
373 | export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE | 375 | export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE |
374 | export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE | 376 | export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE |
377 | export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL | ||
375 | 378 | ||
376 | # When compiling out-of-tree modules, put MODVERDIR in the module | 379 | # When compiling out-of-tree modules, put MODVERDIR in the module |
377 | # tree rather than in the kernel tree. The kernel tree might | 380 | # tree rather than in the kernel tree. The kernel tree might |
@@ -1481,6 +1484,7 @@ cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR) \ | |||
1481 | $(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*) | 1484 | $(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*) |
1482 | 1485 | ||
1483 | a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ | 1486 | a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ |
1487 | $(KBUILD_AFLAGS_KERNEL) \ | ||
1484 | $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(KBUILD_CPPFLAGS) \ | 1488 | $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(KBUILD_CPPFLAGS) \ |
1485 | $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) | 1489 | $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) |
1486 | 1490 | ||