This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [ARM] bits/hwcap.h update
- From: Phil Blundell <pb at pbcl dot net>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Cc: nd at arm dot com, Joseph Myers <joseph at codesourcery dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Mon, 12 Dec 2016 20:09:05 +0000
- Subject: Re: [ARM] bits/hwcap.h update
- Authentication-results: sourceware.org; auth=none
- References: <584EE1D4.3080201@arm.com>
On Mon, 2016-12-12 at 17:43 +0000, Szabolcs Nagy wrote:
>
I can propose a patch, however it seems the glibc names for HWCAP
> bits are different than the linux names: HWCAP_ARM_.. vs HWCAP_..
>
> These are linux specific flags as noted in
> https://sourceware.org/ml/libc-ports/2012-08/msg00069.html
> so i'm not sure why the difference.
>
> Does anybody know the reason?
No particular reason that I can remember. At the time the original ARM
hwcap bits were added to glibc, I think the naming probably followed
the pattern that most other architectures were using in glibc, e.g.
HWCAP_386_xx, HWCAP_SPARC_xx. The ARM kernel is a bit of an oddity in
defining just plain HWCAP_xx without any architecture mentioned in the
name, and I suppose it seemed more important at the time to have a
consistent naming convention for the user-visible headers in glibc than
to match the naming used in the kernel. Particularly because the names
of these bits predated the existence of the uapi/ headers by about a
decade, and at the time they were added the kernel definitions were
buried in <asm/elf.h> or some such place that user-space programs were
unlikely ever to see.
However, it's true that the x86 hwcaps are architecturally defined (and
the kernel headers don't even provide names for them as far as I know)
whereas the ARM hwcaps are purely a confection of the kernel, and this
is why the ARM ones are in sysdeps/unix/sysv/linux/arm/dl-procinfo.h
whereas most other ports have them in the OS-independent level of
sysdeps.
p.
>