diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2013-09-12 18:59:11 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2013-09-12 18:59:11 (GMT) |
commit | ca63bb1001dea6929e194ac15921fdeb7d434dcd (patch) | |
tree | 8feb91799a793762d1bb4738e9c39d6f45f84a61 /bootstrap | |
parent | 4c4bafdeabe868677a868dba416878c097c416b3 (diff) | |
download | CMake-ca63bb1001dea6929e194ac15921fdeb7d434dcd.zip CMake-ca63bb1001dea6929e194ac15921fdeb7d434dcd.tar.gz CMake-ca63bb1001dea6929e194ac15921fdeb7d434dcd.tar.bz2 |
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.
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |