Commit b610b978 authored by David Gibson's avatar David Gibson Committed by Paul Mackerras

[POWERPC] Don't use HOSTCFLAGS in BOOTCFLAGS

In the bootwrapper code for powerpc, we include HOSTCFLAGS into the
BOOTCFLAGS used for building the zImage wrapper code.  Since the
wrapper code is not host code, this makes no sense.  This patch
removes the use of HOSTCFLAGS here, instead including directly into
BOOTCFLAGS those flags from the normal kernel CFLAGS which also make
sense in the bootwrapper code.

In particular, this makes the bootwrapper use -msoft-float, preventing
the compiler from generating floating point instructions.  Previously,
under some circumstances the compiler could generate floating point
instructions in the bootwrapper which would cause exceptions on
embedded CPUS which don't have floating point support.
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
Acked-by: default avatarJosh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 0570d4ed
...@@ -11,20 +11,18 @@ ...@@ -11,20 +11,18 @@
# bootloader and increase compatibility with OpenFirmware. # bootloader and increase compatibility with OpenFirmware.
# #
# To this end we need to define BOOTCC, etc, as the tools # To this end we need to define BOOTCC, etc, as the tools
# needed to build the 32 bit image. These are normally HOSTCC, # needed to build the 32 bit image. That's normally the same
# but may be a third compiler if, for example, you are cross # compiler for the rest of the kernel, with the -m32 flag added.
# compiling from an intel box. Once the 64bit ppc gcc is
# stable it will probably simply be a compiler switch to
# compile for 32bit mode.
# To make it easier to setup a cross compiler, # To make it easier to setup a cross compiler,
# CROSS32_COMPILE is setup as a prefix just like CROSS_COMPILE # CROSS32_COMPILE is setup as a prefix just like CROSS_COMPILE
# in the toplevel makefile. # in the toplevel makefile.
all: $(obj)/zImage all: $(obj)/zImage
HOSTCC := gcc BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
BOOTCFLAGS := $(HOSTCFLAGS) -fno-builtin -nostdinc -isystem \ -fno-strict-aliasing -Os -msoft-float -pipe \
$(shell $(CROSS32CC) -print-file-name=include) -fPIC -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
-isystem $(shell $(CROSS32CC) -print-file-name=include)
BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
ifeq ($(call cc-option-yn, -fstack-protector),y) ifeq ($(call cc-option-yn, -fstack-protector),y)
......
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