Commit c36b8ba9 authored by Kai Germaschewski's avatar Kai Germaschewski

Make AFLAGS_KERNEL use consistent with CFLAGS_KERNEL

CFLAGS_KERNEL is automatically added to the command line for compiling
objects which will be linked into vmlinux. (As opposed to objects which
will be in modules, where MODFLAGS is added).

AFLAGS_KERNEL was not added automatically, now it is:

AFLAGS_KERNEL is now automatically added to the command line for assembling
objects which will be linked into vmlinux.

Note: this change is a no-op for all archs except IA64, since
[AC]FLAGS_KERNEL is not used there at all.

At the same time, remove two assembling rules from two arch/ia64 
subdirectories which don't contain any assembler sources at all.

Also, add an @ in front of the ugly
	make CFLAGS=".." AFLAGS=".." -C subdir
command, make will print its "Entering directory ..." line, so 
we get that information anyway.
parent 79455a34
...@@ -39,6 +39,7 @@ GENKSYMS = /sbin/genksyms ...@@ -39,6 +39,7 @@ GENKSYMS = /sbin/genksyms
DEPMOD = /sbin/depmod DEPMOD = /sbin/depmod
MODFLAGS = -DMODULE MODFLAGS = -DMODULE
CFLAGS_KERNEL = CFLAGS_KERNEL =
AFLAGS_KERNEL =
PERL = perl PERL = perl
export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \ export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
...@@ -245,7 +246,7 @@ Version: dummy ...@@ -245,7 +246,7 @@ Version: dummy
@rm -f include/linux/compile.h @rm -f include/linux/compile.h
boot: vmlinux boot: vmlinux
@$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" AFLAGS="$(AFLAGS) $(AFLAGS_KERNEL)" -C arch/$(ARCH)/boot
vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o init/do_mounts.o linuxsubdirs vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o init/do_mounts.o linuxsubdirs
$(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o init/do_mounts.o \ $(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o init/do_mounts.o \
...@@ -286,7 +287,7 @@ include/config/MARKER: scripts/split-include include/linux/autoconf.h ...@@ -286,7 +287,7 @@ include/config/MARKER: scripts/split-include include/linux/autoconf.h
linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS)) linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER $(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@) @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" AFLAGS="$(AFLAGS) $(AFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
$(TOPDIR)/include/linux/version.h: include/linux/version.h $(TOPDIR)/include/linux/version.h: include/linux/version.h
$(TOPDIR)/include/linux/compile.h: include/linux/compile.h $(TOPDIR)/include/linux/compile.h: include/linux/compile.h
...@@ -331,7 +332,7 @@ init/do_mounts.o: init/do_mounts.c include/config/MARKER ...@@ -331,7 +332,7 @@ init/do_mounts.o: init/do_mounts.c include/config/MARKER
$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $< $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $<
fs lib mm ipc kernel drivers net sound: dummy fs lib mm ipc kernel drivers net sound: dummy
$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@) @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" AFLAGS="$(AFLAGS) $(AFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
TAGS: dummy TAGS: dummy
{ find include/asm-${ARCH} -name '*.h' -print ; \ { find include/asm-${ARCH} -name '*.h' -print ; \
......
...@@ -10,11 +10,6 @@ ...@@ -10,11 +10,6 @@
LINKFLAGS = -static -T bootloader.lds LINKFLAGS = -static -T bootloader.lds
.S.s:
$(CPP) $(AFLAGS) -traditional -o $*.o $<
.S.o:
$(CC) $(AFLAGS) -traditional -c -o $*.o $<
OBJECTS = bootloader.o OBJECTS = bootloader.o
targets-$(CONFIG_IA64_HP_SIM) += bootloader targets-$(CONFIG_IA64_HP_SIM) += bootloader
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
# Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com) # Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com)
# #
USE_STANDARD_AS_RULE := true
all: dig.a all: dig.a
O_TARGET := dig.a O_TARGET := dig.a
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
USE_STANDARD_AS_RULE := true USE_STANDARD_AS_RULE := true
EXTRA_AFLAGS := $(AFLAGS_KERNEL)
all: ia32.o all: ia32.o
O_TARGET := ia32.o O_TARGET := ia32.o
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
USE_STANDARD_AS_RULE := true USE_STANDARD_AS_RULE := true
EXTRA_AFLAGS := $(AFLAGS_KERNEL)
all: kernel.o head.o init_task.o all: kernel.o head.o init_task.o
O_TARGET := kernel.o O_TARGET := kernel.o
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
USE_STANDARD_AS_RULE := true USE_STANDARD_AS_RULE := true
EXTRA_AFLAGS := $(AFLAGS_KERNEL)
L_TARGET = lib.a L_TARGET = lib.a
export-objs := io.o swiotlb.o export-objs := io.o swiotlb.o
...@@ -26,27 +24,27 @@ IGNORE_FLAGS_OBJS = __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \ ...@@ -26,27 +24,27 @@ IGNORE_FLAGS_OBJS = __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \
$(L_TARGET): $(obj-y) $(export-objs) $(L_TARGET): $(obj-y) $(export-objs)
__divdi3.o: idiv64.S __divdi3.o: idiv64.S
$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -o $@ $< $(CC) $(AFLAGS) -c -o $@ $<
__udivdi3.o: idiv64.S __udivdi3.o: idiv64.S
$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DUNSIGNED -c -o $@ $< $(CC) $(AFLAGS) -c -DUNSIGNED -c -o $@ $<
__moddi3.o: idiv64.S __moddi3.o: idiv64.S
$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DMODULO -c -o $@ $< $(CC) $(AFLAGS) -c -DMODULO -c -o $@ $<
__umoddi3.o: idiv64.S __umoddi3.o: idiv64.S
$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DMODULO -DUNSIGNED -c -o $@ $< $(CC) $(AFLAGS) -c -DMODULO -DUNSIGNED -c -o $@ $<
__divsi3.o: idiv32.S __divsi3.o: idiv32.S
$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -o $@ $< $(CC) $(AFLAGS) -c -o $@ $<
__udivsi3.o: idiv32.S __udivsi3.o: idiv32.S
$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DUNSIGNED -c -o $@ $< $(CC) $(AFLAGS) -c -DUNSIGNED -c -o $@ $<
__modsi3.o: idiv32.S __modsi3.o: idiv32.S
$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DMODULO -c -o $@ $< $(CC) $(AFLAGS) -c -DMODULO -c -o $@ $<
__umodsi3.o: idiv32.S __umodsi3.o: idiv32.S
$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -c -DMODULO -DUNSIGNED -c -o $@ $< $(CC) $(AFLAGS) -c -DMODULO -DUNSIGNED -c -o $@ $<
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
USE_STANDARD_AS_RULE := true USE_STANDARD_AS_RULE := true
EXTRA_AFLAGS := $(AFLAGS_KERNEL)
TOPDIR=../../../.. TOPDIR=../../../..
HPATH = $(TOPDIR)/include HPATH = $(TOPDIR)/include
......
...@@ -33,8 +33,6 @@ ...@@ -33,8 +33,6 @@
USE_STANDARD_AS_RULE := true USE_STANDARD_AS_RULE := true
EXTRA_AFLAGS := $(AFLAGS_KERNEL)
EXTRA_CFLAGS := -DLITTLE_ENDIAN EXTRA_CFLAGS := -DLITTLE_ENDIAN
O_TARGET = sn.o O_TARGET = sn.o
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
USE_STANDARD_AS_RULE := true USE_STANDARD_AS_RULE := true
EXTRA_AFLAGS := $(AFLAGS_KERNEL)
EXTRA_CFLAGS := -DLITTLE_ENDIAN EXTRA_CFLAGS := -DLITTLE_ENDIAN
all: sn1.a all: sn1.a
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
USE_STANDARD_AS_RULE := true USE_STANDARD_AS_RULE := true
EXTRA_AFLAGS := $(AFLAGS_KERNEL)
EXTRA_CFLAGS := -DLITTLE_ENDIAN EXTRA_CFLAGS := -DLITTLE_ENDIAN
all: sn2.a all: sn2.a
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment