MacPorts also provides an llvm-gcc-4.2 port; I was able to use this to build 
OpenJDK 7u45 with minimal headache.

The only gotcha was Accelerate.framework's reliance on the 'immintrin.h' 
header. This is a top-level compiler-shipped header that imports subheaders for 
the intrinsics supported by the current target; it's shipped with clang and 
more modern versions of GCC, but not with llvm-gcc-4.2.

I worked around this by providing a header search path containing a copy of 
modern GCC's immintrin.h:
        
http://trac.macports.org/browser/users/landonf/openjdk7/dports/java/openjdk7/files/clang-compat-headers?rev=114871

The full build configuration can be found in my openjdk7 Portfile; it's not too 
hard to read, even if you're unfamiliar with MacPorts:
        
http://trac.macports.org/browser/users/landonf/openjdk7/dports/java/openjdk7/Portfile?rev=114871

I'll be merging jtreg, openjdk7, and, if I have time, openjdk8 ports over to 
MacPorts trunk in the not-too-distant future.

Cheers,
Landon

On Dec 10, 2013, at 10:05 , Weijun Wang <weijun.w...@oracle.com> wrote:

> What I did is to save a copy of usr dir inside Xcode 4 and run
> 
>  bash configure --with-tools-dir=/saved/xcode4/usr/bin/ ...
> 
> --Max
> 
> On 12/10/13, 22:38, Staffan Larsen wrote:
>> 
>> On 10 dec 2013, at 14:48, William Moore <wmoor...@gmail.com> wrote:
>> 
>>> Thanks David
>>> 
>>> Maybe I can do something with Mountain Lion running in a virtual machine. 
>>> I’ll investigate that.
>> 
>> Having multiple XCode versions installed is also a work-around.
>> 
>> /Staffan
>> 
>>> 
>>> William
>>> 
>>> On 9 Dec 2013, at 6:26pm, David DeHaven <david.deha...@oracle.com> wrote:
>>> 
>>>> 
>>>>> Back in September when I had Mountain Lion (OS X 10.8) I was able to 
>>>>> build my own version of OpenJDK 7 Update 40.
>>>>> 
>>>>> Now I have Mavericks (OS X 10.9) and it fails to build Hotspot with the 
>>>>> error:
>>>>> 
>>>>>> clang: error: argument unused during compilation: '-fcheck-new’
>>>>> 
>>>>> If I comment out the setting of this value in 
>>>>> hotspot/make/bsd/makefiles/gcc.make I get other errors like:
>>>>> 
>>>>>> hotspot/src/share/vm/adlc/archDesc.cpp:335:35: error: '&&' within '||' 
>>>>>> [-Werror,-Wlogical-op-parentheses]
>>>>> 
>>>>> What do I have to do to make this compile?
>>>>> 
>>>>> I know very little about C programming. Any help will be greatly 
>>>>> appreciated.
>>>>> 
>>>>> Best regards
>>>>> 
>>>>> William
>>>> 
>>>> Building JDK 8 with Xcode 5 is still a work in progress, I don't expect 
>>>> that effort to be backported to 7u so you might need to scrape up a copy 
>>>> of Xcode 4.6 to build with. The big issue is Xcode 5 does not include gcc 
>>>> and 7u does not build with clang without significant changes.
>>>> 
>>>> -DrD-
>>>> 
>>> 
>> 

Reply via email to