RFR (M): 8024265: Enable new build on AIX (top level part)
Volker Simonis
volker.simonis at gmail.com
Wed Sep 4 16:22:54 UTC 2013
Hi,
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:
http://cr.openjdk.java.net/~simonis/webrevs/8024265/
With this change and the two HotSpot changes "8023034: PPC64 (part 14):
Implement AIX/PPC64 support in HotSpot
makefiles<http://cr.openjdk.java.net/~simonis/webrevs/8023034/>"
and "8023038: PPC64 (part 15): Platform files for AIX/PPC64
support<http://cr.openjdk.java.net/~simonis/webrevs/8023038>"
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
--x-includes=/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,
Volker
common/autoconf/build-aux/config.guess
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'.
common/autoconf/build-performance.m4
Find the number of CPUs and the memory size on AIX.
common/autoconf/help.m4
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*".
common/autoconf/libraries.m4
Add some AIX-specific settings which we don't want to probe.
common/autoconf/platform.m4
Add "rs6000" (meaning "ppc64") and "aix" to the set of recognized CPU and
OS variants.
common/autoconf/spec.gmk.in
common/autoconf/toolchain.m4
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.
common/autoconf/toolchain.m4
- 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
files.
- Specify various AIX- and xlc-specific commands, suffixes, flags and
options.
common/makefiles/JavaCompilation.gmk
- 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.
common/makefiles/NativeCompilation.gmk
Fixed usage of AR_FLAGS which does not exist as variable by replacing it
with the existing ARFLAGS.
More information about the build-dev
mailing list