Skip to content

don't use CLOCK_SGI_CYCLE on Linux ARM systems #403

@stevengj

Description

@stevengj

We are seeing a build error on Linux with musl libc on ARM (JuliaPackaging/Yggdrasil#13550 (comment)) with --enable-armv8-cntvct-el0 because CLOCK_SGI_CYCLE is defined (for some reason) by the musl time.h header, so then cycle.h ends up trying to define ticks twice.

Probably at least two changes:

  1. In cycle.h, move all of the implementations based on high-level functions like clock_gettime to go below the low-level cycle counters, so that the cycle counters are preferred.
  2. Don't use CLOCK_SGI_CYCLE on non-SGI systems (i.e. on no modern systems)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions