Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some examples failing to link due to missing syscalls on Debian #215

Open
paulfertser opened this issue Mar 30, 2018 · 0 comments
Open

Some examples failing to link due to missing syscalls on Debian #215

paulfertser opened this issue Mar 30, 2018 · 0 comments

Comments

@paulfertser
Copy link

Using arm-none-eabi toolchain from Debian repository some examples (the first being fatfs_iterate) fail to link due to missing _write, _read, _close and _lseek implementations. This is not manifesting with ARM's GCC toolchain because they build newlib with CFLAGS_FOR_TARGET '-g -O2 -ffunction-sections -fdata-sections'.

What happens here is that DirectoryEntryIterator::calculateUnixTime ref. mktime ref. _tzset_unlocked ref. _tzset_unlocked_r ref. siscanf ref. __seofread which comes from stdio.o which also has __sread and that requires _read. If stdio.o had separate sections for all the functions, __sread wouldn't get linked in (thanks to --gc-sections).

The build can be pacified by using --specs=nosys.specs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant