Build OpenJDK class library on AIX

Jonathan Lu luchsh at linux.vnet.ibm.com
Mon Aug 13 06:40:47 PDT 2012


Hi folks,

I've just pushed the last series of patches to enable OpenJDK class 
library to be built on AIX platform, if you pull the latest source code, 
it should be able to build on AIX 64bit platform successfully. But 
please notice that these patches does not bring all the features from 
Java7 specification, such as asynchronous channels or SCTP, only mean to 
be a starting point for current stage.

Among those changes, there're several non-trivial ones, I'm listing them 
here to catch your eyes, if you have any better ideas please just give a 
comment :)

AWT bring up
http://hg.openjdk.java.net/ppc-aix-port/jdk7u/jdk/rev/478a5641010f

Network interface enumeration
http://hg.openjdk.java.net/ppc-aix-port/jdk7u/jdk/rev/84c19032331c

Use MacOSX' BsdVirtualMachine to provide tools/attach
http://hg.openjdk.java.net/ppc-aix-port/jdk7u/jdk/rev/a628a353f05e

Host entry retrieval
http://hg.openjdk.java.net/ppc-aix-port/jdk7u/jdk/rev/6f14c4e89fbf


BTW for my AIX build, I was using VM of IBMSDK as import VM for now 
(will try HotSpot soon), so have to apply following change as workaround,

diff -r 6f14c4e89fbf src/share/native/common/check_code.c
--- a/src/share/native/common/check_code.c    Mon Aug 13 20:59:18 2012 +0800
+++ b/src/share/native/common/check_code.c    Mon Aug 13 21:09:57 2012 +0800
@@ -4258,7 +4258,13 @@
      JNIEnv *env = context->env;
      jclass cb = context->class;
      const char *classname = JVM_GetCPFieldClassNameUTF(env, cb, index);
+
+#if !defined(AIX)
      const char *fieldname = JVM_GetCPFieldNameUTF(env, cb, index);
+#else
+    const char *fieldname = null;
+#endif
+
      jio_fprintf(stdout, "  <%s.%s>",
                  classname ? classname : "", fieldname ? fieldname : "");
      JVM_ReleaseUTF(classname);
diff -r 6f14c4e89fbf src/share/native/java/lang/Thread.c
--- a/src/share/native/java/lang/Thread.c    Mon Aug 13 20:59:18 2012 +0800
+++ b/src/share/native/java/lang/Thread.c    Mon Aug 13 21:09:57 2012 +0800
@@ -56,7 +56,9 @@
      {"holdsLock",        "(" OBJ ")Z", (void *)&JVM_HoldsLock},
      {"getThreads",        "()[" THD,   (void *)&JVM_GetAllThreads},
      {"dumpThreads",      "([" THD ")[[" STE, (void *)&JVM_DumpThreads},
+#if !defined(AIX)
      {"setNativeName",    "(" STR ")V", (void *)&JVM_SetNativeThreadName},
+#endif
  };

  #undef THD


Thanks
Jonathan



More information about the ppc-aix-port-dev mailing list