Skip to contentSkip to conversation

toolchain/crosstool-NG: disable decimal floats

PATCH New Yann E. MORIN 3 participants 6 messages May 15, 2012 – May 16, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain/crosstool-NG: disable decimal floats

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).

---
 .../crosstool-ng.config-eglibc                     |    4 ++--
 .../crosstool-ng.config-glibc                      |    4 ++--
 .../crosstool-ng.config-uClibc                     |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
toolchain/toolchain-crosstool-ng/crosstool-ng.config-eglibc +2 -2
index c1ab679..4488d02 100644
@@ -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
 
 #
toolchain/toolchain-crosstool-ng/crosstool-ng.config-glibc +2 -2
index 4a555c7..46a636b 100644
@@ -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
 
 #
toolchain/toolchain-crosstool-ng/crosstool-ng.config-uClibc +2 -2
index 0e442f0..437f455 100644
@@ -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
 
 #
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH 1/1 toolchain/crosstool-NG: disable decimal floats

Quoted 9 lines · Yann E. MORIN

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

Signature · 6 lines
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
#2 lore raw

PATCH 1/1 toolchain/crosstool-NG: disable decimal floats

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

Quoted 9 lines · Yann E. MORIN
Quoted 9 lines

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.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 toolchain/crosstool-NG: disable decimal floats

Quoted 6 lines · On Wednesday 16 May 2012 09:40:37 Peter Korsgaard wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

Quoted 3 lines · Yann E. MORIN
Quoted 3 lines

Decimal floats were introduced circa gcc-4.2 or -4.3, and requires the floating-point environement fenv.h in the C library.

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines

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.

Quoted 2 lines

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.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------'-------'------------------'--------------------'
#4 lore raw

PATCH 1/1 toolchain/crosstool-NG: disable decimal floats

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> 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.

Quoted 2 lines
Quoted 2 lines

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.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 1/1 toolchain/crosstool-NG: disable decimal floats

In reply to Yann E. MORIN
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> 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.

Signature · 1 line
Bye, Peter Korsgaard