Bug#1114536: elfutils: FTBFS on hppa - asm/perf_regs.h
Source: elfutils
Version: 0.193-2
Severity: normal
Tags: patch
Dear Maintainer,
The build fails here:
gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"/usr/share/locale"' -I. -I.. -iquote . -I. -I../lib -I.. -I../libebl -I../libasm -I../libelf -I../libdw -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wshadow -Wformat=2 -Wold-style-definition -Wstrict-prototypes -Wtrampolines -Wlogical-op -Wduplicated-cond -Wnull-dereference -Wimplicit-fallthrough=5 -Wuse-after-free=3 -Wunused -Wextra -Wstack-usage=262144 -D_FORTIFY_SOURCE=2 -g -O3 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -Wformat -Werror=format-security -MT i386_regs.o -MD -MP -MF .deps/i386_regs.Tpo -c -o i386_regs.o i386_regs.c
In file included from i386_init.c:37:
libebl_PERF_FLAGS.h:35:11: fatal error: asm/perf_regs.h: No such file or directory
35 | # include <asm/perf_regs.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:843: i386_init.o] Error 1
The linux parisc architecture doesn't currently provide the asm/perf_regs.h
header. It is also not provided by m68k and sh4.
As far as I can tell, perf_regs.h is only used on i386.
With the attached patch, elfutils builds successfully on hppa.
Regards,
Dave Anglin
-- System Information:
Debian Release: forky/sid
APT prefers unreleased
APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: hppa (parisc64)
Kernel: Linux 6.12.44-dirty (SMP w/4 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
--- ./backends/libebl_PERF_FLAGS.h.save 2025-09-06 11:55:40.805860531 -0400
+++ ./backends/libebl_PERF_FLAGS.h 2025-09-06 11:56:21.046461921 -0400
@@ -31,7 +31,7 @@
#ifndef _LIBEBL_PERF_FLAGS_H
#define _LIBEBL_PERF_FLAGS_H 1
-#if defined(__linux__)
+#if defined(__linux__) && !defined(__hppa__)
# include <asm/perf_regs.h>
#endif
Reply to: