Skip to content

Commit dcd9590

Browse files
JoKern65GoeLin
authored andcommitted
8309224: Fix xlc17 clang 15 warnings in java.desktop
Reviewed-by: prr, goetz
1 parent 8f1ce78 commit dcd9590

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

make/modules/java.desktop/lib/Awt2dLibraries.gmk

+24
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,14 @@ ifeq ($(call isTargetOs, windows macosx), false)
240240
DISABLED_WARNINGS_gcc_XRBackendNative.c := maybe-uninitialized, \
241241
DISABLED_WARNINGS_gcc_XToolkit.c := unused-result, \
242242
DISABLED_WARNINGS_gcc_XWindow.c := unused-function, \
243+
DISABLED_WARNINGS_clang_aix := deprecated-non-prototype, \
244+
DISABLED_WARNINGS_clang_aix_awt_Taskbar.c := parentheses, \
245+
DISABLED_WARNINGS_clang_aix_OGLPaints.c := format-nonliteral, \
246+
DISABLED_WARNINGS_clang_aix_OGLBufImgOps.c := format-nonliteral, \
247+
DISABLED_WARNINGS_clang_aix_gtk2_interface.c := parentheses logical-op-parentheses, \
248+
DISABLED_WARNINGS_clang_aix_gtk3_interface.c := parentheses logical-op-parentheses, \
249+
DISABLED_WARNINGS_clang_aix_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \
250+
DISABLED_WARNINGS_clang_aix_awt_InputMethod.c := sign-compare, \
243251
LDFLAGS := $(LDFLAGS_JDKLIB) \
244252
$(call SET_SHARED_LIBRARY_ORIGIN) \
245253
-L$(INSTALL_LIBRARIES_HERE), \
@@ -446,7 +454,9 @@ else
446454
# Early re-canonizing has to be disabled to workaround an internal XlC compiler error
447455
# when building libharfbuzz
448456
ifeq ($(call isTargetOs, aix), true)
457+
ifneq ($(TOOLCHAIN_TYPE), clang)
449458
HARFBUZZ_CFLAGS += -qdebug=necan
459+
endif
450460
endif
451461

452462
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later.
@@ -693,6 +703,20 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
693703
endif
694704
endif
695705

706+
# The external libpng submitted in the jdk is a reduced version
707+
# which does not contain .png_init_filter_functions_vsx.
708+
# Therefore we need to disable PNG_POWERPC_VSX_OPT explicitly by setting
709+
# it to 0. If this define is not set, it would be automatically set to 2,
710+
# because
711+
# "#if defined(__PPC64__) && defined(__ALTIVEC__) && defined(__VSX__)"
712+
# expands to true. This would results in the fact that
713+
# .png_init_filter_functions_vsx is needed in libpng.
714+
ifeq ($(call isTargetOs, aix), true)
715+
ifeq ($(TOOLCHAIN_TYPE), clang)
716+
LIBSPLASHSCREEN_CFLAGS += -DPNG_POWERPC_VSX_OPT=0
717+
endif
718+
endif
719+
696720
ifeq ($(call isTargetOs, macosx), true)
697721
LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
698722

src/java.desktop/share/native/libharfbuzz/hb-subset.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#include "hb-ot-os2-table.hh"
4545
#include "hb-ot-post-table.hh"
4646

47-
#if !defined(AIX)
47+
#if !defined(AIX) || defined(AIX_XLC_GE_17)
4848
#include "hb-ot-post-table-v2subset.hh"
4949
#endif
5050

0 commit comments

Comments
 (0)