identifier name clash between hotspot and glibc
Tom Rodriguez
tom.rodriguez at oracle.com
Fri Oct 21 12:53:12 PDT 2011
http://cr.openjdk.java.net/~never/7103224
27 lines changed: 0 ins; 2 del; 25 mod; 10809 unchg
7103224: collision between __LEAF define in interfaceSupport.hpp and /usr/include/sys/cdefs.h with gcc
Reviewed-by: never
Contributed-by: Omair Majid <omajid at redhat.com>
glibc has recently added a macro __LEAF to /usr/include/sys/cdefs.h,
which conflicts with the definition of the macro in hotspot. The name
was updated to be more friendly along with other related ones. I also
removed a dead definition of MAXFLOAT that was colliding on some Apple
builds.
On Oct 21, 2011, at 7:10 AM, Omair Majid wrote:
> On 10/20/2011 02:18 PM, Tom Rodriguez wrote:
>> On Oct 20, 2011, at 8:36 AM, Omair Majid wrote:
>>> From this, it sounds like hotspot should not be using these
>>> identifiers. A search for '#define __' shows about 81 matches [3],
>>> but only __LEAF is causing a problem right now.
>>
>> most of those are defines of __ by itself which while dubious is a
>> widespread idiom and doesn't appear likely to clash, or at least I
>> don't want to change it until we have to. The remaining ones seem
>> pretty benign so I think we can leave them alone until we have
>> problems.
>>
>>>
>>> Does anyone have any thoughts on how I should go about fixing it?
>>> Does renaming __LEAF to something like VM_LEAF or even LEAF__ make
>>> sense?
>>
>> VM_LEAF_BASE makes sense to me. Can you fix __ENTRY and
>> __QUICK_ENTRY similarly? I filed 7103224 for this.
>>
>
> Thanks for the suggestions. I have posted a webrev at:
> http://cr.openjdk.java.net/~omajid/webrevs/7103224-glibc-name-clash/webrev.01/
>
> It is against hg.openjdk.java.net/hsx/hotspot-main/. I couldnt get the entire JDK to compile - I ran into build issues with jaxws (I am not sure how buildable this tree is right now). 'make hotspot' worked fine.
>
> Thanks,
> Omair
More information about the hotspot-dev
mailing list