* [Buildroot] [PATCH] toolchain-wrapper: do not use deprecated -mfused-madd
@ 2017-08-11 5:28 Waldemar Brodkorb
2017-08-11 6:08 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Waldemar Brodkorb @ 2017-08-11 5:28 UTC (permalink / raw)
To: buildroot
GCC deprecated -mfused-madd, -ffp-contract=off should
be used for Xburst workaround.
uClibc compilations will fail, because a gcc warning
is emitted while checking for TLS support in the compiler.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
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 dd77c11..44cdcf3 100644
--- a/toolchain/toolchain-wrapper.c
+++ b/toolchain/toolchain-wrapper.c
@@ -69,8 +69,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.1.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH] toolchain-wrapper: do not use deprecated -mfused-madd
2017-08-11 5:28 [Buildroot] [PATCH] toolchain-wrapper: do not use deprecated -mfused-madd Waldemar Brodkorb
@ 2017-08-11 6:08 ` Thomas Petazzoni
2017-08-11 9:53 ` Arnout Vandecappelle
2017-08-11 17:32 ` Waldemar Brodkorb
0 siblings, 2 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2017-08-11 6:08 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 11 Aug 2017 07:28:48 +0200, Waldemar Brodkorb wrote:
> GCC deprecated -mfused-madd, -ffp-contract=off should
> be used for Xburst workaround.
> uClibc compilations will fail, because a gcc warning
> is emitted while checking for TLS support in the compiler.
In which gcc version was -ffp-contract=off added ? Can we use that
unconditionally, or is it only available in recent gcc versions ?
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] toolchain-wrapper: do not use deprecated -mfused-madd
2017-08-11 6:08 ` Thomas Petazzoni
@ 2017-08-11 9:53 ` Arnout Vandecappelle
2017-08-11 18:11 ` Waldemar Brodkorb
2017-08-11 17:32 ` Waldemar Brodkorb
1 sibling, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2017-08-11 9:53 UTC (permalink / raw)
To: buildroot
On 11-08-17 08:08, Thomas Petazzoni wrote:
> Hello,
>
> On Fri, 11 Aug 2017 07:28:48 +0200, Waldemar Brodkorb wrote:
>> GCC deprecated -mfused-madd, -ffp-contract=off should
>> be used for Xburst workaround.
>> uClibc compilations will fail, because a gcc warning
>> is emitted while checking for TLS support in the compiler.
>
> In which gcc version was -ffp-contract=off added ? Can we use that
> unconditionally, or is it only available in recent gcc versions ?
And remember that we support GCC down to 4.3 in external toolchains...
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] toolchain-wrapper: do not use deprecated -mfused-madd
2017-08-11 9:53 ` Arnout Vandecappelle
@ 2017-08-11 18:11 ` Waldemar Brodkorb
2017-08-11 20:54 ` Arnout Vandecappelle
0 siblings, 1 reply; 7+ messages in thread
From: Waldemar Brodkorb @ 2017-08-11 18:11 UTC (permalink / raw)
To: buildroot
Hi Arnout,
Arnout Vandecappelle wrote,
>
>
> On 11-08-17 08:08, Thomas Petazzoni wrote:
> > Hello,
> >
> > On Fri, 11 Aug 2017 07:28:48 +0200, Waldemar Brodkorb wrote:
> >> GCC deprecated -mfused-madd, -ffp-contract=off should
> >> be used for Xburst workaround.
> >> uClibc compilations will fail, because a gcc warning
> >> is emitted while checking for TLS support in the compiler.
> >
> > In which gcc version was -ffp-contract=off added ? Can we use that
> > unconditionally, or is it only available in recent gcc versions ?
>
> And remember that we support GCC down to 4.3 in external toolchains...
The usage for -ffp-contract=off is limited for MIPS32 xburst and
I see only two external toolchains from 2016 for MIPS in
make menuconfig...
best regards
Waldemar
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] toolchain-wrapper: do not use deprecated -mfused-madd
2017-08-11 18:11 ` Waldemar Brodkorb
@ 2017-08-11 20:54 ` Arnout Vandecappelle
0 siblings, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2017-08-11 20:54 UTC (permalink / raw)
To: buildroot
On 11-08-17 20:11, Waldemar Brodkorb wrote:
> Hi Arnout,
> Arnout Vandecappelle wrote,
>
>>
>>
>> On 11-08-17 08:08, Thomas Petazzoni wrote:
>>> Hello,
>>>
>>> On Fri, 11 Aug 2017 07:28:48 +0200, Waldemar Brodkorb wrote:
>>>> GCC deprecated -mfused-madd, -ffp-contract=off should
>>>> be used for Xburst workaround.
>>>> uClibc compilations will fail, because a gcc warning
>>>> is emitted while checking for TLS support in the compiler.
>>>
>>> In which gcc version was -ffp-contract=off added ? Can we use that
>>> unconditionally, or is it only available in recent gcc versions ?
>>
>> And remember that we support GCC down to 4.3 in external toolchains...
>
> The usage for -ffp-contract=off is limited for MIPS32 xburst and
> I see only two external toolchains from 2016 for MIPS in
> make menuconfig...
There's also something called "Custom external toolchain", which could be
anything...
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] toolchain-wrapper: do not use deprecated -mfused-madd
2017-08-11 6:08 ` Thomas Petazzoni
2017-08-11 9:53 ` Arnout Vandecappelle
@ 2017-08-11 17:32 ` Waldemar Brodkorb
2017-08-11 21:00 ` Arnout Vandecappelle
1 sibling, 1 reply; 7+ messages in thread
From: Waldemar Brodkorb @ 2017-08-11 17:32 UTC (permalink / raw)
To: buildroot
Hi,
Thomas Petazzoni wrote,
> Hello,
>
> On Fri, 11 Aug 2017 07:28:48 +0200, Waldemar Brodkorb wrote:
> > GCC deprecated -mfused-madd, -ffp-contract=off should
> > be used for Xburst workaround.
> > uClibc compilations will fail, because a gcc warning
> > is emitted while checking for TLS support in the compiler.
>
> In which gcc version was -ffp-contract=off added ? Can we use that
> unconditionally, or is it only available in recent gcc versions ?
It was added in commit b9be572eda05cd23bbabd6409387d2c7ac782715.
Not sure how to find when it was added in a release.
4.6.4 seems to have it:
https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gcc/Optimize-Options.html#index-ffp_002dcontract-691
I don't find it in earlier release docs.
best regards
Waldemar
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] toolchain-wrapper: do not use deprecated -mfused-madd
2017-08-11 17:32 ` Waldemar Brodkorb
@ 2017-08-11 21:00 ` Arnout Vandecappelle
0 siblings, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2017-08-11 21:00 UTC (permalink / raw)
To: buildroot
On 11-08-17 19:32, Waldemar Brodkorb wrote:
> Hi,
> Thomas Petazzoni wrote,
>
>> Hello,
>>
>> On Fri, 11 Aug 2017 07:28:48 +0200, Waldemar Brodkorb wrote:
>>> GCC deprecated -mfused-madd, -ffp-contract=off should
>>> be used for Xburst workaround.
>>> uClibc compilations will fail, because a gcc warning
>>> is emitted while checking for TLS support in the compiler.
>>
>> In which gcc version was -ffp-contract=off added ? Can we use that
>> unconditionally, or is it only available in recent gcc versions ?
>
> It was added in commit b9be572eda05cd23bbabd6409387d2c7ac782715.
>
> Not sure how to find when it was added in a release.
$ git describe --contains b9be572eda05cd23bbabd6409387d2c7ac782715
gcc-4_6_0-release~2941
So we should use something like:
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
But actually, I'd much prefer this stuff to just be coded in
TOOLCHAIN_WRAPPER_OPTS. But that's a much bigger patch (series) so not for master.
Regards,
Arnout
> 4.6.4 seems to have it:
> https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gcc/Optimize-Options.html#index-ffp_002dcontract-691
>
> I don't find it in earlier release docs.
>
> best regards
> Waldemar
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-08-11 21:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-11 5:28 [Buildroot] [PATCH] toolchain-wrapper: do not use deprecated -mfused-madd Waldemar Brodkorb
2017-08-11 6:08 ` Thomas Petazzoni
2017-08-11 9:53 ` Arnout Vandecappelle
2017-08-11 18:11 ` Waldemar Brodkorb
2017-08-11 20:54 ` Arnout Vandecappelle
2017-08-11 17:32 ` Waldemar Brodkorb
2017-08-11 21:00 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox