makefiles/CompileNativeLibraries.gmk

Print this page
rev 7983 : 8024265: Enable new build on AIX

*** 93,102 **** --- 93,103 ---- LANG:=C,\ OPTIMIZATION:=$(BUILD_LIBFDLIBM_OPTIMIZATION), \ CFLAGS:=$(CFLAGS_JDKLIB) \ -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include,\ CFLAGS_windows_debug:=-DLOGGING,\ + CFLAGS_aix:=-qfloat=nomaf,\ ARFLAGS:=$(ARFLAGS),\ OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libfdlibm,\ DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES))) else
*** 248,257 **** --- 249,259 ---- LDFLAGS:=$(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_SUFFIX_posix:=-ljvm -lverify, \ LDFLAGS_SUFFIX_solaris:=-lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc,\ LDFLAGS_SUFFIX_linux:=$(LIBDL) $(BUILD_LIBFDLIBM),\ + LDFLAGS_SUFFIX_aix:=$(LIBDL) $(BUILD_LIBFDLIBM) -lm,\ LDFLAGS_SUFFIX_macosx:=-L$(JDK_OUTPUTDIR)/objs/ -lfdlibm \ -framework CoreFoundation \ -framework Security -framework SystemConfiguration, \ LDFLAGS_SUFFIX_windows:=-export:winFileHandleOpen -export:handleLseek \ jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
*** 550,560 **** debug_assert.c \ debug_mem.c \ debug_trace.c \ debug_util.c ! ifneq (,$(filter $(OPENJDK_TARGET_OS), solaris linux)) LIBAWT_FILES += awt_LoadLibrary.c initIDs.c img_colors.c endif ifeq ($(OPENJDK_TARGET_OS),macosx) LIBAWT_FILES += awt_LoadLibrary.c img_colors.c --- 552,562 ---- debug_assert.c \ debug_mem.c \ debug_trace.c \ debug_util.c ! ifneq (,$(filter $(OPENJDK_TARGET_OS), solaris linux aix)) LIBAWT_FILES += awt_LoadLibrary.c initIDs.c img_colors.c endif ifeq ($(OPENJDK_TARGET_OS),macosx) LIBAWT_FILES += awt_LoadLibrary.c img_colors.c
*** 721,730 **** --- 723,733 ---- MAPFILE:=$(LIBAWT_MAPFILE), \ LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN),\ 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 \ -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ -framework JavaNativeFoundation \
*** 966,975 **** --- 969,979 ---- LDFLAGS_windows:=-export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \ -export:ZIP_ReadEntry -export:ZIP_GetNextEntry jvm.lib \ $(WIN_JAVA_LIB),\ LDFLAGS_SUFFIX_linux:=-ljvm -ljava $(LIBZ),\ LDFLAGS_SUFFIX_solaris:=-ljvm -ljava $(LIBZ) -lc,\ + 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)\ -D "JDK_FNAME=zip.dll" \ -D "JDK_INTERNAL_NAME=zip" \
*** 1031,1040 **** --- 1035,1047 ---- LIBATTACH_EXCLUDE_FILES+=LinuxVirtualMachine.c endif ifneq ($(OPENJDK_TARGET_OS),macosx) LIBATTACH_EXCLUDE_FILES+=BsdVirtualMachine.c endif + ifneq ($(OPENJDK_TARGET_OS),aix) + LIBATTACH_EXCLUDE_FILES+=AixVirtualMachine.c + 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,\
*** 1253,1262 **** --- 1260,1270 ---- LDFLAGS_solaris:=/usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2,\ LDFLAGS_windows:=$(WIN_AWT_LIB) $(WIN_JAVA_LIB),\ 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" \ -D "JDK_INTERNAL_NAME=lcms" \ -D "JDK_FTYPE=0x2L",\
*** 1386,1395 **** --- 1394,1404 ---- LDFLAGS:=$(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN),\ 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 \ $(WIN_AWT_LIB),\ VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
*** 1400,1410 **** OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libfontmanager,\ DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES))) $(BUILD_LIBFONTMANAGER) : $(BUILD_LIBAWT) ! ifneq (,$(findstring $(OPENJDK_TARGET_OS),solaris macosx)) $(BUILD_LIBFONTMANAGER) : $(BUILD_LIBAWT_XAWT) endif BUILD_LIBRARIES += $(BUILD_LIBFONTMANAGER) --- 1409,1419 ---- OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libfontmanager,\ DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES))) $(BUILD_LIBFONTMANAGER) : $(BUILD_LIBAWT) ! ifneq (,$(findstring $(OPENJDK_TARGET_OS),solaris macosx aix)) $(BUILD_LIBFONTMANAGER) : $(BUILD_LIBAWT_XAWT) endif BUILD_LIBRARIES += $(BUILD_LIBFONTMANAGER)
*** 1537,1546 **** --- 1546,1556 ---- MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libjawt/mapfile-vers, \ LDFLAGS:=$(LDFLAGS_JDKLIB) \ $(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),\ OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjawt,\ DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
*** 1620,1638 **** -framework Cocoa -framework Security -framework ApplicationServices,\ LDFLAGS_SUFFIX:=$(LIBINSTRUMENT_LDFLAGS_SUFFIX),\ 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),\ VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\ RC_FLAGS:=$(RC_FLAGS)\ -D "JDK_FNAME=instrument.dll" \ -D "JDK_INTERNAL_NAME=instrument" \ -D "JDK_FTYPE=0x2L",\ OBJECT_DIR:=$(LIBINSTRUMENT_DIR),\ DEBUG_SYMBOLS:=true)) ! ifneq (,$(findstring $(OPENJDK_TARGET_OS), macosx windows)) $(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) endif $(BUILD_LIBINSTRUMENT) : $(BUILD_LIBJAVA) --- 1630,1649 ---- -framework Cocoa -framework Security -framework ApplicationServices,\ LDFLAGS_SUFFIX:=$(LIBINSTRUMENT_LDFLAGS_SUFFIX),\ 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" \ -D "JDK_INTERNAL_NAME=instrument" \ -D "JDK_FTYPE=0x2L",\ OBJECT_DIR:=$(LIBINSTRUMENT_DIR),\ DEBUG_SYMBOLS:=true)) ! 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) endif $(BUILD_LIBINSTRUMENT) : $(BUILD_LIBJAVA)
*** 1686,1695 **** --- 1697,1707 ---- LDFLAGS:=$(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN),\ 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" \ -D "JDK_INTERNAL_NAME=management" \ -D "JDK_FTYPE=0x2L",\
*** 1808,1818 **** endif LIBNET_CFLAGS:=$(foreach dir,$(LIBNET_SRC_DIRS),-I$(dir)) LIBNET_EXCLUDE_FILES:= ! ifneq ($(OPENJDK_TARGET_OS),linux) LIBNET_EXCLUDE_FILES += linux_close.c endif ifneq ($(OPENJDK_TARGET_OS),macosx) LIBNET_EXCLUDE_FILES += bsd_close.c --- 1820,1830 ---- endif LIBNET_CFLAGS:=$(foreach dir,$(LIBNET_SRC_DIRS),-I$(dir)) LIBNET_EXCLUDE_FILES:= ! ifeq (,$(filter $(OPENJDK_TARGET_OS), linux aix)) LIBNET_EXCLUDE_FILES += linux_close.c endif ifneq ($(OPENJDK_TARGET_OS),macosx) LIBNET_EXCLUDE_FILES += bsd_close.c
*** 1839,1848 **** --- 1851,1861 ---- LDFLAGS:=$(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN),\ 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, \ VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\ RC_FLAGS:=$(RC_FLAGS)\
*** 1959,1968 **** --- 1972,1996 ---- SolarisWatchService.c \ UnixCopyFile.c \ UnixNativeDispatcher.c endif + ifeq ($(OPENJDK_TARGET_OS), aix) + BUILD_LIBNIO_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS) + 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),\ SRC:=$(BUILD_LIBNIO_SRC),\ INCLUDE_FILES:=$(BUILD_LIBNIO_FILES), \
*** 1972,1981 **** --- 2000,2010 ---- $(BUILD_LIBNIO_CFLAGS),\ MAPFILE:=$(BUILD_LIBNIO_MAPFILE), \ 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) \ $(JDK_OUTPUTDIR)/objs/libnet/net.lib \ advapi32.lib,\
*** 1995,2005 **** ########################################################################################## ifeq ($(OPENJDK_TARGET_OS_API),posix) ! ifneq ($(OPENJDK_TARGET_OS),macosx) SCTP_WERROR := -Werror ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc) SCTP_WERROR := endif --- 2024,2034 ---- ########################################################################################## ifeq ($(OPENJDK_TARGET_OS_API),posix) ! ifeq (,$(filter $(OPENJDK_TARGET_OS), macosx aix)) SCTP_WERROR := -Werror ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc) SCTP_WERROR := endif
*** 2125,2134 **** --- 2154,2164 ---- LDFLAGS_linux:=$(call SET_SHARED_LIBRARY_ORIGIN,/..),\ LDFLAGS_solaris:=$(call SET_SHARED_LIBRARY_ORIGIN,/..),\ 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 \ -export:JLI_ManifestIterate \ -export:JLI_SetTraceLauncher \
*** 2190,2199 **** --- 2220,2244 ---- $(JDK_OUTPUTDIR)/objs/libjli_static.a : $(BUILD_LIBJLI_STATIC) $(call install-file) BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a + + else ifeq ($(OPENJDK_TARGET_OS), aix) + $(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 ########################################################################################## ifndef OPENJDK
*** 2411,2420 **** --- 2456,2466 ---- -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \ -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR),\ 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,\ LDFLAGS_SUFFIX_macosx:=-ljvm $(LIBCXX) -lawt $(LIBDL) -ljava \ -framework Accelerate \ -framework ApplicationServices \ -framework Cocoa \
*** 2815,2824 **** --- 2861,2874 ---- ifeq ($(OPENJDK_TARGET_OS), linux) EXTRA_SOUND_JNI_LIBS += jsoundalsa LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX endif # OPENJDK_TARGET_OS linux + ifeq ($(OPENJDK_TARGET_OS), aix) + LIBJSOUND_CFLAGS += -DX_PLATFORM=X_AIX + endif # OPENJDK_TARGET_OS linux + ifeq ($(OPENJDK_TARGET_OS), macosx) LIBJSOUND_LANG:=C++ LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX \ -DUSE_PORTS=TRUE \ -DUSE_DAUDIO=TRUE \