common/build-style/cmake.sh: strip -pipe if present in C(XX)FLAGS

Reason: https://gitlab.kitware.com/cmake/cmake/issues/19590

Our workaround within cmake is not sufficient as it does not
address the issue fully and things still break sometimes. So
work around this in the build-style for the time being (and
drop the cmake patch).

Once this is fixed upstream (probably needs special casing
for the -pipe flag and strip it during compile tests) we
can drop this.
This commit is contained in:
q66 2020-01-11 01:09:08 +01:00
parent 8e41df8389
commit f317ed5e7e
1 changed files with 4 additions and 2 deletions

View File

@ -57,8 +57,10 @@ _EOF
cmake_args+=" -DCMAKE_INSTALL_SBINDIR=bin"
cmake ${cmake_args} ${configure_args} $(echo ${cmake_builddir}|sed \
-e 's|[^/]$|/|' -e 's|[^/]*||g' -e 's|/|../|g')
# Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590
CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \
cmake ${cmake_args} ${configure_args} $(echo ${cmake_builddir}|sed \
-e 's|[^/]$|/|' -e 's|[^/]*||g' -e 's|/|../|g')
# Replace -isystem with -I for Qt4 and Qt5 packages
find -name flags.make -exec sed -i "{}" -e"s;-isystem;-I;g" \;