Newlib Nano link failure for _fstat and _isatty: Other functions link fine.
I'm trying to migrate a project from HAL back to SPL as it's less of a haul than porting our code I have to integrate to HAL. The HAL program compiled but at some point during my porting process I'm now getting link errors ONLY for _fstat and _isatty, not any of the other functions defined in the assert.c
The assert.c is the same between a working SPL based project we have and the new one I'm creating, so nothing has changed there. If I implement _fstat in my main.c it still complains that it can't link.
Linker Error:
c:/program files (x86)/gnu arm embedded toolchain/10 2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/program files (x86)/gnu arm embedded toolchain/10 2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard\libg_nano.a(lib_a-fstatr.o): in function `_fstat_r':
fstatr.c:(.text._fstat_r+0xe): undefined reference to `_fstat'
I've also tried changing and linking against the soft-fp version of the library with no change.
From main.c:
#include <sys/stat.h>
int _fstat (int fd, struct stat* st)
{
memset (st, 0, sizeof(*st));
return _swistat (fd, st);
}
