[jdk8u-dev] RFR: 8209115: adjust libsplashscreen linux ppc64le builds for easier libpng update

Andrew John Hughes andrew at openjdk.org
Fri Sep 15 03:11:43 UTC 2023


On Thu, 14 Sep 2023 18:31:14 GMT, Martin Balao <mbalao at openjdk.org> wrote:

> The 11u patch does not apply cleanly because of the file paths and because the context for the change in jdk/make/lib/Awt2dLibraries.gmk is slightly different.

The situation here is a bit ugly. JDK-8195615 is not listed as being in 8u, but it seems it was silently included in JDK-8208353 ("Upgrade JDK 8u to libpng 1.6.35").  This is the version of libpng that adds PPC and x86 optimisations to the library. Prior to that, there were only ones for ARM (see the `-DPNG_ARM_NEON_OPT=0` in the context) and MIPS.

The reason this is problematic in OpenJDK seems to be because the sources don't include the subdirectories with this optimised code. It isn't a problem on x86 because SSE has to be explicitly enabled, but it is enabled on PPC, so we have to force it back off.

The Makefile logic for libpng upstream looks like this:

~~~
if PNG_ARM_NEON
libpng at PNGLIB_MAJOR@@PNGLIB_MINOR at _la_SOURCES += arm/arm_init.c\
        arm/filter_neon.S arm/filter_neon_intrinsics.c \
        arm/palette_neon_intrinsics.c
endif

if PNG_MIPS_MSA
libpng at PNGLIB_MAJOR@@PNGLIB_MINOR at _la_SOURCES += mips/mips_init.c\
        mips/filter_msa_intrinsics.c
endif

if PNG_INTEL_SSE
libpng at PNGLIB_MAJOR@@PNGLIB_MINOR at _la_SOURCES += intel/intel_init.c\
        intel/filter_sse2_intrinsics.c
endif

if PNG_POWERPC_VSX
libpng at PNGLIB_MAJOR@@PNGLIB_MINOR at _la_SOURCES += powerpc/powerpc_init.c\
        powerpc/filter_vsx_intrinsics.c
endif
~~~

OpenJDK doesn't have any of these files in the subdirectories. It is `filter_vsx_intrinsics.c` that contains the missing `png_init_filter_functions_vsx` that triggered JDK-8195615.

-------------

PR Comment: https://git.openjdk.org/jdk8u-dev/pull/371#issuecomment-1720421188


More information about the jdk8u-dev mailing list