* [Buildroot] [PATCH 2/2] toolchain: Fix toolchain to create proper builds for MIPS XBurst targets
@ 2018-01-05 16:38 Johannes Schmitz
2018-01-05 20:27 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schmitz @ 2018-01-05 16:38 UTC (permalink / raw)
To: buildroot
This patch is need for example for ci20, -mfused-madd is deprecated, we
need to use -ffp-contract instead.
This is basically a resubmission of
https://patchwork.ozlabs.org/patch/800406/
Please consider accepting the original patch, otherwise buildroot is
basically broken for ci20 and similar platforms.
Signed-off-by: Johannes Schmitz <johannes.schmitz1@gmail.com>
---
toolchain/toolchain-wrapper.c | 4 ++--
toolchain/toolchain-wrapper.mk | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c
index 2928ea4..822bcdc 100644
--- a/toolchain/toolchain-wrapper.c
+++ b/toolchain/toolchain-wrapper.c
@@ -79,8 +79,8 @@ static char *predef_args[] = {
#ifdef BR_OMIT_LOCK_PREFIX
"-Wa,-momit-lock-prefix=yes",
#endif
-#ifdef BR_NO_FUSED_MADD
- "-mno-fused-madd",
+#ifdef BR_FP_CONTRACT_OFF
+ "-ffp-contract=off",
#endif
#ifdef BR_BINFMT_FLAT
"-Wl,-elf2flt",
diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk
index 7f72a0c..ecf67a4 100644
--- a/toolchain/toolchain-wrapper.mk
+++ b/toolchain/toolchain-wrapper.mk
@@ -27,8 +27,9 @@ TOOLCHAIN_WRAPPER_ARGS += -DBR_OMIT_LOCK_PREFIX
endif
# Avoid FPU bug on XBurst CPUs
+# -mfused-madd is deprecated, use -ffp-contract instead
ifeq ($(BR2_mips_xburst),y)
-TOOLCHAIN_WRAPPER_ARGS += -DBR_NO_FUSED_MADD
+TOOLCHAIN_WRAPPER_ARGS += -DBR_FP_CONTRACT_OFF
endif
ifeq ($(BR2_CCACHE_USE_BASEDIR),y)
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [Buildroot] [PATCH 2/2] toolchain: Fix toolchain to create proper builds for MIPS XBurst targets
2018-01-05 16:38 [Buildroot] [PATCH 2/2] toolchain: Fix toolchain to create proper builds for MIPS XBurst targets Johannes Schmitz
@ 2018-01-05 20:27 ` Thomas Petazzoni
2018-01-05 21:34 ` Johannes Schmitz
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2018-01-05 20:27 UTC (permalink / raw)
To: buildroot
Hello,
This is PATCH 2/2, we haven't received PATCH 1/2 in the mailing list.
Where is it?
On Fri, 5 Jan 2018 17:38:25 +0100, Johannes Schmitz wrote:
> This patch is need for example for ci20, -mfused-madd is deprecated, we
> need to use -ffp-contract instead.
>
> This is basically a resubmission of
> https://patchwork.ozlabs.org/patch/800406/
>
> Please consider accepting the original patch, otherwise buildroot is
> basically broken for ci20 and similar platforms.
Is your patch a resubmission, or an additional patch ? You say it's a
resubmission, and then the next paragraph you say we should also apply
the original patch.
Also, the commit log should explain since which gcc version is
-mfused-madd deprecated, and since which gcc version is -ffp-contract
available.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] toolchain: Fix toolchain to create proper builds for MIPS XBurst targets
2018-01-05 20:27 ` Thomas Petazzoni
@ 2018-01-05 21:34 ` Johannes Schmitz
2018-01-06 14:16 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schmitz @ 2018-01-05 21:34 UTC (permalink / raw)
To: buildroot
Am 05.01.2018 21:27 schrieb "Thomas Petazzoni" <
thomas.petazzoni@free-electrons.com>:
Hello,
This is PATCH 2/2, we haven't received PATCH 1/2 in the mailing list.
Where is it?
On Fri, 5 Jan 2018 17:38:25 +0100, Johannes Schmitz wrote:
> This patch is need for example for ci20, -mfused-madd is deprecated, we
> need to use -ffp-contract instead.
>
> This is basically a resubmission of
> https://patchwork.ozlabs.org/patch/800406/
>
> Please consider accepting the original patch, otherwise buildroot is
> basically broken for ci20 and similar platforms.
Is your patch a resubmission, or an additional patch ? You say it's a
resubmission, and then the next paragraph you say we should also apply
the original patch.
It was not my own patch but I want to help bringing it up again because the
original author complained that so far it hasn't been accepted. He
recommended me to try it and see if it helps and it did help.
Also, the commit log should explain since which gcc version is
-mfused-madd deprecated, and since which gcc version is -ffp-contract
available.
I don't know this, my knowledge is incomplete in this area. I just manually
applied the original patch. What can we do together to get this patch to an
acceptable state?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180105/bd632d0c/attachment.html>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] toolchain: Fix toolchain to create proper builds for MIPS XBurst targets
2018-01-05 21:34 ` Johannes Schmitz
@ 2018-01-06 14:16 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-01-06 14:16 UTC (permalink / raw)
To: buildroot
Hello Johannes,
On Fri, 5 Jan 2018 22:34:14 +0100, Johannes Schmitz wrote:
> It was not my own patch but I want to help bringing it up again because the
> original author complained that so far it hasn't been accepted. He
> recommended me to try it and see if it helps and it did help.
>
> Also, the commit log should explain since which gcc version is
> -mfused-madd deprecated, and since which gcc version is -ffp-contract
> available.
>
> I don't know this, my knowledge is incomplete in this area. I just manually
> applied the original patch. What can we do together to get this patch to an
> acceptable state?
Could you please send a complete patch that includes both Waldemar
changes and yours ? Also, please read the comments in
https://patchwork.ozlabs.org/patch/800406/, they pointed out the fact
that -ffp-contract only exists since gcc 4.6, so its use should be made
conditional. Read the comments from Arnout, who suggests how to address
that.
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-06 14:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-05 16:38 [Buildroot] [PATCH 2/2] toolchain: Fix toolchain to create proper builds for MIPS XBurst targets Johannes Schmitz
2018-01-05 20:27 ` Thomas Petazzoni
2018-01-05 21:34 ` Johannes Schmitz
2018-01-06 14:16 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox