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
This commit is contained in:
Greg Lewis
2019-11-06 17:21:58 +00:00
parent ad9abc05ad
commit b9f03c4180
2 changed files with 14 additions and 0 deletions
+3
View File
@@ -135,6 +135,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
@@ -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; }