Overview
| Artifact ID: | 5531a40ed98d263837633df4d165f9818c4730ff |
|---|---|
| Ticket: | 1195167fffffffffffffffffffffffffffffffff
strtod() gets compiled into fixstrtod() |
| User & Date: | dgp on 2017-03-31 16:45:43 |
Changes
- assignee changed to: "dgp"
- closer changed to: "nobody"
- comment changed to:
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.
- icomment:
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.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "8"
- severity changed to: "Minor"