diff --git a/make/autoconf/flags.m4 b/make/autoconf/flags.m4 index 89bb736f2bf..d272c0c3f6d 100644 --- a/make/autoconf/flags.m4 +++ b/make/autoconf/flags.m4 @@ -1166,7 +1166,9 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER], -I${TOPDIR}/src/java.base/$OPENJDK_$1_OS/native/include \ -I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/include \ -I${TOPDIR}/src/java.base/share/native/libjava \ - -I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/libjava" + -I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/libjava \ + -I${TOPDIR}/src/hotspot/share/include \ + -I${TOPDIR}/src/hotspot/os/${HOTSPOT_$1_OS_TYPE}/include" # The shared libraries are compiled using the picflag. $2CFLAGS_JDKLIB="[$]$2COMMON_CCXXFLAGS_JDK \ diff --git a/make/autoconf/generated-configure.sh b/make/autoconf/generated-configure.sh index 49d0fb17a09..311e18ab98e 100644 --- a/make/autoconf/generated-configure.sh +++ b/make/autoconf/generated-configure.sh @@ -972,7 +972,6 @@ HOTSPOT_BUILD_CPU HOTSPOT_BUILD_OS_TYPE HOTSPOT_BUILD_OS OPENJDK_BUILD_BUNDLE_PLATFORM -OPENJDK_BUILD_OS_EXPORT_DIR OPENJDK_BUILD_CPU_OSARCH OPENJDK_BUILD_CPU_ISADIR OPENJDK_BUILD_CPU_LEGACY_LIB @@ -984,7 +983,6 @@ HOTSPOT_TARGET_OS_TYPE HOTSPOT_TARGET_OS DEFINE_CROSS_COMPILE_ARCH OPENJDK_TARGET_BUNDLE_PLATFORM -OPENJDK_TARGET_OS_EXPORT_DIR OPENJDK_TARGET_CPU_OSARCH OPENJDK_TARGET_CPU_ISADIR OPENJDK_TARGET_CPU_LEGACY_LIB @@ -5159,7 +5157,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1512085548 +DATE_WHEN_GENERATED=1512428089 ############################################################################### # @@ -16200,13 +16198,6 @@ $as_echo "$COMPILE_TYPE" >&6; } OPENJDK_TARGET_CPU_JLI="amd64" fi - if test "x$OPENJDK_TARGET_OS" = xmacosx; then - OPENJDK_TARGET_OS_EXPORT_DIR=macosx - else - OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE} - fi - - # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles # Macosx is osx and x86_64 is x64 if test "x$OPENJDK_TARGET_OS" = xmacosx; then @@ -16358,13 +16349,6 @@ $as_echo "$COMPILE_TYPE" >&6; } OPENJDK_BUILD_CPU_JLI="amd64" fi - if test "x$OPENJDK_BUILD_OS" = xmacosx; then - OPENJDK_BUILD_OS_EXPORT_DIR=macosx - else - OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE} - fi - - # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles # Macosx is osx and x86_64 is x64 if test "x$OPENJDK_BUILD_OS" = xmacosx; then @@ -52817,7 +52801,9 @@ fi -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \ -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \ -I${TOPDIR}/src/java.base/share/native/libjava \ - -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava" + -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava \ + -I${TOPDIR}/src/hotspot/share/include \ + -I${TOPDIR}/src/hotspot/os/${HOTSPOT_TARGET_OS_TYPE}/include" # The shared libraries are compiled using the picflag. CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \ @@ -53698,7 +53684,9 @@ fi -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \ -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \ -I${TOPDIR}/src/java.base/share/native/libjava \ - -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava" + -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava \ + -I${TOPDIR}/src/hotspot/share/include \ + -I${TOPDIR}/src/hotspot/os/${HOTSPOT_BUILD_OS_TYPE}/include" # The shared libraries are compiled using the picflag. OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \ diff --git a/make/autoconf/platform.m4 b/make/autoconf/platform.m4 index 0479e145884..f62f94daace 100644 --- a/make/autoconf/platform.m4 +++ b/make/autoconf/platform.m4 @@ -388,13 +388,6 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER], OPENJDK_$1_CPU_JLI="amd64" fi - if test "x$OPENJDK_$1_OS" = xmacosx; then - OPENJDK_$1_OS_EXPORT_DIR=macosx - else - OPENJDK_$1_OS_EXPORT_DIR=${OPENJDK_$1_OS_TYPE} - fi - AC_SUBST(OPENJDK_$1_OS_EXPORT_DIR) - # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles # Macosx is osx and x86_64 is x64 if test "x$OPENJDK_$1_OS" = xmacosx; then diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in index f9bb23a305c..58893e12d22 100644 --- a/make/autoconf/spec.gmk.in +++ b/make/autoconf/spec.gmk.in @@ -78,7 +78,6 @@ OPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@ OPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@ OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@ OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@ -OPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@ HOTSPOT_TARGET_OS := @HOTSPOT_TARGET_OS@ HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_TARGET_OS_TYPE@ diff --git a/make/copy/Copy-java.base.gmk b/make/copy/Copy-java.base.gmk index cc489211b24..a0bcffbc12a 100644 --- a/make/copy/Copy-java.base.gmk +++ b/make/copy/Copy-java.base.gmk @@ -27,24 +27,6 @@ include CopyCommon.gmk $(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk)) -################################################################################ -# -# Copy exported header files to outputdir. -# -TARGETS += \ - $(INCLUDE_DST_DIR)/jni.h \ - $(INCLUDE_DST_DIR)/jvmticmlr.h \ - $(INCLUDE_DST_DIR)/classfile_constants.h \ - $(INCLUDE_DST_OS_DIR)/jni_md.h \ - # - -$(INCLUDE_DST_DIR)/%.h: $(TOPDIR)/src/java.base/share/native/include/%.h - $(call install-file) - -$(INCLUDE_DST_OS_DIR)/%.h: \ - $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include/%.h - $(call install-file) - ################################################################################ ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),) diff --git a/make/copy/Copy-java.desktop.gmk b/make/copy/Copy-java.desktop.gmk index 954faa9eaef..4afbed8f7a4 100644 --- a/make/copy/Copy-java.desktop.gmk +++ b/make/copy/Copy-java.desktop.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2017, 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 @@ -29,20 +29,6 @@ $(eval $(call IncludeCustomExtension, copy/Copy-java.desktop.gmk)) ################################################################################ -TARGETS += \ - $(INCLUDE_DST_DIR)/jawt.h \ - $(INCLUDE_DST_OS_DIR)/jawt_md.h \ - # - -$(INCLUDE_DST_DIR)/%.h: $(TOPDIR)/src/java.desktop/share/native/include/%.h - $(call install-file) - -$(INCLUDE_DST_OS_DIR)/%.h: \ - $(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include/%.h - $(call install-file) - -################################################################################ - ifneq ($(FREETYPE_BUNDLE_LIB_PATH), ) # We need to bundle the freetype library, so it will be available at runtime # as well as link time. diff --git a/make/copy/Copy-jdk.accessibility.gmk b/make/copy/Copy-jdk.accessibility.gmk index bde3206d670..cd8aeba5a11 100644 --- a/make/copy/Copy-jdk.accessibility.gmk +++ b/make/copy/Copy-jdk.accessibility.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2104, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2017, 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 @@ -23,19 +23,7 @@ # questions. # +################################################################################ +# Include CopyCommon.gmk to get exported header files to be properly copied. + include CopyCommon.gmk - -################################################################################ - -ifeq ($(OPENJDK_TARGET_OS), windows) - TARGETS += $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCallbacks.h \ - $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCalls.h \ - $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgePackages.h - - $(INCLUDE_DST_OS_DIR)/bridge/%: \ - $(TOPDIR)/src/jdk.accessibility/windows/native/include/bridge/% - $(install-file) - -endif - -################################################################################ diff --git a/make/copy/Copy-jdk.jdwp.agent.gmk b/make/copy/Copy-jdk.jdwp.agent.gmk index a765567fdd9..cd8aeba5a11 100644 --- a/make/copy/Copy-jdk.jdwp.agent.gmk +++ b/make/copy/Copy-jdk.jdwp.agent.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2017, 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 @@ -23,13 +23,7 @@ # questions. # +################################################################################ +# Include CopyCommon.gmk to get exported header files to be properly copied. + include CopyCommon.gmk - -################################################################################ - -TARGETS := $(INCLUDE_DST_DIR)/jdwpTransport.h - -$(INCLUDE_DST_DIR)/%.h: $(TOPDIR)/src/jdk.jdwp.agent/share/native/include/%.h - $(call install-file) - -################################################################################ diff --git a/make/copy/CopyCommon.gmk b/make/copy/CopyCommon.gmk index c82edd29d4e..7b777cd3645 100644 --- a/make/copy/CopyCommon.gmk +++ b/make/copy/CopyCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2017, 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 @@ -23,15 +23,49 @@ # questions. # -INCLUDE_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE) LIB_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE) CONF_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_conf/$(MODULE) LEGAL_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE) -INCLUDE_DST_OS_DIR := $(INCLUDE_DST_DIR)/$(OPENJDK_TARGET_OS) +################################################################################ +# +# Copy exported include headers files to output directory, if present. +# +INCLUDE_TARGET_DIR := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE) + +$(eval $(call SetupCopyFiles, COPY_EXPORTED_INCLUDE, \ + SRC := $(TOPDIR)/src/$(MODULE)/share/native/include, \ + DEST := $(INCLUDE_TARGET_DIR), \ + FILES := $(wildcard \ + $(TOPDIR)/src/$(MODULE)/share/native/include/* \ + $(TOPDIR)/src/$(MODULE)/share/native/include/*/*), \ +)) + +TARGETS += $(COPY_EXPORTED_INCLUDE) + +# For historical reasons, the OS include directories have odd names. +INCLUDE_TARGET_OS_SUBDIR := $(OPENJDK_TARGET_OS) ifeq ($(OPENJDK_TARGET_OS), windows) - INCLUDE_DST_OS_DIR := $(INCLUDE_DST_DIR)/win32 + INCLUDE_TARGET_OS_SUBDIR := win32 else ifeq ($(OPENJDK_TARGET_OS), macosx) - INCLUDE_DST_OS_DIR := $(INCLUDE_DST_DIR)/darwin + INCLUDE_TARGET_OS_SUBDIR := darwin endif + +# Use the most specific of OS and OS_TYPE. +ifneq ($(wildcard $(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS)/native/include/*), ) + INCLUDE_SOURCE_OS_SUBDIR := $(OPENJDK_TARGET_OS) +else + INCLUDE_SOURCE_OS_SUBDIR := $(OPENJDK_TARGET_OS_TYPE) +endif + +$(eval $(call SetupCopyFiles, COPY_EXPORTED_INCLUDE_OS, \ + SRC := $(TOPDIR)/src/$(MODULE)/$(INCLUDE_SOURCE_OS_SUBDIR)/native/include, \ + DEST := $(INCLUDE_TARGET_DIR)/$(INCLUDE_TARGET_OS_SUBDIR), \ + FILES := $(wildcard \ + $(TOPDIR)/src/$(MODULE)/$(INCLUDE_SOURCE_OS_SUBDIR)/native/include/* \ + $(TOPDIR)/src/$(MODULE)/$(INCLUDE_SOURCE_OS_SUBDIR)/native/include/*/*), \ +)) + +TARGETS += $(COPY_EXPORTED_INCLUDE_OS) + diff --git a/make/gensrc/GensrcX11Wrappers.gmk b/make/gensrc/GensrcX11Wrappers.gmk index b3081b2637a..e506c5c01ff 100644 --- a/make/gensrc/GensrcX11Wrappers.gmk +++ b/make/gensrc/GensrcX11Wrappers.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2017, 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 @@ -92,8 +92,10 @@ ifneq ($(COMPILE_TYPE), cross) endif SIZER_CFLAGS := \ + -I${TOPDIR}/src/hotspot/share/include \ + -I${TOPDIR}/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \ -I$(TOPDIR)/src/java.base/share/native/include \ - -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include \ + -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \ -I$(TOPDIR)/src/java.base/share/native/libjava \ -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ -I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \ diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk index 66ba5033562..77ee5d99df1 100644 --- a/make/hotspot/lib/CompileJvm.gmk +++ b/make/hotspot/lib/CompileJvm.gmk @@ -57,9 +57,10 @@ JVM_CFLAGS_INCLUDES += \ $(patsubst %,-I%,$(filter-out $(JVM_VARIANT_OUTPUTDIR)/gensrc/%, $(JVM_SRC_DIRS))) \ -I$(JVM_VARIANT_OUTPUTDIR)/gensrc \ -I$(TOPDIR)/src/hotspot/share/precompiled \ + -I$(TOPDIR)/src/hotspot/share/include \ + -I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \ -I$(TOPDIR)/src/java.base/share/native/include \ -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \ - -I$(TOPDIR)/src/java.management/share/native/include \ -I$(TOPDIR)/src/java.base/share/native/libjimage \ # diff --git a/make/hotspot/lib/CompileLibjsig.gmk b/make/hotspot/lib/CompileLibjsig.gmk index abdb16261a1..4cd6d39d3f4 100644 --- a/make/hotspot/lib/CompileLibjsig.gmk +++ b/make/hotspot/lib/CompileLibjsig.gmk @@ -57,7 +57,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows) endif else ifeq ($(OPENJDK_TARGET_OS), solaris) - LIBJSIG_CFLAGS := -m64 -KPIC -mt -I $(TOPDIR)/src/java.base/unix/native/include + LIBJSIG_CFLAGS := -m64 -KPIC -mt -I $(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include LIBJSIG_LDFLAGS := -m64 -mt -xnolib LIBJSIG_LIBS := $(LIBDL) diff --git a/make/lib/Lib-java.management.gmk b/make/lib/Lib-java.management.gmk index 6e7edc3b115..f59a6ac05e1 100644 --- a/make/lib/Lib-java.management.gmk +++ b/make/lib/Lib-java.management.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2017, 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 @@ -30,8 +30,8 @@ $(eval $(call IncludeCustomExtension, lib/Lib-java.management.gmk)) ################################################################################ -LIBMANAGEMENT_SRC += $(TOPDIR)/src/java.management/share/native/libmanagement -LIBMANAGEMENT_CFLAGS := -I$(TOPDIR)/src/java.management/share/native/include \ +LIBMANAGEMENT_SRC += $(TOPDIR)/src/java.management/share/native/libmanagement +LIBMANAGEMENT_CFLAGS := -I$(TOPDIR)/src/hotspot/share/include \ $(addprefix -I,$(LIBMANAGEMENT_SRC)) \ -I$(SUPPORT_OUTPUTDIR)/headers/java.management \ $(LIBJAVA_HEADER_FLAGS) \ diff --git a/src/java.base/unix/native/include/jvm_md.h b/src/hotspot/os/posix/include/jvm_md.h similarity index 100% rename from src/java.base/unix/native/include/jvm_md.h rename to src/hotspot/os/posix/include/jvm_md.h diff --git a/src/java.base/windows/native/include/jvm_md.h b/src/hotspot/os/windows/include/jvm_md.h similarity index 100% rename from src/java.base/windows/native/include/jvm_md.h rename to src/hotspot/os/windows/include/jvm_md.h diff --git a/src/java.management/share/native/include/jmm.h b/src/hotspot/share/include/jmm.h similarity index 100% rename from src/java.management/share/native/include/jmm.h rename to src/hotspot/share/include/jmm.h diff --git a/src/java.base/share/native/include/jvm.h b/src/hotspot/share/include/jvm.h similarity index 100% rename from src/java.base/share/native/include/jvm.h rename to src/hotspot/share/include/jvm.h