From dcd9590feda8da844b93d3142dab5a7699cc502f Mon Sep 17 00:00:00 2001 From: JoKern65 <128386669+JoKern65@users.noreply.github.com> Date: Fri, 2 Jun 2023 07:34:24 +0000 Subject: [PATCH] 8309224: Fix xlc17 clang 15 warnings in java.desktop Reviewed-by: prr, goetz --- .../java.desktop/lib/Awt2dLibraries.gmk | 24 +++++++++++++++++++ .../share/native/libharfbuzz/hb-subset.cc | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/make/modules/java.desktop/lib/Awt2dLibraries.gmk b/make/modules/java.desktop/lib/Awt2dLibraries.gmk index a404fc939d4..a083af114bd 100644 --- a/make/modules/java.desktop/lib/Awt2dLibraries.gmk +++ b/make/modules/java.desktop/lib/Awt2dLibraries.gmk @@ -240,6 +240,14 @@ ifeq ($(call isTargetOs, windows macosx), false) DISABLED_WARNINGS_gcc_XRBackendNative.c := maybe-uninitialized, \ DISABLED_WARNINGS_gcc_XToolkit.c := unused-result, \ DISABLED_WARNINGS_gcc_XWindow.c := unused-function, \ + DISABLED_WARNINGS_clang_aix := deprecated-non-prototype, \ + DISABLED_WARNINGS_clang_aix_awt_Taskbar.c := parentheses, \ + DISABLED_WARNINGS_clang_aix_OGLPaints.c := format-nonliteral, \ + DISABLED_WARNINGS_clang_aix_OGLBufImgOps.c := format-nonliteral, \ + DISABLED_WARNINGS_clang_aix_gtk2_interface.c := parentheses logical-op-parentheses, \ + DISABLED_WARNINGS_clang_aix_gtk3_interface.c := parentheses logical-op-parentheses, \ + DISABLED_WARNINGS_clang_aix_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \ + DISABLED_WARNINGS_clang_aix_awt_InputMethod.c := sign-compare, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN) \ -L$(INSTALL_LIBRARIES_HERE), \ @@ -446,7 +454,9 @@ else # Early re-canonizing has to be disabled to workaround an internal XlC compiler error # when building libharfbuzz ifeq ($(call isTargetOs, aix), true) + ifneq ($(TOOLCHAIN_TYPE), clang) HARFBUZZ_CFLAGS += -qdebug=necan + endif endif # hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later. @@ -693,6 +703,20 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false) endif endif + # The external libpng submitted in the jdk is a reduced version + # which does not contain .png_init_filter_functions_vsx. + # Therefore we need to disable PNG_POWERPC_VSX_OPT explicitly by setting + # it to 0. If this define is not set, it would be automatically set to 2, + # because + # "#if defined(__PPC64__) && defined(__ALTIVEC__) && defined(__VSX__)" + # expands to true. This would results in the fact that + # .png_init_filter_functions_vsx is needed in libpng. + ifeq ($(call isTargetOs, aix), true) + ifeq ($(TOOLCHAIN_TYPE), clang) + LIBSPLASHSCREEN_CFLAGS += -DPNG_POWERPC_VSX_OPT=0 + endif + endif + ifeq ($(call isTargetOs, macosx), true) LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX diff --git a/src/java.desktop/share/native/libharfbuzz/hb-subset.cc b/src/java.desktop/share/native/libharfbuzz/hb-subset.cc index 538f4ec64bf..fff00a5656b 100644 --- a/src/java.desktop/share/native/libharfbuzz/hb-subset.cc +++ b/src/java.desktop/share/native/libharfbuzz/hb-subset.cc @@ -44,7 +44,7 @@ #include "hb-ot-os2-table.hh" #include "hb-ot-post-table.hh" -#if !defined(AIX) +#if !defined(AIX) || defined(AIX_XLC_GE_17) #include "hb-ot-post-table-v2subset.hh" #endif