From 007fee299e341dfe83f2dc9a951333f5528e9250 Mon Sep 17 00:00:00 2001 From: Greg Lewis Date: Wed, 6 Nov 2019 17:35:04 +0000 Subject: Fix build on FreeBSD 12.x/powerpc64 on POWER8+ machines * Make sure has_mfdscr() returns false on these machines as using it on FreeBSD 12.x will cause problems (e.g. SIGILL). PR: 239368 Sponsored by: The FreeBSD Foundation --- java/openjdk13/Makefile | 3 +++ .../extra-patch-src_hotspot_cpu_ppc_vm__version__ppc.hpp | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 java/openjdk13/files/extra-patch-src_hotspot_cpu_ppc_vm__version__ppc.hpp (limited to 'java/openjdk13') diff --git a/java/openjdk13/Makefile b/java/openjdk13/Makefile index b387d7243e93..ffb6ff77c87c 100644 --- a/java/openjdk13/Makefile +++ b/java/openjdk13/Makefile @@ -134,6 +134,9 @@ CONFIGURE_ARGS+= --disable-warnings-as-errors \ .if ${ARCH} != amd64 CONFIGURE_ARGS+= --enable-aot=no .endif +.if ${ARCH} == powerpc64 && ${OSREL:C/\.[0-9]//} == 12 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src_hotspot_cpu_ppc_vm__version__ppc.hpp +.endif .if empty(ICONV_LIB) ICONV_CFLAGS= -DLIBICONV_PLUG diff --git a/java/openjdk13/files/extra-patch-src_hotspot_cpu_ppc_vm__version__ppc.hpp b/java/openjdk13/files/extra-patch-src_hotspot_cpu_ppc_vm__version__ppc.hpp new file mode 100644 index 000000000000..1722d87b9665 --- /dev/null +++ b/java/openjdk13/files/extra-patch-src_hotspot_cpu_ppc_vm__version__ppc.hpp @@ -0,0 +1,11 @@ +--- src/hotspot/cpu/ppc/vm_version_ppc.hpp.orig 2019-10-16 11:31:09.000000000 -0700 ++++ src/hotspot/cpu/ppc/vm_version_ppc.hpp 2019-10-23 12:54:06.972903000 -0700 +@@ -108,7 +108,7 @@ + static bool has_lqarx() { return (_features & lqarx_m) != 0; } + static bool has_vcipher() { return (_features & vcipher_m) != 0; } + static bool has_vpmsumb() { return (_features & vpmsumb_m) != 0; } +- static bool has_mfdscr() { return (_features & mfdscr_m) != 0; } ++ static bool has_mfdscr() { return false; } + static bool has_vsx() { return (_features & vsx_m) != 0; } + static bool has_ldbrx() { return (_features & ldbrx_m) != 0; } + static bool has_stdbrx() { return (_features & stdbrx_m) != 0; } -- cgit v1.2.3