RFR: 8295779: Xcode 14.0 fails to build jdk on m1 macos
Archie L. Cobbs
duke at openjdk.org
Thu Nov 10 17:41:32 UTC 2022
On Wed, 19 Oct 2022 15:33:31 GMT, Archie L. Cobbs <duke at openjdk.org> wrote:
> Building on MacOS 12.6 M1 with Xcode 14.0 fails due to C compiler unused parameter warnings:
>
> Creating support/modules_libs/java.desktop/libosx.dylib from 1 file(s)
FWIW here are the patches I'm currently dragging along in order to build the `master` branch:
diff --git a/make/modules/java.desktop/lib/Awt2dLibraries.gmk b/make/modules/java.desktop/lib/Awt2dLibraries.gmk
index b02c0fa6c82..b279178834e 100644
--- a/make/modules/java.desktop/lib/Awt2dLibraries.gmk
+++ b/make/modules/java.desktop/lib/Awt2dLibraries.gmk
@@ -764,6 +764,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
DISABLED_WARNINGS_gcc_splashscreen_sys.c := type-limits unused-result, \
DISABLED_WARNINGS_clang_dgif_lib.c := sign-compare, \
DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \
+ DISABLED_WARNINGS_clang_pngrutil.c := null-pointer-subtraction, \
DISABLED_WARNINGS_clang_splashscreen_impl.c := sign-compare, \
DISABLED_WARNINGS_clang_splashscreen_png.c := incompatible-pointer-types, \
DISABLED_WARNINGS_clang_splashscreen_sys.m := deprecated-declarations, \
diff --git a/src/java.desktop/share/native/liblcms/cmstypes.c b/src/java.desktop/share/native/liblcms/cmstypes.c
index 006f98b084d..9a793f3efb5 100644
--- a/src/java.desktop/share/native/liblcms/cmstypes.c
+++ b/src/java.desktop/share/native/liblcms/cmstypes.c
@@ -3444,6 +3444,8 @@ void *Type_ProfileSequenceId_Read(struct _cms_typehandler_struct* self, cmsIOHAN
cmsUInt32Number Count;
cmsUInt32Number BaseOffset;
+ cmsUNUSED_PARAMETER(SizeOfTag);
+
*nItems = 0;
// Get actual position as a basis for element offsets
@@ -5144,6 +5146,8 @@ void *Type_Dictionary_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* i
cmsMLU *DisplayNameMLU = NULL, *DisplayValueMLU=NULL;
cmsBool rc;
+ cmsUNUSED_PARAMETER(SizeOfTag);
+
*nItems = 0;
// Get actual position as a basis for element offsets
-------------
PR: https://git.openjdk.org/jdk/pull/10768
More information about the client-libs-dev
mailing list