After about a year of not working on my os (new baby and no time ) I finally got around to working on it again and had to clone my project on a new PC
I wanted to see that I could still compile user space programs ok, but I have some problem with newlib. I've tried deleting newlib and recompiling as per instructions in "porting newlib". Making and installing newlib works completes without any problems...
my userspace program is a simple printf "hello world" but make complains with:
Code: Select all
in function `_sbrk_r': "...newlib/libc/reent/sbrkr.c:51: undefined reference to `_sbrk'"
my makefile:
Code: Select all
CFILES = program.c
CC=i686-myos-gcc
CFLAGS = -O0 -Wall -Wextra
LIBS = ~/myos/sysroot/usr/lib/libc.a
all:
$(CC) $(LIBS) $(CFILES) $(CFLAGS) -o program.o
clean:
rm -f *.o
Any help is appreciated - thanks!