The current makefile links with ld directly, but depends on libc from GCC. To be able to link we hardcode the path to the libc.a:
LIBS = -L/opt/lm32/lm32-elf/lib -lc -L/opt/lm32/lib/gcc/lm32-elf/6.3.0 -lgcc
We depend on libc for setjmp, longjmp. As we don't need libgcc, we could drop the second part of this to not depend on the path of a specific GCC version.
However, we would prefer to use GCC to link.
The current makefile links with
lddirectly, but depends on libc from GCC. To be able to link we hardcode the path to thelibc.a:LIBS = -L/opt/lm32/lm32-elf/lib -lc -L/opt/lm32/lib/gcc/lm32-elf/6.3.0 -lgccWe depend on libc for
setjmp,longjmp. As we don't need libgcc, we could drop the second part of this to not depend on the path of a specific GCC version.However, we would prefer to use GCC to link.