Code Review for stage_0014_0015

Prepared by:simonis on Tue Sep 10 11:52:29 CEST 2013
Workspace:/net/usr.work/d046063/OpenJDK/ppc-aix-port/stage_0014_0015
Compare against: http://hg.openjdk.java.net/ppc-aix-port/stage
Compare against version:768
Summary of changes: 912 lines changed: 396 ins; 86 del; 430 mod; 39400 unchg
Changeset: stage_0014_0015.changeset
Author comments:

common/autoconf/build-aux/config.guess

On AIX 'config.guess' returns 'powerpc' as architecture but 'powerpc' is implicitely handled as 32-bit architecture in 'platform.m4' so we rewrite it to 'powerpc64' if we're running on a 64-bit kernel.

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 abou 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 "aix" to the set of recognized CPU and OS variants.
  • Call PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS on AIX.
  • After it was pointed out that setting '-q64' as extra flags on the configure command line is not the way it is supposed to work I recalled that we also have this problem on older Linux/PPC64 boxes (e.g. SLES 10) where the default compiler produces 32-bit objects by default. To fix this problem as well, I've inserted a call to PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS followed by a second call to AC_CHECK_SIZEOF([int *], [1111]) in the case where we would otherwise have bailed out because the "TESTED_TARGET_CPU_BITS" differs from the actual "OPENJDK_TARGET_CPU_BITS". I think this change should not affect any existing platforms because it will only be triggered where we woould have bailed out with an error anyway.
  • The workaround for autoconf bug http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html in AC_CHECK_SIZEOF isn't needed any more now that we require at least autoconf-2.69 because the problem was fixed in 2.67. And if I looked at it more carefully I must say that I don't understand the workaround at all. In my opinion, the test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p" will always fail, because the AC_CHECK_SIZEOF macro only writes a define for SIZEOF_INT_P into "confdefs.h" (as can be seen in generated-configure.h) but it never defines it in the shell. And defining SIZEOF_INT_P in the configure shell script wouldn't help if the define written by the AC_CHECK_SIZEOF macro was wrong (as described in the bug). So Ithink the best is to remove the workaround and use "ac_cv_sizeof_int_p" in the places where we used AC_CHECK_SIZEOF before.

common/autoconf/spec.gmk.in
common/autoconf/toolchain.m4

Added new variable COMPILER_TARGET_BITS_FLAG to hold the option name for the 32/64-bit compiler parameter which is -m on the current OpenJDK platforms but -q for xlc on AIX. The variable is exported because it is used in jdk/makefiles/GensrcX11Wrappers.gmk.

common/autoconf/toolchain.m4

  • Detect xlc compiler version on AIX.
  • Don't resolve symbolic links to the xlc compiler becasue 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.
  • 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 soltion 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.

Bug id: Bug ID: JDK-8024265 PPC64: Enable new build on AIX
Legend: Modified file
Deleted file
New file

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw common/autoconf/build-aux/config.guess

rev 769 : 8024265: Enable new build on AIX
Reviewed-by: ihse
16 lines changed: 16 ins; 0 del; 0 mod; 63 unchg

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw common/autoconf/build-performance.m4

rev 769 : 8024265: Enable new build on AIX
Reviewed-by: ihse
5 lines changed: 3 ins; 0 del; 2 mod; 333 unchg

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw common/autoconf/generated-configure.sh

rev 769 : 8024265: Enable new build on AIX
Reviewed-by: ihse
730 lines changed: 259 ins; 72 del; 399 mod; 34561 unchg

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw common/autoconf/help.m4

rev 769 : 8024265: Enable new build on AIX
Reviewed-by: ihse
9 lines changed: 0 ins; 8 del; 1 mod; 209 unchg

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw common/autoconf/libraries.m4

rev 769 : 8024265: Enable new build on AIX
Reviewed-by: ihse
8 lines changed: 8 ins; 0 del; 0 mod; 774 unchg

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw common/autoconf/platform.m4

rev 769 : 8024265: Enable new build on AIX
Reviewed-by: ihse
40 lines changed: 25 ins; 5 del; 10 mod; 479 unchg

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw common/autoconf/spec.gmk.in

rev 769 : 8024265: Enable new build on AIX
Reviewed-by: ihse
2 lines changed: 2 ins; 0 del; 0 mod; 679 unchg

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw common/autoconf/toolchain.m4

rev 769 : 8024265: Enable new build on AIX
Reviewed-by: ihse
91 lines changed: 81 ins; 1 del; 9 mod; 1141 unchg

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw common/makefiles/JavaCompilation.gmk

rev 769 : 8024265: Enable new build on AIX
Reviewed-by: ihse
10 lines changed: 2 ins; 0 del; 8 mod; 580 unchg

Cdiffs Udiffs Sdiffs Frames Old New ----- Raw common/makefiles/NativeCompilation.gmk

rev 769 : 8024265: Enable new build on AIX
Reviewed-by: ihse
1 line changed: 0 ins; 0 del; 1 mod; 581 unchg

This code review page was prepared using /usr/work/d046063/OpenJDK/ppc-aix-port/jdk8/make/scripts/webrev.ksh (vers 24.0-hg+jbs).