summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-01-27 09:58:10 -0500
committerBrad King <brad.king@kitware.com>2022-01-27 09:58:10 -0500
commit98c40dd22e5afc1318103d741f46d99d17812169 (patch)
tree27f93baf0a0eddc9b99ea288c4b1bec48aa3be10 /bootstrap
parent493d6a66bb27dd638ac3c11b52e52987c6dac8eb (diff)
downloadcmake-98c40dd22e5afc1318103d741f46d99d17812169.tar.gz
bootstrap: Avoid TOC overflow on AIX powerpc
Since commit 5c58a7e4d2 (ppc64: Work around TOC overflow with platform specific linker flags, 2019-02-27, v3.15.0-rc1~460^2) we use a bigtoc flag on this platform when building CMake with CMake. Add it to the bootstrap script too.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap14
1 files changed, 14 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap
index 9d91a8a52e..e0791d5899 100755
--- a/bootstrap
+++ b/bootstrap
@@ -157,6 +157,13 @@ else
cmake_system_hpux=false
fi
+# Determine whether this is AIX
+if echo "${cmake_system}" | grep AIX >/dev/null 2>&1; then
+ cmake_system_aix=true
+else
+ cmake_system_aix=false
+fi
+
# Determine whether this is Linux
if echo "${cmake_system}" | grep Linux >/dev/null 2>&1; then
cmake_system_linux=true
@@ -1109,6 +1116,13 @@ if ${cmake_system_haiku}; then
cmake_ld_flags="${LDFLAGS} -lroot -lbe"
fi
+# Add AIX arch-specific link flags.
+if ${cmake_system_aix}; then
+ if uname -p | grep powerpc >/dev/null 2>&1; then
+ cmake_ld_flags="${LDFLAGS} -Wl,-bbigtoc"
+ fi
+fi
+
#-----------------------------------------------------------------------------
# Detect known toolchains on some platforms.
cmake_toolchains=''