Implicit includes not detected if LDFLAGS includes -fuse-ld=lld (ppc64)
If I set my LDFLAGS to include -fuse-ld=lld (LLVM linker), cmake assigns its CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
to a null string and passes -isystem /usr/include
to GCC, which breaks including <cstdlib>
:
/usr/lib/gcc/powerpc64le-unknown-linux-gnu/11.3.0/include/g++-v11/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
(See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129 )
Note this does not affect my amd64 system, only ppc64.
This issue is using cmake 3.23.3 to build cmake 3.23.3, though it affects other cmake versions and cmake-built packages as well. lld is version 14.0.6.
Edited by Brad King