* [Buildroot] [PATCH 1/1] toolchain: use -ffp-contract=off on MIPS in the wrapper when needed
@ 2018-01-16 18:50 Johannes Schmitz
2018-01-16 20:03 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Schmitz @ 2018-01-16 18:50 UTC (permalink / raw)
To: buildroot
This fix is necessary for to build for MIPS, for example for the MIPS
XBurst architecture used on ci20 boards.
GCC has replaced (no)mfused-madd with ffp-contract.
Find more details and a long discussion at
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00876.html
Signed-off-by: Johannes Schmitz <johannes.schmitz1@gmail.com>
---
toolchain/toolchain-wrapper.c | 10 ++++++++--
toolchain/toolchain-wrapper.mk | 6 +++++-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c
index 2928ea4..dd3a25e 100644
--- a/toolchain/toolchain-wrapper.c
+++ b/toolchain/toolchain-wrapper.c
@@ -79,8 +79,14 @@ static char *predef_args[] = {
#ifdef BR_OMIT_LOCK_PREFIX
"-Wa,-momit-lock-prefix=yes",
#endif
-#ifdef BR_NO_FUSED_MADD
- "-mno-fused-madd",
+#ifdef BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+ #ifdef BR_FP_CONTRACT_OFF
+ "-ffp-contract=off",
+ #endif
+#else
+ #ifdef BR_NO_FUSED_MADD
+ "-mno-fused-madd",
+ #endif
#endif
#ifdef BR_BINFMT_FLAT
"-Wl,-elf2flt",
diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk
index 7f72a0c..b7a4b9b 100644
--- a/toolchain/toolchain-wrapper.mk
+++ b/toolchain/toolchain-wrapper.mk
@@ -28,7 +28,11 @@ endif
# Avoid FPU bug on XBurst CPUs
ifeq ($(BR2_mips_xburst),y)
-TOOLCHAIN_WRAPPER_ARGS += -DBR_NO_FUSED_MADD
+ ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_6),y)
+ TOOLCHAIN_WRAPPER_ARGS += -DBR_FP_CONTRACT_OFF
+ else
+ TOOLCHAIN_WRAPPER_ARGS += -DBR_NO_FUSED_MADD
+ endif
endif
ifeq ($(BR2_CCACHE_USE_BASEDIR),y)
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] toolchain: use -ffp-contract=off on MIPS in the wrapper when needed
@ 2018-01-16 18:50 Johannes Schmitz
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Schmitz @ 2018-01-16 18:50 UTC (permalink / raw)
To: buildroot
This fix is necessary for to build for MIPS, for example for the MIPS
XBurst architecture used on ci20 boards.
GCC has replaced (no)mfused-madd with ffp-contract.
Find more details and a long discussion at
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00876.html
Signed-off-by: Johannes Schmitz <johannes.schmitz1@gmail.com>
---
toolchain/toolchain-wrapper.c | 10 ++++++++--
toolchain/toolchain-wrapper.mk | 6 +++++-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c
index 2928ea4..dd3a25e 100644
--- a/toolchain/toolchain-wrapper.c
+++ b/toolchain/toolchain-wrapper.c
@@ -79,8 +79,14 @@ static char *predef_args[] = {
#ifdef BR_OMIT_LOCK_PREFIX
"-Wa,-momit-lock-prefix=yes",
#endif
-#ifdef BR_NO_FUSED_MADD
- "-mno-fused-madd",
+#ifdef BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+ #ifdef BR_FP_CONTRACT_OFF
+ "-ffp-contract=off",
+ #endif
+#else
+ #ifdef BR_NO_FUSED_MADD
+ "-mno-fused-madd",
+ #endif
#endif
#ifdef BR_BINFMT_FLAT
"-Wl,-elf2flt",
diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk
index 7f72a0c..b7a4b9b 100644
--- a/toolchain/toolchain-wrapper.mk
+++ b/toolchain/toolchain-wrapper.mk
@@ -28,7 +28,11 @@ endif
# Avoid FPU bug on XBurst CPUs
ifeq ($(BR2_mips_xburst),y)
-TOOLCHAIN_WRAPPER_ARGS += -DBR_NO_FUSED_MADD
+ ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_6),y)
+ TOOLCHAIN_WRAPPER_ARGS += -DBR_FP_CONTRACT_OFF
+ else
+ TOOLCHAIN_WRAPPER_ARGS += -DBR_NO_FUSED_MADD
+ endif
endif
ifeq ($(BR2_CCACHE_USE_BASEDIR),y)
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] toolchain: use -ffp-contract=off on MIPS in the wrapper when needed
@ 2018-01-16 18:53 Johannes Schmitz
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Schmitz @ 2018-01-16 18:53 UTC (permalink / raw)
To: buildroot
This fix is necessary for to build for MIPS, for example for the MIPS
XBurst architecture used on ci20 boards.
GCC has replaced (no)mfused-madd with ffp-contract.
Find more details and a long discussion at
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00876.html
Signed-off-by: Johannes Schmitz <johannes.schmitz1@gmail.com>
---
toolchain/toolchain-wrapper.c | 3 ---
toolchain/toolchain-wrapper.mk | 4 ++++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c
index 2928ea4..04b2631 100644
--- a/toolchain/toolchain-wrapper.c
+++ b/toolchain/toolchain-wrapper.c
@@ -79,9 +79,6 @@ static char *predef_args[] = {
#ifdef BR_OMIT_LOCK_PREFIX
"-Wa,-momit-lock-prefix=yes",
#endif
-#ifdef BR_NO_FUSED_MADD
- "-mno-fused-madd",
-#endif
#ifdef BR_BINFMT_FLAT
"-Wl,-elf2flt",
#endif
diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk
index 7f72a0c..7faa033 100644
--- a/toolchain/toolchain-wrapper.mk
+++ b/toolchain/toolchain-wrapper.mk
@@ -28,8 +28,12 @@ endif
# Avoid FPU bug on XBurst CPUs
ifeq ($(BR2_mips_xburst),y)
+ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_6),y)
+TOOLCHAIN_WRAPPER_ARGS += -DBR_FP_CONTRACT_OFF
+else
TOOLCHAIN_WRAPPER_ARGS += -DBR_NO_FUSED_MADD
endif
+endif
ifeq ($(BR2_CCACHE_USE_BASEDIR),y)
TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_BASEDIR='"$(BASE_DIR)"'
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] toolchain: use -ffp-contract=off on MIPS in the wrapper when needed
2018-01-16 18:50 [Buildroot] [PATCH 1/1] toolchain: use -ffp-contract=off on MIPS in the wrapper when needed Johannes Schmitz
@ 2018-01-16 20:03 ` Thomas Petazzoni
2018-01-16 21:42 ` Johannes Schmitz
2018-02-12 15:32 ` Ezequiel Garcia
0 siblings, 2 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-01-16 20:03 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 16 Jan 2018 19:50:16 +0100, Johannes Schmitz wrote:
> This fix is necessary for to build for MIPS, for example for the MIPS
> XBurst architecture used on ci20 boards.
>
> GCC has replaced (no)mfused-madd with ffp-contract.
> Find more details and a long discussion at
> https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00876.html
>
> Signed-off-by: Johannes Schmitz <johannes.schmitz1@gmail.com>
Within just 3 minutes, you sent this patch 3 times. Two times the exact
same version, and one time a different version. There is also no
version number on the patches, making it very difficult to understand
what is *the* correct patch.
Could you add a version number to your patches (git format-patch -v X),
include a changelog between version (below the --- sign that follows
the Signed-off-by line) and try to avoid sending 3 times the same patch
in a row ? :-)
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] toolchain: use -ffp-contract=off on MIPS in the wrapper when needed
2018-01-16 20:03 ` Thomas Petazzoni
@ 2018-01-16 21:42 ` Johannes Schmitz
2018-02-12 15:32 ` Ezequiel Garcia
1 sibling, 0 replies; 6+ messages in thread
From: Johannes Schmitz @ 2018-01-16 21:42 UTC (permalink / raw)
To: buildroot
Hello,
I am sorry, I was fully aware that it wasn't a good thing to do.
Afterwards. The problem is my lack of experiencie with submissions through
git send.
I found some formal mistakes such as missing -s in the submitted patch.
Then it was in the middle of a git rebase --interactive and I screwed up.
So I fully accept your criticism. Will continue learning and promise to do
a more thorough review before sending. Basically I have to get used to the
workflow.
Too bad there is no git send --amend
For now please consider the last patch as the correct one.
Regards
Johannes
Am 16.01.2018 21:03 schrieb "Thomas Petazzoni" <
thomas.petazzoni@free-electrons.com>:
Hello,
On Tue, 16 Jan 2018 19:50:16 +0100, Johannes Schmitz wrote:
> This fix is necessary for to build for MIPS, for example for the MIPS
> XBurst architecture used on ci20 boards.
>
> GCC has replaced (no)mfused-madd with ffp-contract.
> Find more details and a long discussion at
> https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00876.html
>
> Signed-off-by: Johannes Schmitz <johannes.schmitz1@gmail.com>
Within just 3 minutes, you sent this patch 3 times. Two times the exact
same version, and one time a different version. There is also no
version number on the patches, making it very difficult to understand
what is *the* correct patch.
Could you add a version number to your patches (git format-patch -v X),
include a changelog between version (below the --- sign that follows
the Signed-off-by line) and try to avoid sending 3 times the same patch
in a row ? :-)
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180116/5ea947ee/attachment.html>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] toolchain: use -ffp-contract=off on MIPS in the wrapper when needed
2018-01-16 20:03 ` Thomas Petazzoni
2018-01-16 21:42 ` Johannes Schmitz
@ 2018-02-12 15:32 ` Ezequiel Garcia
1 sibling, 0 replies; 6+ messages in thread
From: Ezequiel Garcia @ 2018-02-12 15:32 UTC (permalink / raw)
To: buildroot
Thomas,
On 16 January 2018 at 17:03, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Tue, 16 Jan 2018 19:50:16 +0100, Johannes Schmitz wrote:
>> This fix is necessary for to build for MIPS, for example for the MIPS
>> XBurst architecture used on ci20 boards.
>>
>> GCC has replaced (no)mfused-madd with ffp-contract.
>> Find more details and a long discussion at
>> https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00876.html
>>
>> Signed-off-by: Johannes Schmitz <johannes.schmitz1@gmail.com>
>
> Within just 3 minutes, you sent this patch 3 times. Two times the exact
> same version, and one time a different version. There is also no
> version number on the patches, making it very difficult to understand
> what is *the* correct patch.
>
> Could you add a version number to your patches (git format-patch -v X),
> include a changelog between version (below the --- sign that follows
> the Signed-off-by line) and try to avoid sending 3 times the same patch
> in a row ? :-)
>
According to the last mail from Johannes, you should pick
his last patch:
<1516128787-20711-1-git-send-email-johannes.schmitz1@gmail.com>
Which means:
https://patchwork.ozlabs.org/patch/861859/
I can confirm it unbreaks ci20_defconfig:
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Thanks,
--
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-02-12 15:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-16 18:50 [Buildroot] [PATCH 1/1] toolchain: use -ffp-contract=off on MIPS in the wrapper when needed Johannes Schmitz
2018-01-16 20:03 ` Thomas Petazzoni
2018-01-16 21:42 ` Johannes Schmitz
2018-02-12 15:32 ` Ezequiel Garcia
-- strict thread matches above, loose matches on Subject: below --
2018-01-16 18:50 Johannes Schmitz
2018-01-16 18:53 Johannes Schmitz
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.