cmake: Fix sporadic issues when determining compiler internals
PATCH 1/1 cmake: Fix sporadic issues when determining compiler internals
When -pipe is enabled, GCC passes data between its different executables using pipes instead of temporary files. This leads to issues when cmake attempts to infer compiler internals via the -v parameter as each executable will print to stderr in parallel.
In turn this may lead to compilation issues down the line as for example the system include directories could not be determined properly which may then propagate to issues such as:
recipe-sysroot/usr/include/c++/11.3.0/cstdlib:75:15: fatal error:
stdlib.h: No such file or directory
| 75 | #include_next <stdlib.h>
| | ^~~~~~~~~~
| compilation terminated.
| ninja: build stopped: subcommand failed.
| WARNING: exit code 1 from a shell command.
Fix this stripping -pipe from the command line used to determine compiler internals.
--- meta/recipes-devtools/cmake/cmake.inc | 3 +- ...mpilerABI-Strip-pipe-from-compile-fl.patch | 52 +++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineCompilerABI-Strip-pipe-from-compile-fl.patch
meta/recipes-devtools/cmake/cmake.inc +2 -1
@@ -17,7 +17,8 @@ LIC_FILES_CHKSUM = "file://Copyright.txt;md5=9d3d12c5f3b4c1f83650adcc65b59c06 \ CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \ -" + file://0001-CMakeDetermineCompilerABI-Strip-pipe-from-compile-fl.patch \ + " SRC_URI[sha256sum] = "72b7570e5c8593de6ac4ab433b73eab18c5fb328880460c86ce32608141ad5c1"
meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineCompilerABI-Strip-pipe-from-compile-fl.patch new file +52 -0
52 lines not on this page · raw message