Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: cb95468c3808c65f1a32e8e711e1f7eb400aa066
Ticket: 3601804fffffffffffffffffffffffffffffffff
platformCPUID segmentation fault on Darwin
User & Date: nijtmans on 2013-01-27 04:03:43
Changes

  1. icomment:
    > Why is it needed at all?
    It could be needed by any code which wants to detect what
    kind of processor the system has. Currently, only "clock" is
    using it on Windows, but any platform could use it, provided
    the processor is Intel-compatible. See also TIP #377, which
    was rejected at that time, but it could easily be implemented
    for Intel based on cpuid.
    > I think configure.in needs to be updated as well.
    No, the problem here can only be detected at run-time,
    and "configure" doesn't run the code. So there is
    no way configure could detect this.
    >Shouldn't this code be ifdef'ed out ...
    Yes, it should be ifdefed out if the processor is not
    Intel, that's exactly what "configure" does.
    
    The problem that pouryorick found has no
    relation with cpuid, it's the code that gcc
    generates around it which is problematic.
    The compiler option -fPIC needs a special
    register, and when cpuid uses the same
    register, that's the problem that needs to
    be worked around. Without -fPIC it would
    work fine without any of those tricks.
    
    So, I' glad that this is fixed now. Case closed.
    
    
  2. login: "nijtmans"
  3. mimetype: "text/plain"
  4. username: "nijtmans"