changeset 9187:48e71aa633bd

8028066: PPC64: 8025715 changes broke AIX build after sync Summary: fixes the build on AIX again after the latest sync from jdk8 Reviewed-by: kvn
author simonis
date Fri, 08 Nov 2013 18:17:06 +0100
parents d152c5b01ea8
children 488eade6d510
files makefiles/CompileJavaClasses.gmk makefiles/CompileLaunchers.gmk makefiles/gendata/GendataFontConfig.gmk makefiles/lib/Awt2dLibraries.gmk makefiles/lib/CoreLibraries.gmk makefiles/lib/NetworkingLibraries.gmk makefiles/lib/NioLibraries.gmk makefiles/lib/ServiceabilityLibraries.gmk makefiles/lib/SoundLibraries.gmk
diffstat 9 files changed, 73 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/makefiles/CompileJavaClasses.gmk	Tue Nov 05 17:32:53 2013 -0800
+++ b/makefiles/CompileJavaClasses.gmk	Fri Nov 08 18:17:06 2013 +0100
@@ -152,7 +152,9 @@
              sun/nio/fs/AixFileStore.java \
              sun/nio/fs/AixFileSystem.java \
              sun/nio/fs/AixFileSystemProvider.java \
-             sun/nio/fs/AixNativeDispatcher.java
+             sun/nio/fs/AixNativeDispatcher.java \
+             sun/tools/attach/AixAttachProvider.java \
+             sun/tools/attach/AixVirtualMachine.java
 endif
 
 # Exclude BreakIterator classes that are just used in compile process to generate
@@ -303,6 +305,11 @@
     sun/security/pkcs11 \
     #
 
+AIX_SRC_DIRS :=
+ifeq ($(OPENJDK_TARGET_OS),aix)
+     AIX_SRC_DIRS += $(JDK_TOPDIR)/src/aix/classes
+endif
+
 # The exception handling of swing beaninfo
 # These resources violates the convention of having code and resources together under
 # $(JDK_TOPDIR)/src/.../classes directories
@@ -327,6 +334,7 @@
     SRC:=$(JDK_TOPDIR)/src/share/classes \
         $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
         $(MACOSX_SRC_DIRS) \
+        $(AIX_SRC_DIRS) \
         $(JDK_OUTPUTDIR)/gensrc \
         $(JDK_OUTPUTDIR)/gensrc_no_srczip \
         $(CLOSED_SRC_DIRS),\
--- a/makefiles/CompileLaunchers.gmk	Tue Nov 05 17:32:53 2013 -0800
+++ b/makefiles/CompileLaunchers.gmk	Fri Nov 08 18:17:06 2013 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -626,7 +626,7 @@
 LINK_JSPAWNHELPER_OBJECTS := $(JDK_OUTPUTDIR)/objs/libjava/childproc.o
 LINK_JSPAWNHELPER_FLAGS :=
 
-ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris), )
+ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
   BUILD_JSPAWNHELPER := 1
 endif
 
@@ -635,7 +635,7 @@
 endif
 
 ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
-  LINK_JSPAWNHELPER_FLAGS += -m64
+  LINK_JSPAWNHELPER_FLAGS += $(COMPILER_TARGET_BITS_FLAG)64
 endif
 
 ifeq ($(BUILD_JSPAWNHELPER), 1)
--- a/makefiles/gendata/GendataFontConfig.gmk	Tue Nov 05 17:32:53 2013 -0800
+++ b/makefiles/gendata/GendataFontConfig.gmk	Fri Nov 08 18:17:06 2013 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -68,7 +68,7 @@
 
 ifeq ($(OPENJDK_TARGET_OS), aix)
   GENDATA_FONT_CONFIG_SRC_DIR    := \
-      $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
+      $(JDK_TOPDIR)/src/aix/classes/sun/awt/fontconfigs
   GENDATA_FONT_CONFIG_SRC_FILES  := fontconfig.properties
   GENDATA_FONT_CONFIG_SRC_PREFIX := aix.
 endif
--- a/makefiles/lib/Awt2dLibraries.gmk	Tue Nov 05 17:32:53 2013 -0800
+++ b/makefiles/lib/Awt2dLibraries.gmk	Fri Nov 08 18:17:06 2013 +0100
@@ -305,7 +305,7 @@
     debug_trace.c \
     debug_util.c
 
-ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris linux))
+ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris linux aix))
   LIBAWT_FILES += awt_LoadLibrary.c initIDs.c img_colors.c
 endif
 
@@ -473,6 +473,7 @@
     LDFLAGS_solaris := -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
     LDFLAGS_SUFFIX_linux := -ljvm $(LIBM) $(LIBDL) -ljava, \
     LDFLAGS_SUFFIX_solaris := -ljvm $(LIBM) $(LIBDL) -ljava -lc, \
