Build error on sparc <was> Re: 8026049: (bf) Intrinsify ByteBuffer.put{Int, Double, Float, ...} methods

David Holmes david.holmes at oracle.com
Mon Mar 16 11:41:02 UTC 2015


On 16/03/2015 8:39 PM, Andrew Haley wrote:
> On 03/16/2015 10:30 AM, Paul Sandoz wrote:
>>
>> On Mar 16, 2015, at 11:03 AM, Paul Sandoz <Paul.Sandoz at oracle.com> wrote:
>>
>>> I am running this patch though our JPRT test system right now.
>>>
>>
>> I am getting a build error on spark:
>>
>>    "... /hotspot/src/share/vm/prims/unsafe.cpp", line 335: Error: #error VM_LITTLE_ENDIAN or VM_BIG_ENDIAN must be defined.
>>
>> The assumption seems to be that if VM_LITTLE_ENDIAN is not defined then the platform is implicitly VM_BIG_ENDIAN.
>
> I think that we've exposed something that we should fix now.  As
> John Rose put it,
>
>      Culture of clean: Leave it nicer than you found it
>        – Budget for technical debt, expect and welcome debt removal
>
> VM_LITTLE_ENDIAN or VM_BIG_ENDIAN should be defined on all platforms.

VM_BIG_ENDIAN does not exist in the sources. The only place it exists is in:

./bsd/makefiles/ppc.make:CFLAGS += -DVM_BIG_ENDIAN
./linux/makefiles/ppc.make:CFLAGS += -DVM_BIG_ENDIAN

The expectation is that if VM_LITTLE_ENDIAN is not defined then you are 
big endian. Given the two options are mutually-exclusive a single flag, 
defined or not, covers it.

David

> Andrew.
>



More information about the core-libs-dev mailing list