https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82708
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- That's not the test I'm talking about. The relevant one is gcc/Makefile.in's LIMITS_H_TEST, run during a build stage rather than a configure stage, so you need to look at the setting of BUILD_SYSTEM_HEADER_DIR and how it got that value.