From f317ed5e7ea0bdbb564d6a0e71b87b9b51c92440 Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 11 Jan 2020 01:09:08 +0100 Subject: [PATCH] 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. --- common/build-style/cmake.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh index 233551b35c3..e36697fb5cc 100644 --- a/common/build-style/cmake.sh +++ b/common/build-style/cmake.sh @@ -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" \;