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.
This commit is contained in:
parent
4c4bafdeab
commit
ca63bb1001
|
@ -692,9 +692,12 @@ if ${cmake_system_linux}; then
|
||||||
# avoid binutils problem with large binaries, e.g. when building CMake in debug mode
|
# 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
|
# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50230
|
||||||
if ${cmake_machine_parisc}; then
|
if ${cmake_machine_parisc}; then
|
||||||
|
# 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.*"
|
cmake_ld_flags="${LDFLAGS} -Wl,--unique=.text.*"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Detect known toolchains on some platforms.
|
# Detect known toolchains on some platforms.
|
||||||
|
|
Loading…
Reference in New Issue