Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8374

SDK • Re: Build fails with pico-sdk/src/rp2_common/pico_printf/printf.c:909:(.text+0x670): undefined reference to `__wrap_putc

$
0
0
I found the source of the problem. That is my definition of CFLAGS variable.

I use:
$ echo $CFLAGS
-Wall -g -O2 -Wextra -pipe -funsigned-char -fstrict-aliasing -Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wunused -Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat -Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs -Wempty-body -fdiagnostics-color=auto -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -Wbad-function-cast -Wnested-externs -Wmissing-declarations -flto=auto -Wp,-D_FORTIFY_SOURCE=2

The problem is the "-flto=auto" part.
See https://gcc.gnu.org/onlinedocs/gcc/Opti ... index-flto for the documentation.

Thanks to all for your time and patience.

Statistics: Posted by Ludovic — Wed Feb 11, 2026 9:05 pm



Viewing all articles
Browse latest Browse all 8374

Trending Articles