This is the mail archive of the
mailing list for the glibc project.
Re: [WIP] glibc: Use /lib/ld-linux-armhf.so.3 for ARM's-mfloat-abi=hard ABI.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "Carlos O'Donell" <carlos at systemhalted dot org>
- Cc: libc-ports at sourceware dot org, libc-alpha at sourceware dot org
- Date: Mon, 7 May 2012 11:47:05 -0700 (PDT)
- Subject: Re: [WIP] glibc: Use /lib/ld-linux-armhf.so.3 for ARM's-mfloat-abi=hard ABI.
- References: <4F886201.firstname.lastname@example.org><4F886277.email@example.com><20120413173512.5D52B2C074@topped-with-meat.com><CADZpyiyr3d8VrBwp_WQyg1H_=w-8hyHw82Vck6U2kv49JtFxPg@mail.gmail.com><4F9515D5.firstname.lastname@example.org><4F99B990.email@example.com><Pine.LNX.firstname.lastname@example.org><20120426220656.0CC302C0D3@topped-with-meat.com><CADZpyiw=iR9DURWUwY81FS-miA+gFNQdsK7Fkgo_GJAPzJ11email@example.com><CADZpyiwSnQmxsYRMW0zu2uusoq2xf4mVhTjZHUNs+aTq3herPg@mail.gmail.com>
I trimmed the CC of people probably not very interested in arcane libc
build internals, and added libc-alpha since we're now talking about
possibly changing the generic build infrastructure.
> Except that this idea doesn't work because the implicit rule uses
> -undef and I didn't notice that.
> Therefore __ARM_PCS_VFP is *never* defined.
I don't really recall, but I suspect that the reason for -undef may have
been just the default predefines like "i386" or "linux" causing problems.
Possibly there once was a principle that this mechanism should only be
used for testing things we defined in config.h or other such places
rather than predefines--the same general principle by which we prefer
sysdeps file selection to #ifdef on predefines. But here we have a case
where using the predefine seems sensible enough. There's no need to
enforce such a philosophy mechanically so it constrains all cases. We
can just do it socially through code review, to constrain reliance on
predefines to the very few cases where we really think it's the wise choice.
Just dropping -undef will break things by replacing all "linux" with "1"
and so forth. In some trivial experiments on my random system version of
GCC, -std=c99 or -std=c89 does not eliminate the nonstandard predefines
(non-__ names), but -ansi does--despite the GCC manual's claim that -ansi
is equivalent to -std=c89. So we could use -ansi instead of -undef,
though that feels a little icky because it's so nonobvious (and contrary
to documentation) that this is what has that effect.
Conversely, I can see a doing a generalized version of configure-time
tests for predefines. i.e.
would expand to a check that adds __ARM_PCS_VFP to an extra config.h-like
file (or maybe just a config.make variable, for simplicity at the cost of
full dependency tracking goodness) if predefined at configure time.