Add LDFLAGS to newlib Makefiles
Вопрос
I'm trying to implement the _sbrk() function in the syscalls.c file. For this I need to link newlib with my projects object file. In newlibs root folder I did a simple
./configure --target=arm-elf
which created me a bunch of Makefiles. But now I don't know which Makefile I have do edit in order to change the LDFLAGS. Without doing this I get an "undefined reference" error because the linker doesn't find the related object. Thanks in advance for reading (and hopefully helping me out :) Chris
Решение
If you want to change LDFLAGS
globally for your build then you can invoke configure
like this:
./configure LDFLAGS="<yourflags>" --target=arm-elf
The resulting Makefile
will use the provided flags as its LDFLAGS
.
Не связан с StackOverflow