Commit ca63bb10 authored by Rolf Eike Beer's avatar Rolf Eike Beer
Browse files

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:

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.
parent 4c4bafde
......@@ -692,7 +692,10 @@ if ${cmake_system_linux}; then
# avoid binutils problem with large binaries, e.g. when building CMake in debug mode
# See
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.*"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment