aboutsummaryrefslogtreecommitdiff
path: root/java/openjdk11/files/patch-make_autoconf_flags-cflags.m4
blob: 1824747bfced5a4157d4f79f04dcd2c4960bc3b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- make/autoconf/flags-cflags.m4.orig	2020-01-08 09:12:31 UTC
+++ make/autoconf/flags-cflags.m4
@@ -770,6 +770,14 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
         # for all archs except arm and ppc, prevent gcc to omit frame pointer
         $1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
       fi
+    elif test "x$OPENJDK_TARGET_OS_ENV" = xbsd.freebsd; then
+        if test "x$FLAGS_CPU" = xppc64; then
+            $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=powerpc64 -mtune=power5"
+        elif test "x$FLAGS_CPU" = xppc64le; then
+            # Little endian machine uses ELFv2 ABI.
+            # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
+            $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
+        fi
     fi
 
   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then