https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120513
--- Comment #8 from Greg Chandler <chandleg at wizardsworks dot org> --- I've been digging deeper on this, and am starting to wonder if there is something else going on behind the scenes in the build. For example: # grep limits.h /tmp/log-alpha checking for limits.h... no checking for limits.h... yes checking for limits.h... yes checking for limits.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes Each of the different configure scripts has this check, but not all of them can find things on the system. limits.h being a good example. It's both in the system /usr/include, *and* the sysroot system include: /opt/usr/include. The cross gcc does show /opt/usr/include in it's default search path, so it should 100% be able to find it, every time. I have to patch both the libiberty and gcc subtrees for headers that are not caught, and in one instance not included at all (though it may be from a different source if everything was detected properly). As far as I can tell these issues go back as far as gcc 5.5.x and I think into the 4.8.x tree. The last fully working native compiler I have is 4.2.4, and unfotunately I can't build a current one with that and a current glibc. I'm going to dig into the configure scripts for both gcc and libiberty and see if I can figure out what is going on here. My initial tests make it look like the main configure flags and CPPFLAGS/CFLAGS variables are not making it into those runs, but they are however making it to the rest of the configure scripts. The native build compiler, with build=host=target=build_platform does not have this issue no matter which flags I set as long as it's not doing a cross compile, so I have a couple of different avenues to trapse down before I find the root cause. Hopefully someone else has seen this behavior for a different platform and can shed some light on it.