Skip to content
Tcl Source Code History Of Ticket 4d72a5f77f268c68
Login

History Of Ticket 4d72a5f77f268c68

Artifacts Associated With Ticket 4d72a5f77f268c68

  1. Ticket change [6f278fff75] (rid 148765) by anonymous on 2016-09-13 14:57:19:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. 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).
      
    5. foundin initialized to: "8.5"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "feaf88b9ff5360927d4e110eb8bf5ebfc61e7c2d"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "53. Configuration and Build Tools"
    15. title initialized to:
      [tcl] unix build of the 8.5 branch fails to build on Mac OS X with LTO (-flto)
      
    16. type initialized to: "Bug"
  2. Ticket change [297db9be39] (rid 217229) by chrstphrchvz on 2023-08-15 08:19:33:

    1. 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.
      
    2. login: "chrstphrchvz"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [e1973d8c39] (rid 218159) by jan.nijtmans on 2023-09-14 07:00:41:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2460201.79214655"
    3. closer changed to: "jan.nijtmans"
    4. icomment: "Closing as Won't-fix for 8.5"
    5. login: "jan.nijtmans"
    6. mimetype: "text/plain"
    7. resolution changed to: "Wont Fix"
    8. status changed to: "Closed"