mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
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:
parent
4e50c0ba00
commit
ba1d20f2ad
2 changed files with 15 additions and 3 deletions
|
@ -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 $@
|
||||
|
||||
|
|
12
litex/soc/software/libc/missing.c
Normal file
12
litex/soc/software/libc/missing.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
int getpid() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int kill(int pid, int name) {
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
void _exit(int code) {
|
||||
while (1);
|
||||
}
|
||||
|
Loading…
Reference in a new issue