* [Buildroot] [PATCH] toolchain/crosstool-NG: disable decimal floats
@ 2012-05-15 21:15 Yann E. MORIN
2012-05-15 22:33 ` Arnout Vandecappelle
2012-05-16 8:39 ` Peter Korsgaard
0 siblings, 2 replies; 6+ messages in thread
From: Yann E. MORIN @ 2012-05-15 21:15 UTC (permalink / raw)
To: buildroot
Decimal floats were introduced circa gcc-4.2 or -4.3, and requires
the floating-point environement fenv.h in the C library.
The uClibc .config file used by crosstool-NG to build uClibc is the
same as used by the internal buildroot mechanism, and explcitly
disables fenv support.
The quick workaround is to simply disable decimal floats in all
crosstool-NG config files.
In the long run, it might be better to check this situation, and/or
add code and/or options in crosstool-NG to handle this (but it is
much more involved, and this workaround is sane).
Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
CC: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
.../crosstool-ng.config-eglibc | 4 ++--
.../crosstool-ng.config-glibc | 4 ++--
.../crosstool-ng.config-uClibc | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.config-eglibc b/toolchain/toolchain-crosstool-ng/crosstool-ng.config-eglibc
index c1ab679..4488d02 100644
--- a/toolchain/toolchain-crosstool-ng/crosstool-ng.config-eglibc
+++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.config-eglibc
@@ -273,8 +273,8 @@ CT_CC_LANG_CXX=y
# gcc other options
#
CT_CC_ENABLE_CXX_FLAGS=""
-CT_CC_CORE_EXTRA_CONFIG_ARRAY=""
-CT_CC_EXTRA_CONFIG_ARRAY=""
+CT_CC_CORE_EXTRA_CONFIG_ARRAY="--disable-decimal-float"
+CT_CC_EXTRA_CONFIG_ARRAY="--disable-decimal-float"
CT_CC_STATIC_LIBSTDCXX=y
#
diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.config-glibc b/toolchain/toolchain-crosstool-ng/crosstool-ng.config-glibc
index 4a555c7..46a636b 100644
--- a/toolchain/toolchain-crosstool-ng/crosstool-ng.config-glibc
+++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.config-glibc
@@ -273,8 +273,8 @@ CT_CC_LANG_CXX=y
# gcc other options
#
CT_CC_ENABLE_CXX_FLAGS=""
-CT_CC_CORE_EXTRA_CONFIG_ARRAY=""
-CT_CC_EXTRA_CONFIG_ARRAY=""
+CT_CC_CORE_EXTRA_CONFIG_ARRAY="--disable-decimal-float"
+CT_CC_EXTRA_CONFIG_ARRAY="--disable-decimal-float"
CT_CC_STATIC_LIBSTDCXX=y
#
diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.config-uClibc b/toolchain/toolchain-crosstool-ng/crosstool-ng.config-uClibc
index 0e442f0..437f455 100644
--- a/toolchain/toolchain-crosstool-ng/crosstool-ng.config-uClibc
+++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.config-uClibc
@@ -272,8 +272,8 @@ CT_CC_LANG_CXX=y
# gcc other options
#
CT_CC_ENABLE_CXX_FLAGS=""
-CT_CC_CORE_EXTRA_CONFIG_ARRAY=""
-CT_CC_EXTRA_CONFIG_ARRAY=""
+CT_CC_CORE_EXTRA_CONFIG_ARRAY="--disable-decimal-float"
+CT_CC_EXTRA_CONFIG_ARRAY="--disable-decimal-float"
CT_CC_STATIC_LIBSTDCXX=y
#
--
1.7.2.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] toolchain/crosstool-NG: disable decimal floats
2012-05-15 21:15 [Buildroot] [PATCH] toolchain/crosstool-NG: disable decimal floats Yann E. MORIN
@ 2012-05-15 22:33 ` Arnout Vandecappelle
2012-05-16 7:40 ` Peter Korsgaard
2012-05-16 8:39 ` Peter Korsgaard
1 sibling, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2012-05-15 22:33 UTC (permalink / raw)
To: buildroot
On 05/15/12 23:15, Yann E. MORIN wrote:
> Decimal floats were introduced circa gcc-4.2 or -4.3, and requires
> the floating-point environement fenv.h in the C library.
>
> The uClibc .config file used by crosstool-NG to build uClibc is the
> same as used by the internal buildroot mechanism, and explcitly
> disables fenv support.
>
> The quick workaround is to simply disable decimal floats in all
> crosstool-NG config files.
Wouldn't it be better to enable FENV in buildroot's uClibc config?
I remember there were some packages that had problems with it too.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
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: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] toolchain/crosstool-NG: disable decimal floats
2012-05-15 22:33 ` Arnout Vandecappelle
@ 2012-05-16 7:40 ` Peter Korsgaard
2012-05-16 7:58 ` Yann E. MORIN
0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2012-05-16 7:40 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
Arnout> On 05/15/12 23:15, Yann E. MORIN wrote:
>> Decimal floats were introduced circa gcc-4.2 or -4.3, and requires
>> the floating-point environement fenv.h in the C library.
>>
>> The uClibc .config file used by crosstool-NG to build uClibc is the
>> same as used by the internal buildroot mechanism, and explcitly
>> disables fenv support.
>>
>> The quick workaround is to simply disable decimal floats in all
>> crosstool-NG config files.
Arnout> Wouldn't it be better to enable FENV in buildroot's uClibc config?
It's afaik only available for i386, and even then I believe some things
are missing.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] toolchain/crosstool-NG: disable decimal floats
2012-05-16 7:40 ` Peter Korsgaard
@ 2012-05-16 7:58 ` Yann E. MORIN
2012-05-16 8:38 ` Peter Korsgaard
0 siblings, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2012-05-16 7:58 UTC (permalink / raw)
To: buildroot
On Wednesday 16 May 2012 09:40:37 Peter Korsgaard wrote:
> >>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
>
> Arnout> On 05/15/12 23:15, Yann E. MORIN wrote:
> >> Decimal floats were introduced circa gcc-4.2 or -4.3, and requires
> >> the floating-point environement fenv.h in the C library.
> >>
> >> The uClibc .config file used by crosstool-NG to build uClibc is the
> >> same as used by the internal buildroot mechanism, and explcitly
> >> disables fenv support.
> >>
> >> The quick workaround is to simply disable decimal floats in all
> >> crosstool-NG config files.
>
> Arnout> Wouldn't it be better to enable FENV in buildroot's uClibc config?
I did not want to impact the internal backend, thus the workaround is
limited to the crosstool-NG backend. This limits the impact for the
now-woon-to-be-released next version of BR.
Switching to enabling fenv by default can be done in the next cycle.
> It's afaik only available for i386, and even then I believe some things
> are missing.
khem told me yesterday on IRC that uClibc had a working fenv for all
supported architectures, with no _known_ problems (which does not mean
there is none, just that none is known so far):
http://ibot.rikers.org/%23uclibc/20120515.html.gz @ 20:20:25 - 20:56.17
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software Designer | \ / CAMPAIGN | ^ |
| --==< O_o >==-- '------------.-------: X AGAINST | /e\ There is no |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL | """ conspiracy. |
'------------------------------'-------'------------------'--------------------'
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] toolchain/crosstool-NG: disable decimal floats
2012-05-16 7:58 ` Yann E. MORIN
@ 2012-05-16 8:38 ` Peter Korsgaard
0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2012-05-16 8:38 UTC (permalink / raw)
To: buildroot
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
Arnout> Wouldn't it be better to enable FENV in buildroot's uClibc config?
Yann> I did not want to impact the internal backend, thus the workaround is
Yann> limited to the crosstool-NG backend. This limits the impact for the
Yann> now-woon-to-be-released next version of BR.
Yann> Switching to enabling fenv by default can be done in the next cycle.
Agreed, lets keep it simple for now.
>> It's afaik only available for i386, and even then I believe some things
>> are missing.
Yann> khem told me yesterday on IRC that uClibc had a working fenv for all
Yann> supported architectures, with no _known_ problems (which does not mean
Yann> there is none, just that none is known so far):
Yann> http://ibot.rikers.org/%23uclibc/20120515.html.gz @ 20:20:25 - 20:56.17
Yes, I saw that as well, but looking at the uClibc sources I only see .c
files for i386 and sh4.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] toolchain/crosstool-NG: disable decimal floats
2012-05-15 21:15 [Buildroot] [PATCH] toolchain/crosstool-NG: disable decimal floats Yann E. MORIN
2012-05-15 22:33 ` Arnout Vandecappelle
@ 2012-05-16 8:39 ` Peter Korsgaard
1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2012-05-16 8:39 UTC (permalink / raw)
To: buildroot
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
Yann> Decimal floats were introduced circa gcc-4.2 or -4.3, and requires
Yann> the floating-point environement fenv.h in the C library.
Yann> The uClibc .config file used by crosstool-NG to build uClibc is the
Yann> same as used by the internal buildroot mechanism, and explcitly
Yann> disables fenv support.
Yann> The quick workaround is to simply disable decimal floats in all
Yann> crosstool-NG config files.
Yann> In the long run, it might be better to check this situation, and/or
Yann> add code and/or options in crosstool-NG to handle this (but it is
Yann> much more involved, and this workaround is sane).
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-05-16 8:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-15 21:15 [Buildroot] [PATCH] toolchain/crosstool-NG: disable decimal floats Yann E. MORIN
2012-05-15 22:33 ` Arnout Vandecappelle
2012-05-16 7:40 ` Peter Korsgaard
2012-05-16 7:58 ` Yann E. MORIN
2012-05-16 8:38 ` Peter Korsgaard
2012-05-16 8:39 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox