Commit 51a1145f authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Consistent use of [AC]FLAGS_KERNEL and MODFLAGS

We have
o CFLAGS_KERNEL: Additional flags for files compiled into vmlinux
o AFLAGS_KERNEL: Additional flags for files assembled into vmlinux
o MODFLAGS: Additonal flags for files compiled as module

For consistency, rename MODFLAGS to CFLAGS_MODULE, introduce
AFLAGS_MODULE but leave it empty for now.

While we're at, removing "MAKING_MODULES=1", nobody is using it.
parent 4936756d
...@@ -38,13 +38,15 @@ MAKEFILES = $(TOPDIR)/.config ...@@ -38,13 +38,15 @@ MAKEFILES = $(TOPDIR)/.config
GENKSYMS = /sbin/genksyms GENKSYMS = /sbin/genksyms
DEPMOD = /sbin/depmod DEPMOD = /sbin/depmod
MODFLAGS = -DMODULE MODFLAGS = -DMODULE
CFLAGS_MODULE = $(MODFLAGS)
AFLAGS_MODULE =
CFLAGS_KERNEL = CFLAGS_KERNEL =
AFLAGS_KERNEL = AFLAGS_KERNEL =
PERL = perl PERL = perl
export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \ export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS PERL CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS PERL
all: do-it-all all: do-it-all
...@@ -155,7 +157,9 @@ DRIVERS := $(DRIVERS-y) ...@@ -155,7 +157,9 @@ DRIVERS := $(DRIVERS-y)
include arch/$(ARCH)/Makefile include arch/$(ARCH)/Makefile
export CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL export CPPFLAGS
export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
...@@ -287,7 +291,7 @@ modules: $(patsubst %, _mod_%, $(SUBDIRS)) ...@@ -287,7 +291,7 @@ modules: $(patsubst %, _mod_%, $(SUBDIRS))
.PHONY: $(patsubst %, _mod_%, $(SUBDIRS)) .PHONY: $(patsubst %, _mod_%, $(SUBDIRS))
$(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER $(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
@$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules @$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(CFLAGS_MODULE)" AFLAGS="$(AFLAGS) $(AFLAGS_MODULE)" modules
# Install modules # Install modules
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
EXTRA_AFLAGS := -ansi EXTRA_AFLAGS := -ansi
ifeq ($(CONFIG_SOLARIS_EMUL),m) ifeq ($(CONFIG_SOLARIS_EMUL),m)
EXTRA_AFLAGS += $(MODFLAGS) EXTRA_AFLAGS += $(CFLAGS_MODULE) # FIXME
endif endif
solaris-objs := entry64.o fs.o misc.o signal.o systbl.o socket.o \ solaris-objs := entry64.o fs.o misc.o signal.o systbl.o socket.o \
......
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