Skip to content

Linking against the wrong library version newlib

Virtex61 requested to merge m4_newlib_linking_problem into master

In build.py gcc with the option "-print-file-name=libXX" is used to get the right library libc/libgcc for linking. This command is running with the parameter -mfloat-abi=soft and -mfpu=fpv4-sp-d16, which is an invalid configuration for gcc and it is returning the default library (./arm-none-eabi/lib/libc.a). When you change the mfloat-abi to softfp the right library (./arm-none-eabi/lib/thumb/libc.a) is returned and all the functions from newlib are working properly.

This problem was detected by trying to get printf to work and getting strange behavior and bad looking disassembly while debugging it. It was reproduced with 6-2017-q1-update and 6-2017-q2-update of arm-none-eabi

Merge request reports