From 70eec9001a550888f35476f9e2cf3c62d41442dd Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Mon, 27 Jan 2025 07:35:40 +0000 Subject: [PATCH] 8338303: Linux ppc64le with toolchain clang - detection failure in early JVM startup Reviewed-by: mdoerr, erikj, ihse --- make/autoconf/flags-cflags.m4 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index 729e508cc26..7f2a783576e 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -736,6 +736,11 @@ 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 + if 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 if test "x$OPENJDK_TARGET_OS" = xaix; then $1_CFLAGS_CPU="-mcpu=pwr8"