Review OSX universal mode patch
David Holmes
david.holmes at oracle.com
Thu May 10 02:24:53 PDT 2012
On 10/05/2012 6:59 PM, Henri Gomez wrote:
>> I don't really understand the above. java_props_md.c must be compiled
>> separately for a 32-bit and 64-bit build. So in the 32-bit build ARCHPROP
>> should be set to i386, and in a 64-bit build it should be set to x86_64.
>> LIBARCH might be "universal" in both cases (is it?) but ARCHPROP should
>> reflect the actual value you want os.arch to report.
>
> ARCHPROP set to universal activate dual build mode .
That seems wrong in itself. ARCHPROP is only supposed to hold the value
to use for the property os.arch. Anything that actually controls the
build "architecture" should be using one of the (many) other "arch" flags.
> ...
>
> Dual build mode
>
>> Sorry if I'm misunderstanding the nuances of universal builds.
>
> 32 and 64bits build mode.
>
> See http://ngmarley.com/blog/osx-universal-binary/ (except PPC not
> related here).
>
> -arch x86_64 and -arch i386 added to compile / link time allow this
> dual build mode.
I see. The reference above states:
"First, the code must be compiled for each architecture (i386, ppc and
x86_64). Each compilation will result in a separate executable (binary)
file.
Then use lipo to merge them into a universal binary."
If it were truly separate compilation then there would not be a problem.
So I assume that objective-c's dual build mode actual does two distinct
compilations using a single invocation. That is both somewhat clever and
truly horrible. :( Can you actually build hotspot using this dual mode?
I would expect we have a lot of build flags where the value changes
depending on whether 32-bit or 64-bit.
>>> Note, it was the way macosx-port did it before all universal support
>>> was removed in jdk7 branch ;(
>>
>> Yes, well the macosx port did a lot of things in ways that were less than
>> desirable. A little got fixed for 7, a little more for 8.
>
> Question remains, could we expect a 32/64 bits JVM from OpenJDK for OSX ?
Not a question I have any input on - sorry.
David
-----
More information about the jdk7u-dev
mailing list