From: Scott Wood <scottwood@freescale.com>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH 02/18] bootwrapper: Set -msoft-float and assembler target options.
Date: Mon, 29 Jan 2007 14:40:37 -0600 [thread overview]
Message-ID: <20070129204037.GA14087@ld0162-tx32.am.freescale.net> (raw)
In-Reply-To: <20070129201154.GB13485@ld0162-tx32.am.freescale.net>
Without -msoft-float, floating point state saving code can be executed
(at least with certain buggy versions of GCC, which don't clear bit 6 of
CR before calling a varargs function with no varargs parameters).
Without the assembler target option, the assembler will use the old
dedicated mftb/mftbu instructions, rather than mfspr. This causes the
boot to hang on e500, which doesn't have the dedicated instructions.
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
Oops, I accidentally had -msoft-float in there twice for the bootwrapper
(once from PLATFORM_CFLAGS, and once directly specified). This fixes it.
arch/powerpc/Makefile | 10 +++++++---
arch/powerpc/boot/Makefile | 6 ++++--
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index a00fe72..8e93565 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -69,7 +69,7 @@ CFLAGS-$(CONFIG_PPC64) := -mminimal-toc
CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple
CPPFLAGS += $(CPPFLAGS-y)
AFLAGS += $(AFLAGS-y)
-CFLAGS += -msoft-float -pipe $(CFLAGS-y)
+CFLAGS += -pipe $(CFLAGS-y)
CPP = $(CC) -E $(CFLAGS)
# Temporary hack until we have migrated to asm-powerpc
LINUXINCLUDE-$(CONFIG_PPC32) := -Iarch/$(ARCH)/include
@@ -116,8 +116,12 @@ cpu-as-$(CONFIG_POWER4) += -Wa,-maltive
cpu-as-$(CONFIG_E500) += -Wa,-me500
cpu-as-$(CONFIG_E200) += -Wa,-me200
-AFLAGS += $(cpu-as-y)
-CFLAGS += $(cpu-as-y)
+PLATFORM_AFLAGS += $(cpu-as-y)
+PLATFORM_CFLAGS += $(cpu-as-y) -msoft-float
+export PLATFORM_AFLAGS PLATFORM_CFLAGS
+
+AFLAGS += $(PLATFORM_AFLAGS)
+CFLAGS += $(PLATFORM_CFLAGS)
head-y := arch/powerpc/kernel/head_32.o
head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 98392fb..df92f06 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -24,8 +24,10 @@ all: $(obj)/zImage
HOSTCC := gcc
BOOTCFLAGS := $(HOSTCFLAGS) -fno-builtin -nostdinc -isystem \
- $(shell $(CROSS32CC) -print-file-name=include) -fPIC
-BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
+ $(shell $(CROSS32CC) -print-file-name=include) -fPIC \
+ $(PLATFORM_CFLAGS)
+BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc \
+ $(PLATFORM_AFLAGS)
ifeq ($(call cc-option-yn, -fstack-protector),y)
BOOTCFLAGS += -fno-stack-protector
--
1.4.4
next prev parent reply other threads:[~2007-01-29 20:40 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ca1ac163-f732-45ce-9629-e6f4a8c3a880@ld0162-tx32.am.freescale.net>
2007-01-29 20:11 ` [PATCH 02/18] bootwrapper: Set -msoft-float and assembler target options Scott Wood
2007-01-29 20:40 ` Scott Wood [this message]
2007-01-30 19:42 ` Segher Boessenkool
2007-01-29 20:11 ` [PATCH 03/18] bootwrapper: Remove OF-isms Scott Wood
2007-01-29 20:11 ` [PATCH 04/18] bootwrapper: Add ft_root_node() Scott Wood
2007-01-30 19:44 ` Segher Boessenkool
2007-01-29 20:11 ` [PATCH 05/18] bootwrapper: Rename ft_node_add() to ft_get_phandle() Scott Wood
2007-01-29 20:12 ` [PATCH 06/18] bootwrapper: Make ft_get_phandle() accept and return NULL Scott Wood
2007-01-30 19:48 ` Segher Boessenkool
2007-01-30 19:51 ` Scott Wood
2007-01-29 20:12 ` [PATCH 07/18] bootwrapper: Preserve the pp pointer in ft_make_space() when calling ft_reorder() Scott Wood
2007-01-29 20:12 ` [PATCH 08/18] bootwrapper: Modify *pp, not *p, in ft_shuffle() Scott Wood
2007-01-30 19:49 ` Segher Boessenkool
2007-01-29 20:12 ` [PATCH 09/18] bootwrapper: Use map_string() instead of lookup_string() in ft_prop() Scott Wood
2007-01-29 20:12 ` [PATCH 10/18] bootwrapper: Add ft_find_device_rel() Scott Wood
2007-01-30 19:53 ` Segher Boessenkool
2007-01-30 20:25 ` Scott Wood
2007-01-29 20:12 ` [PATCH 11/18] bootwrapper: Refactor ft_get_prop() into internal and external functions Scott Wood
2007-01-29 20:12 ` [PATCH 12/18] bootwrapper: Make ft_get_parent() return a phandle, and NULL if already top-level Scott Wood
2007-01-30 19:56 ` Segher Boessenkool
2007-01-30 20:39 ` Scott Wood
2007-01-29 20:13 ` [PATCH 13/18] bootwrapper: Add ft_find_prop() Scott Wood
2007-01-30 19:57 ` Segher Boessenkool
2007-01-29 20:13 ` [PATCH 14/18] bootwrapper: Add initrd information to the device tree in ft_finalize() Scott Wood
2007-01-29 20:13 ` [PATCH 15/18] bootwrapper: Make ft_create_node() pay attention to the parent parameter Scott Wood
2007-01-29 20:13 ` [PATCH 16/18] bootwrapper: Add dt_ops methods Scott Wood
2007-01-30 20:01 ` Segher Boessenkool
2007-01-31 7:02 ` David Gibson
2007-01-29 20:13 ` [PATCH 17/18] bootwrapper: Add xlate_reg(), and use it to find serial registers Scott Wood
2007-01-29 20:13 ` [PATCH 18/18] bootwrapper: Compatibility layer for old U-Boots (a.k.a. cuImage, cuboot) Scott Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070129204037.GA14087@ld0162-tx32.am.freescale.net \
--to=scottwood@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).