Name clashes - was: Re: [RFR]: 8186723: Add SuperH as new architecture for linux
david.holmes at oracle.com
Fri Aug 25 01:58:51 UTC 2017
On 24/08/2017 11:24 PM, John Paul Adrian Glaubitz wrote:
> On 08/24/2017 03:20 PM, David Holmes wrote:
>> Ouch! So I have to wonder whether the raw -D for the cpu arch name is
>> really necessary.
>> There's obviously a lot of legacy usage to consider here though. But
>> I've often assumed/
>> expected that if we tell the compiler to build for a specific cpu then
>> the compiler would
>> provide a suitable define (probably underscored) that we could then
>> use in the code if needed.
> I agree. The string "LEGACY" in the identifier seems to confirm that.
> Might be a good idea
> to open a separate bug for the removal of this identifier.
Seems usage of these -D<ARCH> values are pervasive throughout the
hotspot sources, so they won't be going away.
>> Short-term solution would be your option (b) and rename alpha and sh
>> to something unlikely to cause a clash.
> Will do.
> I guess we can merge 8186723 without any changes then? It doesn't rely
> on the legacy
> (lowercase) identifier but on the all-uppercase identifier anyways.
I guess so.
BTW it is odd that this:
#error Method os::dll_load requires that one of following is
AARCH64, ALPHA, ARM, AMD64, IA32, IA64, M68K, MIPS, MIPSEL,
PARISC, __powerpc__, __powerpc64__, S390, SH, __sparc
is a mix of the configure generated -D<ARCH> values and what are
presumably compiler defined ones. It should, for consistency, be using
PPC32, PPC64 and SPARC. <sigh>
More information about the hotspot-dev