+    LDFLAGS_SUFFIX_aix :=-ljvm $(LIBM) $(LIBDL) -ljava -lm,\
     LDFLAGS_SUFFIX_macosx := -lmlib_image -ljvm $(LIBM) \
         -framework Cocoa \
         -framework OpenGL \
@@ -681,6 +682,7 @@
     LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc, \
     LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm, \
     LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm, \
+    LDFLAGS_SUFFIX_aix := -lm -lawt -ljava -ljvm,\
     VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=lcms.dll" \
@@ -819,6 +821,7 @@
     LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
     LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
     LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
+    LDFLAGS_SUFFIX_aix := -lawt -lawt_xawt $(LIBM) $(LIBCXX) -ljava -ljvm,\
     LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
         -ljava -ljvm, \
     LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
@@ -833,7 +836,7 @@
 
 $(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
 
-ifeq ($(OPENJDK_TARGET_OS), solaris)
+ifneq (, $(findstring $(OPENJDK_TARGET_OS), solaris aix))
   $(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT_XAWT)
 endif
 
@@ -968,6 +971,7 @@
           $(call SET_SHARED_LIBRARY_ORIGIN), \
       LDFLAGS_solaris := -L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
       LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
+      LDFLAGS_SUFFIX_aix := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX),\
       LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
       LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
           -framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \
@@ -1168,6 +1172,7 @@
         LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
         REORDER := $(LIBAWT_HEADLESS_REORDER), \
         LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
+        LDFLAGS_SUFFIX_aix := -ljvm -lawt -ljava,\
         LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
         OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_headless, \
         DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
--- a/makefiles/lib/CoreLibraries.gmk	Tue Nov 05 17:32:53 2013 -0800
+++ b/makefiles/lib/CoreLibraries.gmk	Fri Nov 08 18:17:06 2013 +0100
@@ -269,7 +269,7 @@
         $(WIN_JAVA_LIB), \
     LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \
     LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \
-    LDFLAGS_SUFFIX_aix: = -ljvm -ljava $(LIBZ),\
+    LDFLAGS_SUFFIX_aix := -ljvm -ljava $(LIBZ),\
     LDFLAGS_SUFFIX_macosx := $(LIBZ) -ljava -ljvm, \
     VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
     RC_FLAGS := $(RC_FLAGS) \
@@ -418,6 +418,7 @@
     LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
     LDFLAGS_SUFFIX_solaris := $(LIBZ) $(LIBDL) -lc, \
     LDFLAGS_SUFFIX_linux := $(LIBZ) $(LIBDL) -lc -lpthread, \
+    LDFLAGS_SUFFIX_aix := $(LIBZ) $(LIBDL),\
     LDFLAGS_SUFFIX_macosx := $(LIBZ), \
     LDFLAGS_SUFFIX_windows := \
         -export:JLI_Launch \
@@ -483,6 +484,22 @@
 	$(call install-file)
 
   BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
+
+else ifeq ($(OPENJDK_TARGET_OS), aix)
+  # AIX also requires a static libjli because the compiler doesn't support '-rpath'
+  $(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC,\
+      STATIC_LIBRARY:=jli_static,\
+      OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs,\
+      SRC:=$(BUILD_LIBJLI_SRC_DIRS),\
+      INCLUDE_FILES:=$(BUILD_LIBJLI_FILES),\
+      LANG:=C,\
+      OPTIMIZATION:=HIGH, \
+      CFLAGS:=$(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS),\
+      ARFLAGS:=$(ARFLAGS),\
+      OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjli_static))
+
+  BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
+
 endif
 
 ##########################################################################################
--- a/makefiles/lib/NetworkingLibraries.gmk	Tue Nov 05 17:32:53 2013 -0800
+++ b/makefiles/lib/NetworkingLibraries.gmk	Fri Nov 08 18:17:06 2013 +0100
@@ -37,7 +37,7 @@
 LIBNET_CFLAGS := $(foreach dir, $(LIBNET_SRC_DIRS), -I$(dir))
 
 LIBNET_EXCLUDE_FILES :=
-ifneq ($(OPENJDK_TARGET_OS), linux)
+ifeq (, $(filter $(OPENJDK_TARGET_OS), linux aix))
   LIBNET_EXCLUDE_FILES += linux_close.c
 endif
 
@@ -68,6 +68,7 @@
     LDFLAGS_SUFFIX_macosx := -ljvm -ljava, \
     LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lnsl -lsocket $(LIBDL) -lc, \
     LDFLAGS_SUFFIX_linux := $(LIBDL) -ljvm -lpthread -ljava, \
+    LDFLAGS_SUFFIX_aix := $(LIBDL) -ljvm -ljava,\
     LDFLAGS_SUFFIX_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \
         delayimp.lib $(WIN_JAVA_LIB) advapi32.lib \
         -DELAYLOAD:secur32.dll -DELAYLOAD:iphlpapi.dll, \
