Skip to content

Commit

Permalink
Makefile: fix up CROSS_COMPILE and READABLE_ASM interaction.
Browse files Browse the repository at this point in the history
When the READABLE_ASM cc-option tests were added they were done so prior
to the arch Makefile include, resulting in cc-option being run on the
host cc instead of the factoring in the cross prefix set up by the
architecture.

This bumps the include back up so that cc-option actually runs on the
compiler that we're building with.

Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Paul Mundt authored and Linus Torvalds committed Jun 18, 2012
1 parent 39a50b4 commit a1f42be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,8 @@ else
KBUILD_CFLAGS += -O2
endif

include $(srctree)/arch/$(SRCARCH)/Makefile

ifdef CONFIG_READABLE_ASM
# Disable optimizations that make assembler listings hard to read.
# reorder blocks reorders the control in the function
Expand All @@ -571,8 +573,6 @@ KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
$(call cc-option,-fno-partial-inlining)
endif

include $(srctree)/arch/$(SRCARCH)/Makefile

ifneq ($(CONFIG_FRAME_WARN),0)
KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
endif
Expand Down

0 comments on commit a1f42be

Please sign in to comment.