Skip to content

Commit b7d92cd

Browse files
committed
8338303: Linux ppc64le with toolchain clang - detection failure in early JVM startup
Backport-of: 70eec9001a550888f35476f9e2cf3c62d41442dd
1 parent a4998f8 commit b7d92cd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

make/autoconf/flags-cflags.m4

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -835,6 +835,11 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
835835
# for all archs except arm and ppc, prevent gcc to omit frame pointer
836836
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
837837
fi
838+
if test "x$FLAGS_CPU" = xppc64le; then
839+
# Little endian machine uses ELFv2 ABI.
840+
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
841+
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
842+
fi
838843
fi
839844
if test "x$OPENJDK_TARGET_OS" = xaix; then
840845
$1_CFLAGS_CPU="-mcpu=pwr8"

0 commit comments

Comments
 (0)