On Wed, Jan 28, 2015 at 6:52 PM, Michael Gilbert wrote: > elfutils fails to build on arm64. This is fixed in upstream commit > c1e0fcb9311.
Hi, I uploaded an nmu fixing this. Please see attached. Best wishes, Mike
diff -Nru elfutils-0.159/debian/changelog elfutils-0.159/debian/changelog --- elfutils-0.159/debian/changelog 2015-01-26 01:51:07.000000000 +0000 +++ elfutils-0.159/debian/changelog 2015-02-13 22:55:11.000000000 +0000 @@ -1,3 +1,10 @@ +elfutils (0.159-4.2) unstable; urgency=medium + + * Non-maintainer upload. + * Apply an upstream patch to fix the build failure on arm64 (closes: #776523). + + -- Michael Gilbert <mgilb...@asachi.debian.org> Fri, 13 Feb 2015 22:30:44 +0000 + elfutils (0.159-4.1) unstable; urgency=high * Non-maintainer upload by the Security Team. diff -Nru elfutils-0.159/debian/patches/arm64.patch elfutils-0.159/debian/patches/arm64.patch --- elfutils-0.159/debian/patches/arm64.patch 1970-01-01 00:00:00.000000000 +0000 +++ elfutils-0.159/debian/patches/arm64.patch 2015-02-13 22:52:38.000000000 +0000 @@ -0,0 +1,91 @@ +commit c1e0fcb9311c1d136e20e658449367ad8b7f487d +Author: Kyle McMartin <k...@redhat.com> +Date: Mon Jun 9 21:06:26 2014 +0200 + + aarch64: use <sys/user.h> defined register structures + + glibc now supplies these (compatible) structs instead of including the + kernel's <asm/ptrace.h> header, so let's use them. Annoyingly this will + cause new elfutils to FTBFS on old glibc, and vice versa. So include a + new configure check for the new struct names and use the old ones if + they are not avilable. + + Signed-off-by: Kyle McMartin <k...@redhat.com> + Signed-off-by: Mark Wielaard <m...@redhat.com> + +--- a/backends/aarch64_initreg.c ++++ b/backends/aarch64_initreg.c +@@ -36,6 +36,11 @@ + # include <linux/uio.h> + # include <sys/user.h> + # include <sys/ptrace.h> ++/* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ ++# ifndef HAVE_SYS_USER_REGS ++# define user_regs_struct user_pt_regs ++# define user_fpsimd_struct user_fpsimd_state ++# endif + #endif + + #define BACKEND aarch64_ +@@ -51,7 +56,7 @@ aarch64_set_initial_registers_tid (pid_t + #else /* __aarch64__ */ + + /* General registers. */ +- struct user_pt_regs gregs; ++ struct user_regs_struct gregs; + struct iovec iovec; + iovec.iov_base = &gregs; + iovec.iov_len = sizeof (gregs); +@@ -69,7 +74,7 @@ aarch64_set_initial_registers_tid (pid_t + /* ELR cannot be found. */ + + /* FP registers (only 64bits are used). */ +- struct user_fpsimd_state fregs; ++ struct user_fpsimd_struct fregs; + iovec.iov_base = &fregs; + iovec.iov_len = sizeof (fregs); + if (ptrace (PTRACE_GETREGSET, tid, NT_FPREGSET, &iovec) != 0) +--- a/backends/arm_initreg.c ++++ b/backends/arm_initreg.c +@@ -40,6 +40,10 @@ + # include <linux/uio.h> + # include <sys/user.h> + # include <sys/ptrace.h> ++/* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ ++# ifndef HAVE_SYS_USER_REGS ++# define user_regs_struct user_pt_regs ++# endif + #endif + + #define BACKEND arm_ +@@ -67,7 +71,7 @@ arm_set_initial_registers_tid (pid_t tid + #elif defined __aarch64__ + /* Compat mode: arm compatible code running on aarch64 */ + int i; +- struct user_pt_regs gregs; ++ struct user_regs_struct gregs; + struct iovec iovec; + iovec.iov_base = &gregs; + iovec.iov_len = sizeof (gregs); +--- a/configure.ac ++++ b/configure.ac +@@ -357,6 +357,19 @@ eu_version=`expr \( $eu_version + 999 \) + + AC_CHECK_SIZEOF(long) + ++# On aarch64 before glibc 2.20 we would get the kernel user_pt_regs instead ++# of the user_regs_struct from sys/user.h. They are structurally the same ++# but we get either one or the other. ++AC_CHECK_TYPE([struct user_regs_struct], ++ [sys_user_has_user_regs=yes], [sys_user_has_user_regs=no], ++ [[#include <sys/ptrace.h>] ++ [#include <sys/time.h>] ++ [#include <sys/user.h>]]) ++if test "$sys_user_has_user_regs" = "yes"; then ++ AC_DEFINE(HAVE_SYS_USER_REGS, 1, ++ [Define to 1 if <sys/user.h> defines struct user_regs_struct]) ++fi ++ + # On a 64-bit host where can can use $CC -m32, we'll run two sets of tests. + # Likewise in a 32-bit build on a host where $CC -m64 works. + utrace_BIARCH diff -Nru elfutils-0.159/debian/patches/series elfutils-0.159/debian/patches/series --- elfutils-0.159/debian/patches/series 2015-01-26 01:54:23.000000000 +0000 +++ elfutils-0.159/debian/patches/series 2015-02-13 22:52:29.000000000 +0000 @@ -14,3 +14,4 @@ unaligned.patch aarch64-run-native-test-fix.patch CVE-2014-9447.patch +arm64.patch