• Bug#1064538: perftest FTBFS on hppa: get_cycles not implemented

    From John David Anglin@21:1/5 to All on Fri Feb 23 23:10:01 2024
    This is a multi-part MIME message sent by reportbug.


    Source: perftest
    Version: 24.01.0+0.38-1
    Severity: normal
    Tags: ftbfs patch

    Dear Maintainer,

    See: https://buildd.debian.org/status/fetch.php?pkg=perftest&arch=hppa&ver=24.01.0%2B0.38-1&stamp=1708389231&raw=0

    Attached patch fixes build. Please install.

    Regards,
    Dave Anglin


    -- System Information:
    Debian Release: trixie/sid
    APT prefers buildd-unstable
    APT policy: (500, 'buildd-unstable'), (500, 'unstable')
    Architecture: hppa (parisc64)

    Kernel: Linux 6.1.77+ (SMP w/4 CPU threads)
    Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)

    --- ./src/get_clock.h.save 2024-02-23 21:28:08.358672860 +0000
    +++ ./src/get_clock.h 2024-02-23 21:34:51.861653976 +0000
    @@ -114,6 +114,14 @@
    return perf_get_cycles();
    }

    +#elif defined(__hppa__)
    +typedef unsigned long long cycles_t;
    +static inline cycles_t get_cycles(void)
    +{
    + cycles_t clk;
    + asm volatile("mfctl %%cr16, %0" : "=r" (clk));
    + return clk;
    +}
    #else
    #warning get_cycles not implemented for this architecture: attempt asm/timex.h
    #include <asm/timex.h>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)