Merge tag 'jdk-11.0.15-ga' Added tag jdk-11.0.15-ga for changeset 224e1a3fcb2c Bug: 228249482 Test: treehugger Change-Id: I43553f34c2903f9285283ecb6e88b8f18e3c78eb
diff --git a/METADATA b/METADATA new file mode 100644 index 0000000..a9b86d0 --- /dev/null +++ b/METADATA
@@ -0,0 +1,17 @@ +name: "toolchain/jdk/jdk11" +description: + "Source for OpenJDK11" + +third_party { + url { + type: HOMEPAGE + value: "https://github.com/AdoptOpenJDK/openjdk-jdk11u" + } + url { + type: GIT + value: "https://github.com/AdoptOpenJDK/openjdk-jdk11u.git" + } + version: "16567ca85f4f901ac8aea9647e3fbdd1c7c0c037" + last_upgrade_date { year: 2019 month: 5 day: 16 } + license_type: RESTRICTED +}
diff --git a/MODULE_LICENSE_GPL b/MODULE_LICENSE_GPL new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/MODULE_LICENSE_GPL
diff --git a/NOTICE b/NOTICE new file mode 120000 index 0000000..7a694c9 --- /dev/null +++ b/NOTICE
@@ -0,0 +1 @@ +LICENSE \ No newline at end of file
diff --git a/make/autoconf/flags-ldflags.m4 b/make/autoconf/flags-ldflags.m4 index a4c7fde..0ef152b 100644 --- a/make/autoconf/flags-ldflags.m4 +++ b/make/autoconf/flags-ldflags.m4
@@ -119,6 +119,13 @@ OS_LDFLAGS="-mmacosx-version-min=$MACOSX_VERSION_MIN" fi fi + if test "x$TOOLCHAIN_TYPE" = xclang; then + if test "x$OPENJDK_TARGET_OS" = xlinux; then + OS_LDFLAGS_JVM_ONLY="$OS_LDFLAGS_JVM_ONLY -Wl,-z,noexecstack" + OS_LDFLAGS_JDK_ONLY="$OS_LDFLAGS_JDK_ONLY -Wl,-z,noexecstack" + LIBJSIG_NOEXECSTACK_LDFLAGS="$LIBJSIG_NOEXECSTACK_LDFLAGS -Wl,-z,noexecstack" + fi + fi # Setup debug level-dependent LDFLAGS if test "x$TOOLCHAIN_TYPE" = xgcc; then
diff --git a/make/lib/Lib-java.base.gmk b/make/lib/Lib-java.base.gmk index a529768..74f8f28 100644 --- a/make/lib/Lib-java.base.gmk +++ b/make/lib/Lib-java.base.gmk
@@ -99,7 +99,10 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) # JavaNativeFoundation framework not supported in static builds ifneq ($(STATIC_BUILD), true) + # ANDROID: disable libosxsecurity library, it requires an Apple runtime library to build + ifdef NEVER_BUILD + ################################################################################ $(eval $(call SetupJdkLibrary, BUILD_LIBOSXSECURITY, \ NAME := osxsecurity, \ OPTIMIZATION := LOW, \ @@ -120,6 +123,9 @@ TARGETS += $(BUILD_LIBOSXSECURITY) + ############################################################################# + + endif endif endif
diff --git a/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp b/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp index 2abf08c..375c988 100644 --- a/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp +++ b/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp
@@ -619,7 +619,7 @@ // get the channel name char *channelName; CFStringRef cfname = NULL; - const AudioObjectPropertyAddress address = {kAudioObjectPropertyElementName, port->scope, ch}; + const AudioObjectPropertyAddress address = {kAudioObjectPropertyElementName, port->scope, static_cast<AudioObjectPropertyElement>(ch)}; UInt32 size = sizeof(cfname); OSStatus err = AudioObjectGetPropertyData(mixer->deviceID, &address, 0, NULL, &size, &cfname); if (err == noErr) {
diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java index 4f55800..a1b172c 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java
@@ -85,6 +85,8 @@ /** Switch: are default methods supported? */ private final boolean allowInterfaceBridges; + private final boolean skipDuplicateBridges; + protected TransTypes(Context context) { context.put(transTypesKey, this); compileStates = CompileStates.instance(context); @@ -98,6 +100,7 @@ Source source = Source.instance(context); allowInterfaceBridges = Feature.DEFAULT_METHODS.allowedInSource(source); allowGraphInference = Feature.GRAPH_INFERENCE.allowedInSource(source); + skipDuplicateBridges = Options.instance(context).getBoolean("skipDuplicateBridges", false); annotate = Annotate.instance(context); attr = Attr.instance(context); } @@ -369,6 +372,9 @@ MethodSymbol impl, Type dest) { if (impl != method) { + if (skipBridge(method, impl, dest)) { + return false; + } // If either method or impl have different erasures as // members of dest, a bridge is needed. Type method_erasure = method.erasure(types); @@ -409,6 +415,41 @@ return types.isSameType(erasure(types.memberType(type, method)), erasure); } + /** + * Returns true if a bridge should be skipped because we expect it to be declared in + * a super-type. + * + * @param method The symbol for which a bridge might have to be added + * @param impl The implementation of method + * @param dest The type in which the bridge would go + */ + private boolean skipBridge(MethodSymbol method, + MethodSymbol impl, + Type dest) { + if (!skipDuplicateBridges) { + return false; + } + if (dest.tsym == impl.owner) { + // the method is implemented in the current class; we need to bridge it here + return false; + } + if (!types.isSubtype( + types.erasure(impl.owner.type), types.erasure(method.owner.type))) { + // the method is implemented in some supertype that is not a subtype of + // the declaring type, so the bridge will not have been created in the + // implementing class + return false; + } + if (!impl.overrides(method, (TypeSymbol) impl.owner, types, true)) { + // the method is implementing in a supertype that is also a subtype + // of the declaring type, but the method's signature in the implementing + // class does not override its signature in the declaring class + return false; + } + // we don't need to consider visibility for accessibility bridges, because + // that happens on a separate code path + return true; + } void addBridges(DiagnosticPosition pos, TypeSymbol i,