Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+48 -47
+3 -2
Documentation/kbuild/makefiles.txt
··· 424 424 as-instr checks if the assembler reports a specific instruction 425 425 and then outputs either option1 or option2 426 426 C escapes are supported in the test instruction 427 + Note: as-instr-option uses KBUILD_AFLAGS for $(AS) options 427 428 428 429 cc-option 429 430 cc-option is used to check if $(CC) supports a given option, and not ··· 820 819 In this example, the binary $(obj)/image is a binary version of 821 820 vmlinux. The usage of $(call if_changed,xxx) will be described later. 822 821 823 - AFLAGS $(AS) assembler flags 822 + KBUILD_AFLAGS $(AS) assembler flags 824 823 825 824 Default value - see top level Makefile 826 825 Append or modify as required per architecture. 827 826 828 827 Example: 829 828 #arch/sparc64/Makefile 830 - AFLAGS += -m64 -mcpu=ultrasparc 829 + KBUILD_AFLAGS += -m64 -mcpu=ultrasparc 831 830 832 831 KBUILD_CFLAGS $(CC) compiler flags 833 832
+4 -4
Makefile
··· 323 323 KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 324 324 -fno-strict-aliasing -fno-common \ 325 325 -Werror-implicit-function-declaration 326 - AFLAGS := -D__ASSEMBLY__ 326 + KBUILD_AFLAGS := -D__ASSEMBLY__ 327 327 328 328 # Read KERNELRELEASE from include/config/kernel.release (if it exists) 329 329 KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) ··· 336 336 337 337 export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS 338 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 341 # When compiling out-of-tree modules, put MODVERDIR in the module 342 342 # tree rather than in the kernel tree. The kernel tree might ··· 507 507 508 508 ifdef CONFIG_DEBUG_INFO 509 509 KBUILD_CFLAGS += -g 510 - AFLAGS += -gdwarf-2 510 + KBUILD_AFLAGS += -gdwarf-2 511 511 endif 512 512 513 513 # Force gcc to behave correct even for buggy distributions ··· 1502 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 1506 $(NOSTDINC_FLAGS) $(CPPFLAGS) \ 1507 1507 $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) 1508 1508
+1 -1
arch/arm/Makefile
··· 86 86 87 87 # Need -Uarm for gcc < 3.x 88 88 KBUILD_CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 89 - AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float 89 + KBUILD_AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float 90 90 91 91 CHECKFLAGS += -D__arm__ 92 92
+1 -1
arch/arm/vfp/Makefile
··· 7 7 # EXTRA_CFLAGS := -DDEBUG 8 8 # EXTRA_AFLAGS := -DDEBUG 9 9 10 - AFLAGS :=$(AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) 10 + KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) 11 11 LDFLAGS +=--no-warn-mismatch 12 12 13 13 obj-y += vfp.o
+2 -2
arch/avr32/Makefile
··· 12 12 KBUILD_DEFCONFIG := atstk1002_defconfig 13 13 14 14 KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic 15 - AFLAGS += -mrelax -mno-pic 15 + KBUILD_AFLAGS += -mrelax -mno-pic 16 16 CFLAGS_MODULE += -mno-relax 17 17 LDFLAGS_vmlinux += --relax 18 18 19 19 cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000 20 20 21 21 KBUILD_CFLAGS += $(cpuflags-y) 22 - AFLAGS += $(cpuflags-y) 22 + KBUILD_AFLAGS += $(cpuflags-y) 23 23 24 24 CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN 25 25
+1 -1
arch/blackfin/Makefile
··· 54 54 rev-$(CONFIG_BF_REV_ANY) := any 55 55 56 56 KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y) 57 - AFLAGS += -mcpu=$(cpu-y)-$(rev-y) 57 + KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y) 58 58 59 59 head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o 60 60
+1 -1
arch/cris/Makefile
··· 29 29 OBJCOPYFLAGS := -O binary -R .note -R .comment -S 30 30 31 31 CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) 32 - AFLAGS += -mlinux 32 + KBUILD_AFLAGS += -mlinux 33 33 34 34 KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe 35 35
+5 -5
arch/frv/Makefile
··· 63 63 64 64 ifdef CONFIG_CPU_FR451_COMPILE 65 65 KBUILD_CFLAGS += -mcpu=fr450 66 - AFLAGS += -mcpu=fr450 66 + KBUILD_AFLAGS += -mcpu=fr450 67 67 ASFLAGS += -mcpu=fr450 68 68 else 69 69 ifdef CONFIG_CPU_FR551_COMPILE 70 70 KBUILD_CFLAGS += -mcpu=fr550 71 - AFLAGS += -mcpu=fr550 71 + KBUILD_AFLAGS += -mcpu=fr550 72 72 ASFLAGS += -mcpu=fr550 73 73 else 74 74 KBUILD_CFLAGS += -mcpu=fr400 75 - AFLAGS += -mcpu=fr400 75 + KBUILD_AFLAGS += -mcpu=fr400 76 76 ASFLAGS += -mcpu=fr400 77 77 endif 78 78 endif ··· 82 82 # - all the extra registers are dealt with only at context switch time 83 83 KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media 84 84 KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 85 - AFLAGS += -mno-fdpic 85 + KBUILD_AFLAGS += -mno-fdpic 86 86 ASFLAGS += -mno-fdpic 87 87 88 88 # make sure the .S files get compiled with debug info 89 89 # and disable optimisations that are unhelpful whilst debugging 90 90 ifdef CONFIG_DEBUG_INFO 91 91 #KBUILD_CFLAGS += -O1 92 - AFLAGS += -Wa,--gdwarf2 92 + KBUILD_AFLAGS += -Wa,--gdwarf2 93 93 ASFLAGS += -Wa,--gdwarf2 94 94 endif 95 95
+1 -1
arch/h8300/Makefile
··· 35 35 KBUILD_CFLAGS += -g 36 36 KBUILD_CFLAGS += -D__linux__ 37 37 KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" 38 - AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) 38 + KBUILD_AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y) 39 39 LDFLAGS += $(ldflags-y) 40 40 41 41 CROSS_COMPILE = h8300-elf-
+3 -3
arch/i386/Makefile
··· 55 55 56 56 # do binutils support CFI? 57 57 cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 58 - AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 58 + KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 59 59 60 60 # is .cfi_signal_frame supported too? 61 61 cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 62 - AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 62 + KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 63 63 64 64 KBUILD_CFLAGS += $(cflags-y) 65 65 ··· 117 117 drivers-$(CONFIG_FB) += arch/x86/video/ 118 118 119 119 KBUILD_CFLAGS += $(mflags-y) 120 - AFLAGS += $(mflags-y) 120 + KBUILD_AFLAGS += $(mflags-y) 121 121 122 122 boot := arch/x86/boot 123 123
+1 -1
arch/m32r/Makefile
··· 25 25 aflags-$(CONFIG_ISA_M32R) += -DNO_FPU -O2 -Wa,-no-bitinst 26 26 27 27 KBUILD_CFLAGS += $(cflags-y) 28 - AFLAGS += $(aflags-y) 28 + KBUILD_AFLAGS += $(aflags-y) 29 29 30 30 CHECKFLAGS += -D__m32r__ -D__BIG_ENDIAN__=1 31 31
+1 -1
arch/m68knommu/Makefile
··· 102 102 cflags-$(CONFIG_M68VZ328) := -m68000 103 103 cflags-$(CONFIG_M68360) := -m68332 104 104 105 - AFLAGS += $(cflags-y) 105 + KBUILD_AFLAGS += $(cflags-y) 106 106 107 107 KBUILD_CFLAGS += $(cflags-y) 108 108 KBUILD_CFLAGS += -D__linux__
+1 -1
arch/mips/Makefile
··· 608 608 endif 609 609 endif 610 610 611 - AFLAGS += $(cflags-y) 611 + KBUILD_AFLAGS += $(cflags-y) 612 612 KBUILD_CFLAGS += $(cflags-y) \ 613 613 -D"VMLINUX_LOAD_ADDRESS=$(load-y)" 614 614
+2 -2
arch/powerpc/Makefile
··· 76 76 CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc 77 77 CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple 78 78 CPPFLAGS += $(CPPFLAGS-y) 79 - AFLAGS += $(AFLAGS-y) 79 + KBUILD_AFLAGS += $(AFLAGS-y) 80 80 KBUILD_CFLAGS += -msoft-float -pipe $(CFLAGS-y) 81 81 CPP = $(CC) -E $(KBUILD_CFLAGS) 82 82 ··· 125 125 cpu-as-$(CONFIG_E500) += -Wa,-me500 126 126 cpu-as-$(CONFIG_E200) += -Wa,-me200 127 127 128 - AFLAGS += $(cpu-as-y) 128 + KBUILD_AFLAGS += $(cpu-as-y) 129 129 KBUILD_CFLAGS += $(cpu-as-y) 130 130 131 131 head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o
+2 -2
arch/ppc/Makefile
··· 23 23 LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic 24 24 # The -Iarch/$(ARCH)/include is temporary while we are merging 25 25 CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include 26 - AFLAGS += -Iarch/$(ARCH) 26 + KBUILD_AFLAGS += -Iarch/$(ARCH) 27 27 KBUILD_CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ 28 28 -ffixed-r2 -mmultiple 29 29 ··· 45 45 cpu-as-$(CONFIG_E500) += -Wa,-me500 46 46 cpu-as-$(CONFIG_E200) += -Wa,-me200 47 47 48 - AFLAGS += $(cpu-as-y) 48 + KBUILD_AFLAGS += $(cpu-as-y) 49 49 KBUILD_CFLAGS += $(cpu-as-y) 50 50 51 51 # Default to the common case.
+3 -3
arch/s390/Makefile
··· 16 16 ifndef CONFIG_64BIT 17 17 LDFLAGS := -m elf_s390 18 18 KBUILD_CFLAGS += -m31 19 - AFLAGS += -m31 19 + KBUILD_AFLAGS += -m31 20 20 UTS_MACHINE := s390 21 21 STACK_SIZE := 8192 22 22 CHECKFLAGS += -D__s390__ -msize-long ··· 24 24 LDFLAGS := -m elf64_s390 25 25 MODFLAGS += -fpic -D__PIC__ 26 26 KBUILD_CFLAGS += -m64 27 - AFLAGS += -m64 27 + KBUILD_AFLAGS += -m64 28 28 UTS_MACHINE := s390x 29 29 STACK_SIZE := 16384 30 30 CHECKFLAGS += -D__s390__ -D__s390x__ ··· 79 79 80 80 KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y) 81 81 KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare 82 - AFLAGS += $(aflags-y) 82 + KBUILD_AFLAGS += $(aflags-y) 83 83 84 84 OBJCOPYFLAGS := -O binary 85 85 LDFLAGS_vmlinux := -e start
+1 -1
arch/sh/Makefile
··· 92 92 endif 93 93 94 94 KBUILD_CFLAGS += -pipe $(cflags-y) 95 - AFLAGS += $(cflags-y) 95 + KBUILD_AFLAGS += $(cflags-y) 96 96 97 97 head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o 98 98
+1 -1
arch/sparc/Makefile
··· 17 17 18 18 #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 19 19 KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 20 - AFLAGS := $(AFLAGS) -m32 20 + KBUILD_AFLAGS += -m32 21 21 22 22 #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 23 23 # Since 2.5.40, the first stage is left not btfix-ed.
+1 -1
arch/sparc64/Makefile
··· 45 45 KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \ 46 46 -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \ 47 47 $(CC_UNDECL) 48 - AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) 48 + KBUILD_AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) 49 49 endif 50 50 51 51 ifeq ($(CONFIG_MCOUNT),y)
+1 -1
arch/um/Makefile
··· 62 62 $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \ 63 63 -Din6addr_loopback=kernel_in6addr_loopback 64 64 65 - AFLAGS += $(ARCH_INCLUDE) 65 + KBUILD_AFLAGS += $(ARCH_INCLUDE) 66 66 67 67 USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ 68 68 $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \
+1 -1
arch/um/Makefile-i386
··· 16 16 ifeq ("$(origin SUBARCH)", "command line") 17 17 ifneq ("$(shell uname -m | sed -e s/i.86/i386/)", "$(SUBARCH)") 18 18 KBUILD_CFLAGS += $(call cc-option,-m32) 19 - AFLAGS += $(call cc-option,-m32) 19 + KBUILD_AFLAGS += $(call cc-option,-m32) 20 20 LINK-y += $(call cc-option,-m32) 21 21 UML_OBJCOPYFLAGS += -F $(ELF_FORMAT) 22 22
+1 -1
arch/um/Makefile-x86_64
··· 12 12 KBUILD_CFLAGS += $(_extra_flags_) 13 13 14 14 CHECKFLAGS += -m64 15 - AFLAGS += -m64 15 + KBUILD_AFLAGS += -m64 16 16 LDFLAGS += -m elf_x86_64 17 17 CPPFLAGS += -m64 18 18
+3 -3
arch/um/sys-ppc/Makefile
··· 1 1 OBJ = built-in.o 2 2 3 3 .S.o: 4 - $(CC) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 4 + $(CC) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 5 5 6 6 OBJS = ptrace.o sigcontext.o semaphore.o checksum.o miscthings.o misc.o \ 7 7 ptrace_user.o sysrq.o ··· 57 57 checksum.o: checksum.S 58 58 rm -f asm 59 59 ln -s $(TOPDIR)/include/asm-ppc asm 60 - $(CC) $(EXTRA_AFLAGS) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 60 + $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 61 61 rm -f asm 62 62 63 63 misc.o: misc.S ppc_defs.h 64 64 rm -f asm 65 65 ln -s $(TOPDIR)/include/asm-ppc asm 66 - $(CC) $(EXTRA_AFLAGS) $(AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 66 + $(CC) $(EXTRA_AFLAGS) $(KBUILD_AFLAGS) -D__ASSEMBLY__ -D__UM_PPC__ -c $< -o $*.o 67 67 rm -f asm 68 68 69 69 clean-files := $(OBJS) ppc_defs.h checksum.S semaphore.c mk_defs.c
+1 -1
arch/x86/boot/Makefile
··· 61 61 $(call cc-option, -fno-unit-at-a-time)) \ 62 62 $(call cc-option, -fno-stack-protector) \ 63 63 $(call cc-option, -mpreferred-stack-boundary=2) 64 - AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 64 + KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 65 65 66 66 $(obj)/zImage: IMAGE_OFFSET := 0x1000 67 67 $(obj)/zImage: EXTRA_AFLAGS := $(SVGA_MODE) $(RAMDISK)
+1 -1
arch/x86/boot/compressed/Makefile_64
··· 10 10 -fno-strict-aliasing -fPIC -mcmodel=small \ 11 11 $(call cc-option, -ffreestanding) \ 12 12 $(call cc-option, -fno-stack-protector) 13 - AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 13 + KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 14 14 LDFLAGS := -m elf_x86_64 15 15 16 16 LDFLAGS_vmlinux := -T
+3 -3
arch/x86_64/Makefile
··· 61 61 62 62 # do binutils support CFI? 63 63 cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 64 - AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 64 + KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) 65 65 66 66 # is .cfi_signal_frame supported too? 67 67 cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 68 - AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 68 + KBUILD_AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) 69 69 70 70 cflags-$(CONFIG_CC_STACKPROTECTOR) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector ) 71 71 cflags-$(CONFIG_CC_STACKPROTECTOR_ALL) += $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-x86_64-has-stack-protector.sh "$(CC)" -fstack-protector-all ) 72 72 73 73 KBUILD_CFLAGS += $(cflags-y) 74 74 CFLAGS_KERNEL += $(cflags-kernel-y) 75 - AFLAGS += -m64 75 + KBUILD_AFLAGS += -m64 76 76 77 77 head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o 78 78
+1 -1
scripts/Kbuild.include
··· 81 81 # Usage: cflags-y += $(call as-instr,instr,option1,option2) 82 82 83 83 as-instr = $(call try-run,\ 84 - echo -e "$(1)" | $(CC) $(AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3)) 84 + echo -e "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3)) 85 85 86 86 # cc-option 87 87 # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
+1 -1
scripts/Makefile.lib
··· 85 85 -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") 86 86 87 87 _c_flags = $(KBUILD_CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(basetarget).o) 88 - _a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) 88 + _a_flags = $(KBUILD_AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) 89 89 _cpp_flags = $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(@F)) 90 90 91 91 # If building the kernel in a separate objtree expand all occurrences