https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
--- Comment #5 from chuck cranor <chuck at ece dot cmu.edu> ---
I don't think anyone would manually add "-isystem /usr/include" ...
but build systems that provide variables for third party headers that
may or may not be installed in /usr/include often trigger this.
e.g. if boost is installed in prefix /pkg, then you want to include
/pkg/include in the search path. if boost is installed in /usr
then you want /usr/include in the search path. if you have
"-isystem ${BOOST_PREFIX}/include" in your CXXFLAGS and BOOST_PREFIX
happens to be set to /usr somewhere earlier, you lose.
For what it's worth, this definitely crops up in cmake-based builds:
https://gitlab.kitware.com/cmake/cmake/issues/16291
I triggered it with cmake and Boost on a Cray. It is partly cmake's
fault too. Its handling of CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
isn't correct.