summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/cmake/files/cmake-2.8.11.2-hppa-bootstrap.patch')
-rw-r--r--dev-util/cmake/files/cmake-2.8.11.2-hppa-bootstrap.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-util/cmake/files/cmake-2.8.11.2-hppa-bootstrap.patch b/dev-util/cmake/files/cmake-2.8.11.2-hppa-bootstrap.patch
new file mode 100644
index 000000000000..07d648e6ea8b
--- /dev/null
+++ b/dev-util/cmake/files/cmake-2.8.11.2-hppa-bootstrap.patch
@@ -0,0 +1,35 @@
+From: Rolf Eike Beer <eike@sf-mail.de>
+Date: Thu, 12 Sep 2013 18:59:11 +0000 (+0200)
+Subject: bootstrap: try better workaround for builds on Linux/HPPA
+X-Git-Tag: v2.8.12~21^2
+X-Git-Url: http://cmake.org/gitweb?p=cmake.git;a=commitdiff_plain;h=ca63bb1001dea6929e194ac15921fdeb7d434dcd
+
+bootstrap: try better workaround for builds on Linux/HPPA
+
+The workaround currently present works fine without -O or with -O1, but fails
+with -Os or -O2 and higher. Using -O2 is common e.g. in Gentoo, as resulting in
+bugs like this:
+
+https://bugs.gentoo.org/473276
+
+Prevent the workaround for higher optimization levels to make bootstrapping
+more likely to succeed.
+
+This is still a workaround as ld still keeps crashing in some situations.
+---
+
+diff --git a/bootstrap b/bootstrap
+index fb4a0a0..9784d5d 100755
+--- a/bootstrap
++++ b/bootstrap
+@@ -692,7 +692,10 @@ if ${cmake_system_linux}; then
+ # avoid binutils problem with large binaries, e.g. when building CMake in debug mode
+ # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50230
+ if ${cmake_machine_parisc}; then
+- cmake_ld_flags="${LDFLAGS} -Wl,--unique=.text.*"
++ # if -O[s23] is given the effect is inverted, so do not use the flag then
++ if [ "`echo "${CXXFLAGS}" | sed -r '/^(.* )?(-O[s234])( .*)?$/s/.*/-Os/'`" != "-Os" ]; then
++ cmake_ld_flags="${LDFLAGS} -Wl,--unique=.text.*"
++ fi
+ fi
+ fi \ No newline at end of file