This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ARM] bits/hwcap.h update


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.

> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]