undefined reference

You should specify the -lnosys option to the linker command line.
Please note that this was not tested, even if it sounds to be a good solution.
This is usually handled by stubbing the necessary functions by yourself, as documented in Build System > Open AT Features > Missing stubs for ARM EABI GCC linker.