diff --git a/makefiles/CompileJavaClasses.gmk b/makefiles/CompileJavaClasses.gmk index ddefbd8043e6700f78beaa354fcdfb1760e7d8eb..bf3d42fb8172ef83f80e9e88cb7e757b1f854773 100644 --- a/makefiles/CompileJavaClasses.gmk +++ b/makefiles/CompileJavaClasses.gmk @@ -152,7 +152,9 @@ ifneq ($(OPENJDK_TARGET_OS),aix) 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 @@ SECURITY_PKGS := \ 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 @@ $(eval $(call SetupJavaCompilation,BUILD_JDK,\ 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),\ diff --git a/makefiles/CompileLaunchers.gmk b/makefiles/CompileLaunchers.gmk index 33e8bdd6b20c05120e7ef297006fefaeae48580b..bda75a32b0413ebf08ab877822b8f5173ba8b53f 100644 --- a/makefiles/CompileLaunchers.gmk +++ b/makefiles/CompileLaunchers.gmk @@ -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 @@ BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR) 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 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) endif ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) - LINK_JSPAWNHELPER_FLAGS += -m64 + LINK_JSPAWNHELPER_FLAGS += $(COMPILER_TARGET_BITS_FLAG)64 endif ifeq ($(BUILD_JSPAWNHELPER), 1) diff --git a/makefiles/gendata/GendataFontConfig.gmk b/makefiles/gendata/GendataFontConfig.gmk index b75e37fbf37fc008a17d0f59804b9a717a6b1dc6..35b502d1c3650b3bd1f1237a5e8d2882826807df 100644 --- a/makefiles/gendata/GendataFontConfig.gmk +++ b/makefiles/gendata/GendataFontConfig.gmk @@ -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 @@ endif 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 diff --git a/makefiles/lib/Awt2dLibraries.gmk b/makefiles/lib/Awt2dLibraries.gmk index c58187a234078caf766c2c31672d013ac1f31d8c..8c786cc5a7c982ba754fbaf05da25facb570778f 100644 --- a/makefiles/lib/Awt2dLibraries.gmk +++ b/makefiles/lib/Awt2dLibraries.gmk @@ -305,7 +305,7 @@ LIBAWT_FILES := \ 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 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \ 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 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \ 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 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \ 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 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \ $(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 @@ else # OPENJDK_TARGET_OS not windows $(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 @@ ifeq ($(BUILD_HEADLESS), true) 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))) diff --git a/makefiles/lib/CoreLibraries.gmk b/makefiles/lib/CoreLibraries.gmk index f83f918ea4884f4b08169afa870ae4b620ec7b81..86070a07c85e9fbe28c5b6b2ff088ff7631c6b2a 100644 --- a/makefiles/lib/CoreLibraries.gmk +++ b/makefiles/lib/CoreLibraries.gmk @@ -269,7 +269,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \ $(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 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \ 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 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx) $(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 ########################################################################################## diff --git a/makefiles/lib/NetworkingLibraries.gmk b/makefiles/lib/NetworkingLibraries.gmk index 546565af91b987c4d6215d62ce9157c022aee10e..e597f1b373f3974e8ee6002593efeab25d83aecd 100644 --- a/makefiles/lib/NetworkingLibraries.gmk +++ b/makefiles/lib/NetworkingLibraries.gmk @@ -37,7 +37,7 @@ endif 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 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNET, \ 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, \ diff --git a/makefiles/lib/NioLibraries.gmk b/makefiles/lib/NioLibraries.gmk index afab1c9c29c74a0ff62e99e8cd22d7a341e0101a..26b0f251f4182e7b7c4364235030ba1917743fda 100644 --- a/makefiles/lib/NioLibraries.gmk +++ b/makefiles/lib/NioLibraries.gmk @@ -112,6 +112,22 @@ ifeq ($(OPENJDK_TARGET_OS), solaris) 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 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \ 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 @@ $(BUILD_LIBNIO): $(BUILD_LIBNET) 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 diff --git a/makefiles/lib/ServiceabilityLibraries.gmk b/makefiles/lib/ServiceabilityLibraries.gmk index 0cc5ad96a88e41177103cd16920622709c0798c6..54662e6bb31bb4ed84931d27016f0ac4dbf5b0f6 100644 --- a/makefiles/lib/ServiceabilityLibraries.gmk +++ b/makefiles/lib/ServiceabilityLibraries.gmk @@ -33,11 +33,19 @@ endif 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 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \ 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 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \ 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 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \ 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" \ diff --git a/makefiles/lib/SoundLibraries.gmk b/makefiles/lib/SoundLibraries.gmk index 5e0ad7ab3f69f8d716419c0198de94b3f73da5a8..3e3f7e3c732a77a945eb721f0dad84944b8942ff 100644 --- a/makefiles/lib/SoundLibraries.gmk +++ b/makefiles/lib/SoundLibraries.gmk @@ -72,8 +72,8 @@ ifeq ($(OPENJDK_TARGET_OS), linux) 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++