aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2010-07-28 13:11:27 -0400
committerMichal Marek <mmarek@suse.cz>2010-08-03 08:09:45 -0400
commit80c00ba942ee39c9a95c06959223560400bbb86e (patch)
treec0ff9363d1e3ab372ae8ed1137b1d012c88e683a /Makefile
parent6588169d516560f68672e2928680b71c647b7806 (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--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3dbd62b0bcfe..7af9d5479461 100644
--- a/Makefile
+++ b/Makefile
@@ -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
356KBUILD_AFLAGS_KERNEL :=
357KBUILD_CFLAGS_KERNEL :=
356KBUILD_AFLAGS := -D__ASSEMBLY__ 358KBUILD_AFLAGS := -D__ASSEMBLY__
357KBUILD_AFLAGS_MODULE := -DMODULE 359KBUILD_AFLAGS_MODULE := -DMODULE
358KBUILD_CFLAGS_MODULE := -DMODULE 360KBUILD_CFLAGS_MODULE := -DMODULE
@@ -372,6 +374,7 @@ export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
372export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV 374export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV
373export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE 375export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
374export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE 376export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
377export 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
1483a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ 1486a_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