문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top