Name clashes - was: Re: [RFR]: 8186723: Add SuperH as new architecture for linux

Magnus Ihse Bursie magnus.ihse.bursie at
Wed Aug 30 13:39:51 UTC 2017

On 2017-08-24 15:24, 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.

The platform defines for hotspot does not seem very thought through. As 
you discovered, the "raw -D" defines are short and likely to clash. In 
some cases, they overlap with definitions provided by the toolchain/OS 

I'm happy to help in cleaning this mess up. :)


>> 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.
> Adrian

More information about the hotspot-dev mailing list