diff options
author | Sam Ravnborg <sam@neptun.(none)> | 2007-10-15 15:59:31 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@neptun.(none)> | 2007-10-15 15:59:31 -0400 |
commit | 222d394d30e74bb7a2a65029fcea68107b0d0eb6 (patch) | |
tree | 1112c98d7edc51d1c6d5e9f3d826e29a42afd4da /Makefile | |
parent | 714055ede4ffd60933397d4b61d285d0dfc9ecaf (diff) |
kbuild: enable 'make AFLAGS=...' to add additional options to AS
The variable AFLAGS is a wellknown variable and the usage by
kbuild may result in unexpected behaviour.
On top of that several people over time has asked for a way to
pass in additional flags to gcc.
This patch replace use of AFLAGS with KBUILD_AFLAGS all over
the tree.
Patch was tested on following architectures:
alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -323,7 +323,7 @@ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) | |||
323 | KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ | 323 | KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ |
324 | -fno-strict-aliasing -fno-common \ | 324 | -fno-strict-aliasing -fno-common \ |
325 | -Werror-implicit-function-declaration | 325 | -Werror-implicit-function-declaration |
326 | AFLAGS := -D__ASSEMBLY__ | 326 | KBUILD_AFLAGS := -D__ASSEMBLY__ |
327 | 327 | ||
328 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) | 328 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) |
329 | KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) | 329 | KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) |
@@ -336,7 +336,7 @@ export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS | |||
336 | 336 | ||
337 | export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS | 337 | export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS |
338 | export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE | 338 | export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE |
339 | export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE | 339 | export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE |
340 | 340 | ||
341 | # When compiling out-of-tree modules, put MODVERDIR in the module | 341 | # When compiling out-of-tree modules, put MODVERDIR in the module |
342 | # tree rather than in the kernel tree. The kernel tree might | 342 | # tree rather than in the kernel tree. The kernel tree might |
@@ -507,7 +507,7 @@ endif | |||
507 | 507 | ||
508 | ifdef CONFIG_DEBUG_INFO | 508 | ifdef CONFIG_DEBUG_INFO |
509 | KBUILD_CFLAGS += -g | 509 | KBUILD_CFLAGS += -g |
510 | AFLAGS += -gdwarf-2 | 510 | KBUILD_AFLAGS += -gdwarf-2 |
511 | endif | 511 | endif |
512 | 512 | ||
513 | # Force gcc to behave correct even for buggy distributions | 513 | # Force gcc to behave correct even for buggy distributions |
@@ -1502,7 +1502,7 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)) | |||
1502 | cmd_rmfiles = rm -f $(rm-files) | 1502 | cmd_rmfiles = rm -f $(rm-files) |
1503 | 1503 | ||
1504 | 1504 | ||
1505 | a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(AFLAGS_KERNEL) \ | 1505 | a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ |
1506 | $(NOSTDINC_FLAGS) $(CPPFLAGS) \ | 1506 | $(NOSTDINC_FLAGS) $(CPPFLAGS) \ |
1507 | $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) | 1507 | $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) |
1508 | 1508 | ||