Mercurial > hg > openjdk > jdk8u > jdk
changeset 14479:9f55d69c13a7
8267545: [8u] Enable Xcode 12 builds on macOS
Summary: Makefile and source code patches to enable Xcode 12 builds
Reviewed-by: simonis, andrew
Contributed-by: benty@amazon.com, hohensee@amazon.com
author | phh |
---|---|
date | Wed, 09 Jun 2021 21:46:33 +0000 |
parents | 8f0c77f98b2a |
children | 80412c544023 |
files | make/lib/CoreLibraries.gmk src/macosx/native/apple/applescript/AppleScriptExecutionContext.m src/macosx/native/sun/osxapp/ThreadUtilities.h src/share/native/sun/misc/URLClassPath.c |
diffstat | 4 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/make/lib/CoreLibraries.gmk Tue Jun 01 05:34:16 2021 +0100 +++ b/make/lib/CoreLibraries.gmk Wed Jun 09 21:46:33 2021 +0000 @@ -409,6 +409,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" + LIBJLI_CFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN) endif ifneq ($(USE_EXTERNAL_LIBZ), true) @@ -442,7 +443,7 @@ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ - LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \ + LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices -mmacosx-version-min=$(MACOSX_VERSION_MIN), \ LDFLAGS_SUFFIX_solaris := $(LIBZ) $(LIBDL) -lc, \ LDFLAGS_SUFFIX_linux := $(LIBZ) $(LIBDL) -lc -lpthread, \ LDFLAGS_SUFFIX_aix := $(LIBZ) $(LIBDL),\ @@ -503,7 +504,7 @@ LANG := C, \ OPTIMIZATION := HIGH, \ CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \ - LDFLAGS := -nostdlib -r, \ + LDFLAGS := -nostdlib -r -mmacosx-version-min=$(MACOSX_VERSION_MIN), \ OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli_static, \ DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
--- a/src/macosx/native/apple/applescript/AppleScriptExecutionContext.m Tue Jun 01 05:34:16 2021 +0100 +++ b/src/macosx/native/apple/applescript/AppleScriptExecutionContext.m Wed Jun 09 21:46:33 2021 +0000 @@ -26,6 +26,7 @@ #import "AppleScriptExecutionContext.h" #import <Carbon/Carbon.h> +#import <pthread.h> #import "AS_NS_ConversionUtils.h"
--- a/src/macosx/native/sun/osxapp/ThreadUtilities.h Tue Jun 01 05:34:16 2021 +0100 +++ b/src/macosx/native/sun/osxapp/ThreadUtilities.h Wed Jun 09 21:46:33 2021 +0000 @@ -26,7 +26,7 @@ #ifndef __THREADUTILITIES_H #define __THREADUTILITIES_H -#import <pthread.h> +#include <pthread.h> #import "AWT_debug.h"
--- a/src/share/native/sun/misc/URLClassPath.c Tue Jun 01 05:34:16 2021 +0100 +++ b/src/share/native/sun/misc/URLClassPath.c Wed Jun 09 21:46:33 2021 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2021, 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 @@ -24,6 +24,7 @@ */ #include <string.h> +#include <stdlib.h> #include "jni.h" #include "jni_util.h" @@ -31,6 +32,10 @@ #include "jvm.h" #include "jdk_util.h" +/* defined in libverify.so/verify.dll (src file common/check_format.c) */ +extern jboolean VerifyClassname(char *utf_name, jboolean arrayAllowed); +extern jboolean VerifyFixClassname(char *utf_name); + #include "sun_misc_URLClassPath.h" extern char* @@ -55,7 +60,7 @@ // getUTF() throws OOME before returning NULL, no need to throw OOME here return result; } - VerifyFixClassname(clname); + (void)VerifyFixClassname(clname); if (!VerifyClassname(clname, JNI_TRUE)) { /* expects slashed name */ goto done;