Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Jaenke <prj@rootwyrm.com>2020-02-03 13:16:33 +0300
committerGitHub <noreply@github.com>2020-02-03 13:16:33 +0300
commit20a641e4a091eec56e6d5ad8db608ff85f3ef29f (patch)
tree216e827d2b812b83b1ef30748f7781e430a3cce5 /configure.ac
parent050340ef1a16ee94835d3495240cf1fe5297ba5f (diff)
Fix ppc64 build by fixing -mminimal-toc more correctly. (#18665)
The original fix back at #18554 did not work quite right, which was missed for lack of CI. Reworked this check to instead test for `-mminimal-toc` on all powerpc hosts, and to only do the ELF version check on FreeBSD. Fixes #18554 #18578 current CI build failures on AIX
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 17 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 18218e3ea74..91c9c150252 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4466,21 +4466,23 @@ case "$host" in
TARGET=POWERPC64;
CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
# mono#18554 - be more robust in testing for -mminimal-toc
- AC_MSG_NOTICE([Checking PowerPC ABI])
- if ! (echo $CC | grep -q -- 'clang'); then
- if ! (echo | cc -dM -E - | awk '/_CALL_ELF/ {print $NF}'); then
- AX_CHECK_COMPILE_FLAG(
- [-mminimal-toc],
- [CFLAGS="$CFLAGS -mminimal-toc"],
- [CFLAGS="$CFLAGS"]
- )
- AC_DEFINE([POWERPC_ELF], 1, [PowerPC ELFv1])
- else
- # Do not set -mminimal-toc on ELFv2 systems
- AC_DEFINE([POWERPC_ELFV2], 1, [PowerPC ELFv2])
- CFLAGS="$CFLAGS"
- fi
- fi
+ AC_MSG_NOTICE([Checking for PowerPC ISA -mminimal-toc support])
+ AX_CHECK_COMPILE_FLAG(
+ [-mminimal-toc],
+ [CFLAGS="$CFLAGS -mminimal-toc"],
+ [CFLAGS="$CFLAGS"]
+ )
+ case "$host" in
+ powerpc*-*-freebsd*)
+ # We need to be aware if we are ELFv1 or v2 here
+ AC_MSG_NOTICE([Checking FreeBSD ELF version])
+ if ! ( echo | cc -dM -E - | awk '/_CALL_ELF/ {print $NF}'); then
+ AC_DEFINE([POWERPC_ELF], 1, [PowerPC ELFv1])
+ else
+ AC_DEFINE([POWERPC_ELFV2], 1, [PowerPC ELFv2])
+ fi
+ ;;
+ esac
else
TARGET=POWERPC;
CPPFLAGS="$CPPFLAGS -D__mono_ppc__"