Ticket UUID: | 1195167 | |||
Title: | strtod() gets compiled into fixstrtod() | |||
Type: | Bug | Version: | obsolete: 8.4.9 | |
Submitter: | nobody | Created on: | 2005-05-04 12:19:41 | |
Subsystem: | 52. Portability Support | Assigned To: | dgp | |
Priority: | 8 | Severity: | Minor | |
Status: | Closed | Last Modified: | 2018-11-01 15:52:46 | |
Resolution: | Fixed | Closed By: | dgp | |
Closed on: | 2018-11-01 15:52:46 | |||
Description: |
I cross-compile the latest tcl8.4.9 source code on a Linux x86 platform targetting an embedded PowerPC 60x running Linux. The configure script determines that the strtod() function needs to be build for this platform, and for some reason it also determines that the fixstrtod () function need to be build as well. Because of the need for fixstrtod(), the build script adds the compiler switch -Dstdtod=fixstrtod to gcc. But this causes both strtod() (compat/strtod.c) and fixstrtod() (compat/fixstrtod.c) to be compiled into the single function fixstrtod(). (compat/fixstrtod.c contains an "#undef strtod" to undo this define locally, but compat/strtod.c does not). Since fixstrtod() references strtod(), subsequent linking fails. Adding "#undef stdtod" to compat/strtod.c as well solves the problem. | |||
User Comments: |
dgp added on 2017-03-31 16:45:43:
This appears to be the last Open ticket that still touches on the "fixstrtod" issue. Tcl no longer uses the strtod() routine anywhere. It can no longer suffer because of any brokenness in any system strtod() routine. In at least Tcl 8.7 and later, we should purge Tcl's build machinery of all crutches, patches and other heroism dedicated to solving a problem which has not existed for years. The solution is now far more damaging, tripping up cross-compile efforts. coldstore added on 2006-12-20 08:06:51: Logged In: YES user_id=19214 Originator: NO This is still a current problem with tcl8.5 recent CVS checkout. dkf added on 2005-12-01 20:32:49: File Added - 158251: bug1195167.diff jcw added on 2005-12-01 07:48:12: Logged In: YES user_id=1983 Hm... can't seem to attach a file in this bug report area. I've placed it here instead: http://www.equi4.com/pub/etc/bug1195167.diff -jcw jcw added on 2005-12-01 07:43:42: Logged In: YES user_id=1983 I can confirm for 8.4.11 that this is the only issue preventing a cross-compile of Tcl. Am appending a patch which works around this in another way: omitting the strtod.c from the build. -jcw ivan_daniluk added on 2005-05-30 12:46:51: Logged In: YES user_id=902311 I've got this bug also when crosscompiling tcl8.4.9 on x86 with uClibc. It seems, configure script automatically marks strtod() as buggy when detects crosscompiling enabled: tcl8.4.9/unix/configure:6243: ... if test "$cross_compiling" = yes; then tcl_cv_strtod_buggy=0 else ... // note: zero value means "buggy" accordingly to configure script Solution with adding "#undef strtod" works for me, btw. |
Attachments:
- bug1195167.diff [download] added by dkf on 2005-12-01 20:32:49. [details]