Artifacts Associated With Ticket 4d72a5f77f268c68
Ticket change [6f278fff75] (rid 148765) by anonymous on 2016-09-13 14:57:19:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I don't think I ever got around reporting this issue here: Building the generic Unix flavour of Tcl 8.5 on OS X (as done for instance by MacPorts to obtain the interpreter driving the entire build/packaging system) fails when using Link-Time Optimisation (-flto compiler/linker option). When this option is used, the Tcl build system erroneously detects the presence of the pthread_attr_get_np() function which exists only on Linux; as a result, compilation fails on #include <pthread_np.h> . This issue boils down to a failing conftest.c programme generated by the configure script (and I think specified by the tcl.m4 file). In essence, this test does main () { char pthread_attr_get_np(); char (*f)() = pthread_attr_get_np; return f != pthread_attr_get_np; } Semantically, the actual value of f is moot in the boolean expression, which in fact can only evaluate to false. With LTO activated, clang recognises this fact, suppresses the reference to the actual function and as a result does not fail to link when that function isn't available. Adding a call to a function with side-effects (unknown to the linker, such as printf("%p", pthread_attr_get_np); restores the expected behaviour (i.e. the link step fails, and thus the test also). - foundin initialized to: "8.5"
- is_private initialized to: "0"
- login: "anonymous"
- priority initialized to: "5 Medium"
- private_contact initialized to: "feaf88b9ff5360927d4e110eb8bf5ebfc61e7c2d"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "anonymous"
- subsystem initialized to: "53. Configuration and Build Tools"
- title initialized to:
[tcl] unix build of the 8.5 branch fails to build on Mac OS X with LTO (-flto)
- type initialized to: "Bug"
Ticket change [297db9be39] (rid 217229) by chrstphrchvz on 2023-08-15 08:19:33:
- icomment:
Should this be closed as won’t-fix for 8.5? MacPorts has since migrated from Tcl 8.5.19 to 8.6.12 in their 2.8.0 release. The test for <tt>pthread_attr_get_np()</tt> in tcl.m4 was removed in [626938b63a77] (8.6a2). If LTO is still broken in 8.6 then it is not because of that specific test.
- login: "chrstphrchvz"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [e1973d8c39] (rid 218159) by jan.nijtmans on 2023-09-14 07:00:41:
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2460201.79214655"
- closer changed to: "jan.nijtmans"
- icomment: "Closing as Won't-fix for 8.5"
- login: "jan.nijtmans"
- mimetype: "text/plain"
- resolution changed to: "Wont Fix"
- status changed to: "Closed"