Review OSX universal mode patch

Henri Gomez henri.gomez at gmail.com
Thu May 10 01:59:20 PDT 2012


> 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 .

...

/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc -Os -x
objective-c    -fno-strict-aliasing -fPIC -W -Wall  -Wno-unused
-Wno-parentheses -arch i386 -arch x86_64 -D_LITTLE_ENDIAN
-F/System/Library/Frameworks/JavaVM.framework/Frameworks
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
-DJDK_MAJOR_VERSION='"1"' -DJDK_MINOR_VERSION='"7"'
-DJDK_MICRO_VERSION='"0"' -DJDK_BUILD_NUMBER='"20120509"'   -DNDEBUG
-DARCH='"universal"' -Duniversal -D_ALLBSD_SOURCE
-DRELEASE='"1.7.0-jdk7u6-b08"' -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-D_REENTRANT -DMACOSX -I.
-I/Users/henri/Documents/jenkins/data/jobs/openjdk-jdk7u-jdk7u/workspace/build/macosx-universal/tmp/java/java.lang/java/CClassHeaders
-I../../../src/solaris/javavm/export
-I../../../src/share/javavm/export
-I../../../src/share/native/java/lang/fdlibm/include
-I../../../src/share/native/java/io
-I../../../src/solaris/native/java/io
-I../../../src/solaris/native/java/util
-I../../../src/share/native/common
-I../../../src/solaris/native/common
-I../../../src/share/native/java/lang
-I../../../src/solaris/native/java/lang -DRELEASE='"1.7.0-jdk7u6-b08"'
-DARCHPROPNAME='"universal"' -DALT_CODESET_KEY=_NL_CTYPE_CODESET_NAME
  -c -o /Users/henri/Documents/jenkins/data/jobs/openjdk-jdk7u-jdk7u/workspace/build/macosx-universal/tmp/java/java.lang/java/obj/java_props_md.o
 ../../../src/solaris/native/java/lang/java_props_md.c

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.

>> 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 ?



More information about the jdk7u-dev mailing list