RFR (M): 8024265: Enable new build on AIX (top level part)

Volker Simonis volker.simonis at gmail.com
Wed Sep 4 09:22:54 PDT 2013


could you please review the following webrev which contains the changes
needed in the top-level repository in order to configure the OpenJDK on AIX:


With this change and the two HotSpot changes "8023034: PPC64 (part 14):
Implement AIX/PPC64 support in HotSpot
and "8023038: PPC64 (part 15): Platform files for AIX/PPC64
it will be possible to configure and build the staging repository on AIX
5.3 and 7.1 up to the jdk repo with the following command:

configure --with-boot-jdk=<jdk-image> --with-jvm-variants=core
--with-jvm-interpreter=cpp --with-extra-cflags=-q64
--with-extra-cxxflags=-q64 --with-cups-include=/opt/freeware/include

The webrev for the jdk repository will follow within the next days...

Below you can find the changes and additions I've done sorted by file. IMHO
the impact on the existing platforms is minimal (I've even fixed some
problems in shared code :)

Thank you and best regards,


On AIX 'config.guess' may return 'powerpc' as architecture but 'powerpc' is
implicitly handled as 32-bit architecture in 'platform.m4' so we always set
it to 'rs6000' which we then map to 'ppc64' in 'platform.m4'.

Find the number of CPUs and the memory size on AIX.

Removed the default break actions in the various case statements because
break is only defined in for, while and until loops and some shells
complain about this with "*break: only meaningful in a `for', `while', or
`until' loop*".

Add some AIX-specific settings which we don't want to probe.

Add "rs6000" (meaning "ppc64") and "aix" to the set of recognized CPU and
OS variants.

Added new variable COMP_MODE_OPTION to hold the option name for the
32/64-bit compiler parameter which is -m on the current OpenJDK platforms
but -m for xlc on AIX.

   - Detect xlc compiler version on AIX.
   - Don't resolve symbolic links to the xlc compiler because on AIX all
   compiler versions (i.e. C and C++) link to the same executable but it is
   crucial to invoke it with the right name to get the desired type.
   - On AIX, add -q64 to the initial CFLAGS and CXXFLAGS such that autoconf
   can auto-detect the right (64-bit) pointer size because the xlc compilers
   would by default generate 32-bit code otherwise.
   - Specify -X64 flag for ar on AIX such that ar can handle 64-bit object
   - Specify various AIX- and xlc-specific commands, suffixes, flags and


   - For some unknown reason, the shell on AIX exits with the error "*/bin/sh:
   syntax error at line 0 : `(' unexpected*" if it executes the following
   commands which are enclosed in multiple parentheses:

      (($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a
-newer $$@ $$($1_GREP_INCLUDES) \
          $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' &&\
          $(ECHO) $$(subst $$(src)/,,$$($1_EXTRA_FILES))) > \
          $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))

   The problem can be easily fixed by separating the parentheses with a
   space character and because I don't think that this will harm any other
   platform it is the solution I chose.
   - Replace xargs by wc for the task of "..trim the whitespace from the
   contents file, to see if it is empty.." because xargs has problems on
   AIX and wc should work just as well if not even better on any other
   OpenJDK platform.


Fixed usage of AR_FLAGS which does not exist as variable by replacing it
with the existing ARFLAGS.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/attachments/20130904/ff84c4e6/attachment.html 

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