Commit 363c90d1 authored by Sam Ravnborg's avatar Sam Ravnborg

kbuild: Allow architectures to change CPPFLAGS

In some cases (notably ia64) changes to CPPFLAGS is needed, and
relevant both for AS and CC. Make sure changes to CPPFLAGS propagate
back to CFLAGS and AFLAGS
parent 04389bcb
...@@ -223,9 +223,9 @@ AFLAGS_KERNEL = ...@@ -223,9 +223,9 @@ AFLAGS_KERNEL =
NOSTDINC_FLAGS = -nostdinc -iwithprefix include NOSTDINC_FLAGS = -nostdinc -iwithprefix include
CPPFLAGS := -D__KERNEL__ -Iinclude CPPFLAGS := -D__KERNEL__ -Iinclude
CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \ CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
-fno-strict-aliasing -fno-common -fno-strict-aliasing -fno-common
AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS) AFLAGS := -D__ASSEMBLY__
export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \ export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
CONFIG_SHELL TOPDIR HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ CONFIG_SHELL TOPDIR HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
...@@ -281,6 +281,10 @@ endif ...@@ -281,6 +281,10 @@ endif
include arch/$(ARCH)/Makefile include arch/$(ARCH)/Makefile
# Let architecture Makefiles change CPPFLAGS if needed
CFLAGS += $(CPPFLAGS) $(CFLAGS)
AFLAGS += $(CPPFLAGS) $(AFLAGS)
core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ core-y += kernel/ mm/ fs/ ipc/ security/ crypto/
SUBDIRS += $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ SUBDIRS += $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
......
...@@ -27,9 +27,8 @@ GCC_MINOR_VERSION=$(shell $(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | ...@@ -27,9 +27,8 @@ GCC_MINOR_VERSION=$(shell $(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' |
GAS_STATUS=$(shell arch/ia64/scripts/check-gas $(CC) $(OBJDUMP)) GAS_STATUS=$(shell arch/ia64/scripts/check-gas $(CC) $(OBJDUMP))
arch-cppflags := $(shell arch/ia64/scripts/toolchain-flags $(CC) $(LD) $(OBJDUMP)) CPPFLAGS += $(shell arch/ia64/scripts/toolchain-flags \
cflags-y += $(arch-cppflags) $(CC) $(LD) $(OBJDUMP))
AFLAGS += $(arch-cppflags)
ifeq ($(GAS_STATUS),buggy) ifeq ($(GAS_STATUS),buggy)
$(error Sorry, you need a newer version of the assember, one that is built from \ $(error Sorry, you need a newer version of the assember, one that is built from \
......
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