diff --git a/litex/soc/software/libc/Makefile b/litex/soc/software/libc/Makefile index fe8416dee..dd516df1e 100644 --- a/litex/soc/software/libc/Makefile +++ b/litex/soc/software/libc/Makefile @@ -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 $@ diff --git a/litex/soc/software/libc/missing.c b/litex/soc/software/libc/missing.c new file mode 100644 index 000000000..0a88ec663 --- /dev/null +++ b/litex/soc/software/libc/missing.c @@ -0,0 +1,12 @@ +int getpid() { + return 1; +} + +int kill(int pid, int name) { + _exit(0); +} + +void _exit(int code) { + while (1); +} +