From: "Pali Rohár" <pali@kernel.org>
To: Vagrant Cascadian <vagrant@debian.org>
Cc: u-boot@lists.denx.de
Subject: [PATCH u-boot] powerpc/mpc85xx: Improve disabling of SPE instructions
Date: Sun, 11 Dec 2022 15:14:59 +0100 [thread overview]
Message-ID: <20221211141459.8344-1-pali@kernel.org> (raw)
Specifying -mspe=no also disables usage of SPE instructions. It is
documented in "[PATCH,rs6000] make -mno-spe work as expected" email:
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html
So replace -mspe=yes by -mspe=no, so make it clear that u-boot has to be
compiled without SPE instructions.
Linux kernel contains following Makefile code to achieve it:
# No SPE instruction when building kernel
# (We use all available options to help semi-broken compilers)
KBUILD_CFLAGS += $(call cc-option,-mno-spe)
KBUILD_CFLAGS += $(call cc-option,-mspe=no)
Do same for U-Boot.
Signed-off-by: Pali Rohár <pali@kernel.org>
---
arch/powerpc/cpu/mpc85xx/config.mk | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/cpu/mpc85xx/config.mk b/arch/powerpc/cpu/mpc85xx/config.mk
index b6b5d2053aea..482bb90cb120 100644
--- a/arch/powerpc/cpu/mpc85xx/config.mk
+++ b/arch/powerpc/cpu/mpc85xx/config.mk
@@ -6,11 +6,12 @@
PLATFORM_CPPFLAGS += -msoft-float -mno-string
PLATFORM_RELFLAGS += -msingle-pic-base -fno-jump-tables
-# -mspe=yes is needed to have -mno-spe accepted by a buggy GCC;
+# No SPE instruction when building u-boot
+# (We use all available options to help semi-broken compilers)
# see "[PATCH,rs6000] make -mno-spe work as expected" on
# http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html
-PLATFORM_CPPFLAGS += $(call cc-option,-mspe=yes) \
- $(call cc-option,-mno-spe)
+PLATFORM_CPPFLAGS += $(call cc-option,-mno-spe) \
+ $(call cc-option,-mspe=no)
ifdef CONFIG_E6500
PLATFORM_CPPFLAGS += -mcpu=e6500
--
2.20.1
next reply other threads:[~2022-12-11 14:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-11 14:14 Pali Rohár [this message]
2022-12-23 15:01 ` [PATCH u-boot] powerpc/mpc85xx: Improve disabling of SPE instructions Tom Rini
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=20221211141459.8344-1-pali@kernel.org \
--to=pali@kernel.org \
--cc=u-boot@lists.denx.de \
--cc=vagrant@debian.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.