Hi, Steve's patch in 2013 [1] to fix the MIPS newlib/libgfortran build causes subtle issues for an ARM/AArch64 newlib/libgfortran build. The problem is that ARM/AArch64 (and SH) define a stub function for ftruncate, which we would previously have auto-detected, but which is not part of the hardwiring Steve added. Continuing the tradition of building bodge on bodge on bodge, this patch hardwires HAVE_FTRUNCATE on for ARM/AArch64/SH, which does fix the issue I was seeing. If this patch is acceptable for trunk, I'd also like to backport it to the 5.x and 4.9.x release branches. I'm not quite sure how to effectively verify this patch. I've looked at the generated config.h for aarch64-none-elf, arm-none-eabi and those come out with HAVE_FTRUNCATE defined. I wanted to check mips-none-elf, but I had no success there - the configure failed earlier when trying to link executables. I'd appreciate your help Steve to check that this patch works with your build system. Thanks, James [1]: https://gcc.gnu.org/ml/fortran/2013-09/msg00050.html --- 2015-08-14 James Greenhalgh * configure.ac: Define HAVE_FTRUNCATE for ARM/AArch64/SH newlib builds. * configure: Regenerate.