Skip to content

Commit

Permalink
kbuild: fix up CFLAGS usage
Browse files Browse the repository at this point in the history
Only in very rare cases is it needed to change CFLAGS
outside of arch/*/Makefile.
Fix up all wrong cases - in most cases
the use of EXTRA_CFLAGS is the only thing needed.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
  • Loading branch information
Sam Ravnborg committed Oct 14, 2007
1 parent e004982 commit 9a39e27
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion arch/parisc/math-emu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

# See arch/parisc/math-emu/README
CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \
EXTRA_CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \
-Wno-uninitialized -Wno-strict-prototypes -Wno-return-type \
-Wno-implicit-int

Expand Down
1 change: 0 additions & 1 deletion arch/ppc/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# modified by Cort (cort@cs.nmt.edu)
#

CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include
HOSTCFLAGS += -Iarch/$(ARCH)/boot/include

BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
Expand Down
3 changes: 1 addition & 2 deletions arch/x86/math-emu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
#DEBUG = -DDEBUGGING
DEBUG =
PARANOID = -DPARANOID
CFLAGS := $(CFLAGS) $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION)

EXTRA_CFLAGS := $(PARANOID) $(DEBUG) -fno-builtin $(MATH_EMULATION)
EXTRA_AFLAGS := $(PARANOID)

# From 'C' language sources:
Expand Down
5 changes: 2 additions & 3 deletions arch/xtensa/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
#


CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
EXTRA_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
HOSTFLAGS += -Iarch/$(ARCH)/boot/include

BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#")

export CFLAGS
export AFLAGS
export EXTRA_CFLAGS
export BIG_ENDIAN

subdir-y := lib
Expand Down

0 comments on commit 9a39e27

Please sign in to comment.