Artifacts Associated With Ticket 440891ffffffffffffffffffffffffffffffffff
Ticket change [fa03955fa8] (rid 91799) by dgp on 2001-07-13 01:05:09:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I wanted to test compat/strtod.c on Linux 6.2 on my Alpha XL-300: $ cd unix $ setenv LIBOBJS strtod.o $ ./configure $ make test but the resulting tclsh didn't use the strtod() from compat/strtod.c. The problem was that with optimization level "-O" the compiler egcs-2.91.66 and the header files from glibc-devel-2.1.3-21 automatically inlines the function strtod() so it can't be replaced. The attached patch fixes the problem. It detects the intent to link in routines from compat/* and in that case adds to EXTRA_CFLAGS the switch -fno-inline.
- foundin initialized to: "obsolete: 8.4a3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "53. Configuration and Build Tools"
- title initialized to: "Linux inlining defeats compat/*.c"
- type initialized to: "Bug"
Add attachment "inline.patch" [c06790cf65] (rid 102398) by dgp on 2001-07-13 08:05:10.
Ticket change [74bdf244cc] (rid 105259) by dgp on 2001-07-13 08:05:10:
- icomment:
File Added - 8370: inline.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [8c21ec1300] (rid 127694) by dgp on 2001-07-13 08:11:02:
- assignee changed to: "mdejong"
- icomment:
Logged In: YES user_id=80530 assigning to maintainer for review.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [8e6d36f331] (rid 120103) by mdejong on 2001-07-17 02:51:09:
- icomment:
Logged In: YES user_id=90858 Does passing the -fno-builtin also work for your case? The docs seem to indicate that it will. I would rather use -fno-builtin instead of -fno-inline since it will only stop inlining of builtin functions.
- login: "mdejong"
- mimetype: "text/plain"
- username: "mdejong"
- icomment:
Ticket change [b4e21e019d] (rid 125125) by dgp on 2001-07-17 03:20:58:
- icomment:
Logged In: YES user_id=80530 No, -fno-builtin doesn't solve the problem.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [eaf313e42e] (rid 103454) by hobbs on 2001-09-06 05:41:58:
- icomment:
Logged In: YES user_id=72656 Tk adds -D__NO_STRING_INLINES and -D__NO_MATH_INLINES which may be the right fix.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [227ca77879] (rid 130756) by dgp on 2001-09-06 08:57:52:
- icomment:
Logged In: YES user_id=80530 Tcl also adds -D__NO_STRING_INLINES and -D__NO_MATH_INLINES (they come from the shared tcl.m4 file) but that has no effect on the issue in this report.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [3526bd2887] (rid 106871) by mdejong on 2001-09-08 12:40:22:
- icomment:
Logged In: YES user_id=90858 I took a look at the .h files and it does seem like something funny is going on. Thing is, passing -fno-builtin does seem to work for me. % make tclCmdMZ.o CFLAGS="-O" % nm tclCmdMZ.o | grep strtod U __strtod_internal % make tclCmdMZ.o CFLAGS="" % nm tclCmdMZ.o | grep strtod U strtod % make tclCmdMZ.o CFLAGS="-fno-builtin" % nm tclCmdMZ.o | grep strtod U strtod Do you still get a ref to __strtod_internal when passing -fno-builtin? If not, what do you get? I am running on an x86 box with RH 6.2 in case that matters. - login: "mdejong"
- mimetype: "text/plain"
- username: "mdejong"
- icomment:
Ticket change [e762d14bbe] (rid 104448) by dgp on 2001-09-18 23:23:37:
- icomment:
Logged In: YES user_id=80530 I see exactly the same thing on my Linux system. However: $ make tclCmdMZ.o CFLAGS="-O -fno-builtin" $ nm tclCmdMZ.o | grep strtod U __strtod_internal So, what is the key to success? Is it adding -fno-builtin, or is it just removing -O ? - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [090b8094da] (rid 89655) by mdejong on 2001-09-18 23:53:49:
- closedate changed to: "2001-09-18T16:53:49"
- closer changed to: "mdejong"
- icomment:
Logged In: YES user_id=90858 Doh! You are quite right. The -fno-builtin flag should work but it seems to be broken in this case. I will go ahead and use the -fno-inline flag.
- login: "mdejong"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "mdejong"
Ticket change [d19b48f880] (rid 113385) by dgp on 2003-11-12 11:49:09:
- assignee changed to: "hobbs"
- icomment:
Logged In: YES user_id=80530 Just curious how the commits of Nov. 11, 2003 will impact on this report?
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Remind"
- username: "dgp"
Ticket change [eded7eeb52] (rid 103990) by dgp on 2003-11-12 23:37:00:
- foundin changed to: "obsolete: 8.5a0"
- icomment:
Logged In: YES user_id=80530 looks like the new commits went into HEAD only. On the HEAD, when I follow the steps in this report, I get in the Makefile: COMPAT_OBJS = strtod$U.o I have no idea what that $U is for, but it seems to be produced by the new autoconf-.2.57 generated configure script. Anyhow, it does seem to work, putting strtod.o on the list of compiled files that get put into libtcl. As expected, though, due to the inlining, the compat/strtod() routine is never called. This report is re-opened for Tcl 8.5a0.
- login: "dgp"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "dgp"
Ticket change [766e80d0d3] (rid 105591) by hobbs on 2003-11-13 01:28:53:
- assignee changed to: "dgp"
Ticket change [5bb83a8efd] (rid 118382) by hobbs on 2003-11-13 01:28:54:
- icomment:
Logged In: YES user_id=72656 Feel free to recorrect, but only with checks for that old version. Newer compilers do not have the bug, and it does improve speed to allow inlining.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [6a73c1ddd9] (rid 128151) by dgp on 2007-09-05 23:21:06:
- closedate changed to: "2007-09-05T16:21:06"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Originator: YES This bug was apparently only for the egcs-2.91.66 compiler, and the world has moved on.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Out of Date"
- status changed to: "Closed"
- username: "dgp"