Skip to content

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

@paulfertser

Description

@paulfertser

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions