Add missing functions to make lm32 and or1k link

I added missing.c with functions that were preventing
LiteX from successfull linking on lm32 and or1k.
This commit is contained in:
Michal Sieron 2021-08-02 10:32:29 +02:00
parent 4e50c0ba00
commit ba1d20f2ad
2 changed files with 15 additions and 3 deletions

View file

@ -1,7 +1,7 @@
include ../include/generated/variables.mak
include $(SOC_DIRECTORY)/software/common.mak
all: libc.a iob.c.o
all: libc.a iob.c.o missing.c.o
CPUFAMILY=
@ -56,7 +56,7 @@ libc.a: cross.txt $(PICOLIBC_DIRECTORY)/newlib/libc/machine/$(CPUFAMILY)/meson.b
meson compile
cp newlib/libc.a libc.a
iob.c.o: $(LIBC_DIRECTORY)/iob.c
%.o: $(LIBC_DIRECTORY)/%
$(compile)
$(AR) csr libc.a iob.c.o
$(AR) csr libc.a $@

View file

@ -0,0 +1,12 @@
int getpid() {
return 1;
}
int kill(int pid, int name) {
_exit(0);
}
void _exit(int code) {
while (1);
}