--- a/makefiles/lib/NioLibraries.gmk	Tue Nov 05 17:32:53 2013 -0800
+++ b/makefiles/lib/NioLibraries.gmk	Fri Nov 08 18:17:06 2013 +0100
@@ -112,6 +112,22 @@
       UnixNativeDispatcher.c
 endif
 
+ifeq ($(OPENJDK_TARGET_OS), aix)
+  BUILD_LIBNIO_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
+  BUILD_LIBNIO_SRC += $(JDK_TOPDIR)/src/aix/native/sun/nio/ch
+  BUILD_LIBNIO_FILES += \
+      AixPollPort.c \
+      InheritedChannel.c \
+      NativeThread.c \
+      PollArrayWrapper.c \
+      UnixAsynchronousServerSocketChannelImpl.c \
+      UnixAsynchronousSocketChannelImpl.c \
+      GnomeFileTypeDetector.c \
+      UnixCopyFile.c \
+      AixNativeDispatcher.c \
+      UnixNativeDispatcher.c
+endif
+
 $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
     LIBRARY := nio, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
@@ -125,6 +141,7 @@
     LDFLAGS := $(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_SUFFIX_linux := -ljava -lnet -lpthread $(LIBDL), \
+    LDFLAGS_SUFFIX_aix := -ljava -lnet $(LIBDL),\
     LDFLAGS_SUFFIX_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \
         -lsendfile -ljava -lnet -lc, \
     LDFLAGS_SUFFIX_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
@@ -148,7 +165,7 @@
 
 ifeq ($(OPENJDK_TARGET_OS_API), posix)
 
-  ifneq ($(OPENJDK_TARGET_OS), macosx)
+  ifeq (, $(filter $(OPENJDK_TARGET_OS), macosx aix))
 
     # Suppress unused parameters required by exported JNI functions.
     SCTP_WERROR := -Werror -Wno-error=unused-parameter
--- a/makefiles/lib/ServiceabilityLibraries.gmk	Tue Nov 05 17:32:53 2013 -0800
+++ b/makefiles/lib/ServiceabilityLibraries.gmk	Fri Nov 08 18:17:06 2013 +0100
@@ -33,11 +33,19 @@
 ifneq ($(OPENJDK_TARGET_OS), macosx)
   LIBATTACH_EXCLUDE_FILES += BsdVirtualMachine.c
 endif
+ifneq ($(OPENJDK_TARGET_OS),aix)
+  LIBATTACH_EXCLUDE_FILES += AixVirtualMachine.c
+endif
+
+LIBATTACH_SRC_FILES := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tools/attach
+ifeq ($(OPENJDK_TARGET_OS),aix)
+  LIBATTACH_SRC_FILES += $(JDK_TOPDIR)/src/aix/native/sun/tools/attach
+endif
 
 $(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
     LIBRARY := attach, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
-    SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tools/attach, \
+    SRC := $(LIBATTACH_SRC_FILES), \
     EXCLUDE_FILES := $(LIBATTACH_EXCLUDE_FILES), \
     LANG := C, \
     OPTIMIZATION := LOW, \
@@ -255,6 +263,7 @@
     LDFLAGS_SUFFIX_macosx := -liconv $(LIBZ), \
     LDFLAGS_SUFFIX_solaris := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL) -lc, \
     LDFLAGS_SUFFIX_linux := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL), \
+    LDFLAGS_SUFFIX_aix := $(LIBZ) -L$(JDK_OUTPUTDIR)/objs -ljli_static $(LIBDL),\
     VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=instrument.dll" \
@@ -263,7 +272,7 @@
     OBJECT_DIR := $(LIBINSTRUMENT_DIR), \
     DEBUG_SYMBOLS := true))
 
-ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows))
+ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows aix))
   $(BUILD_LIBINSTRUMENT): $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
 else
   $(BUILD_LIBINSTRUMENT): $(INSTALL_LIBRARIES_HERE)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
@@ -321,6 +330,7 @@
     LDFLAGS_solaris := -lkstat, \
     LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
     LDFLAGS_SUFFIX_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
+    LDFLAGS_SUFFIX_aix := -lperfstat,\
     VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=management.dll" \
--- a/makefiles/lib/SoundLibraries.gmk	Tue Nov 05 17:32:53 2013 -0800
+++ b/makefiles/lib/SoundLibraries.gmk	Fri Nov 08 18:17:06 2013 +0100
@@ -72,8 +72,8 @@
 endif # OPENJDK_TARGET_OS linux
 
 ifeq ($(OPENJDK_TARGET_OS), aix)
-	LIBJSOUND_CFLAGS += -DX_PLATFORM=X_AIX
-endif # OPENJDK_TARGET_OS linux
+  LIBJSOUND_CFLAGS += -DX_PLATFORM=X_AIX
+endif # OPENJDK_TARGET_OS aix
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
   LIBJSOUND_LANG := C++