[Arm-dev] backport request to fix a glibc bug in CentOS 7 aarch64

Tue Oct 13 10:13:35 UTC 2015
Stefano Stabellini <stefano.stabellini at eu.citrix.com>

Hi all,

glibc in CentOS 7 aarch64 has a bug: see
https://bugs.launchpad.net/linaro-aarch64/+bug/1169164. Including
signal.h causes the following symbols to be defined (they are actually
in ptrace.h but signal.h includes it):

#define PSR_MODE_EL0t 0x00000000
#define PSR_MODE_EL1t 0x00000004
#define PSR_MODE_EL1h 0x00000005
#define PSR_MODE_EL2t 0x00000008
#define PSR_MODE_EL2h 0x00000009
#define PSR_MODE_EL3t 0x0000000c
#define PSR_MODE_EL3h 0x0000000d
#define PSR_MODE_MASK 0x0000000f

The presence of these symbols causes build failures of some Xen
userspace applications, because they clash with the same symbols there.
signal.h is POSIX so is restricted in what namespace is permitted to
claim.

Glibc has been fixed a while back:
https://sourceware.org/ml/libc-alpha/2014-05/msg00327.html. The commit
is the following:

commit 7d05a8168b45c0580e1f9a79c2dd26c8f0d31fca
Author: Yvan Roux <yvan.roux at linaro.org>
Date:   Tue May 20 13:45:22 2014 +0100

    AArch64: Remove asm/ptrace.h inclusion in sys/user.h and sys/procfs.h

It fixes the problem by removing the inclusion of ptrace.h from two
other headers. The change allows Xen and any other applications which
define PSR_MODE_ symbols to build appropriately. Nothing else should be
affected.

Any chances we can have that patch in the CentOS 7 aarch64 glibc?


Thanks,

Stefano