https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109926
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- Please provide the i586-msdosdjgpp/libstdc++-v3/config.log file, not the top-level one from configuring gcc. The libstdc++ fenv.h has: #include <bits/c++config.h> #if _GLIBCXX_HAVE_FENV_H # include_next <fenv.h> #endif And that check comes from: AC_CHECK_HEADERS(fenv.h, ac_has_fenv_h=yes, ac_has_fenv_h=no) So something is wrong with your config.