Cross Compiling

David Holmes david.holmes at oracle.com
Thu Mar 8 23:50:39 UTC 2012


On 9/03/2012 9:20 AM, David Holmes wrote:
> On 9/03/2012 3:40 AM, martin burtscher wrote:
>> can anybody confirm, that cross compiling is working with make flags:
>>
>> CROSS_COMPILE_ARCH
>> ALT_COMPILER_PATH?
>>
>> With confirm i mean tested and not just read in readme, because theres
>> also a BUILD_HEADLESS_ONLY in the readme which doesn't work.
>
> Cross-compilation works for our internal builds - but they only change
> processor architecture and not the OS (they are all Linux).

Actually there is a piece missing in the README. You may also have to 
set the ARCH make variable for the desired architecture. However if you 
are 'cross compiling" for x86 that would be a problem because the JDK 
side of the build and the Hotspot side of the build use different ARCH 
values for 32-bit x86 (i586 and i686 respectively).

I'm not sure if setting CROSS_COMPILE_ARCH=i586 by itself will work. I'm 
trying it out now.

David
-----

> I don't know whether anyone outside Oracle is using this means of
> cross-compiling as they also need the actual target platform sources,
> and those tend to come from other projects (IcedTea, Zero, Shark) with
> their own build mechanisms.
>
> David
>
>> Thanks.
>>
>> Martin



More information about the build-dev mailing list