Hi,

I want to develop rumpkernel application on baremetal arm platform.
I tried to compile rumpkernel as following steps:

$ export CC=arm-none-eabi-gcc
$ export CXX=arm-none-eabi-g++
$ ./build-rr.sh baremetal -- -F ACLFLAGS=-march=armv7-a

But this was failed:

...
--- dependall-librump ---
/home/garasubo/workspace/rumprun/src-netbsd/sys/rump/librump/rumpkern/../../../arch/amd64/amd64/kobj_machdep.c:70:29:
fatal error: machine/cpufunc.h: No such file or directory
 #include <machine/cpufunc.h>
                             ^
compilation terminated.
--- dependall-dev ---
nbmake[4]:
/home/garasubo/workspace/rumprun/platform/baremetal/rumpobj/sys/rump/dev/lib/libmd/.depend,
372: ignoring stale .depend for machine/specialreg.h
--- dependall-librump ---
nbmkdep: compile failed.
*** [kobj_machdep.d] Error code 1

nbmake[3]: stopped in
/home/garasubo/workspace/rumprun/src-netbsd/sys/rump/librump/rumpkern
1 error

nbmake[3]: stopped in
/home/garasubo/workspace/rumprun/src-netbsd/sys/rump/librump/rumpkern
*** [dependall-rumpkern] Error code 2

nbmake[2]: stopped in
/home/garasubo/workspace/rumprun/src-netbsd/sys/rump/librump
1 error

nbmake[2]: stopped in
/home/garasubo/workspace/rumprun/src-netbsd/sys/rump/librump
*** [dependall-librump] Error code 2

nbmake[1]: stopped in /home/garasubo/workspace/rumprun/src-netbsd/sys/rump
--- dependall-dev ---
--- ioconf.d ---
...


I also tried to compile frankenlibc.
But it also failed:

$ ./build.sh qemu-arm
...
make: Entering directory '/home/garasubo/workspace/frankenlibc/tests'
/home/garasubo/workspace/frankenlibc/rump/bin/arm-rumprun-netbsdelf-eabi-cc
-g -static -o /home/garasubo/workspace/frankenlibc/rumpobj/tests/hello
hello.c
/home/garasubo/workspace/frankenlibc/rump/lib/libc.a(findfp.o): In function
`_cleanup':
/home/garasubo/workspace/frankenlibc/src/lib/libc/stdio/findfp.c:211:
multiple definition of `_cleanup'
/usr/lib/gcc/arm-none-eabi/4.9.2/../../../../arm-none-eabi/lib/libg.a(lib_a-findfp.o):findfp.c:(.text._cleanup+0x0):
first defined here
/home/garasubo/workspace/frankenlibc/rump/lib/libc.a(findfp.o): In function
`__sinit':
/home/garasubo/workspace/frankenlibc/src/lib/libc/stdio/findfp.c:219:
multiple definition of `__sinit'
/usr/lib/gcc/arm-none-eabi/4.9.2/../../../../arm-none-eabi/lib/libg.a(lib_a-findfp.o):findfp.c:(.text.__sinit+0x0):
first defined here
/home/garasubo/workspace/frankenlibc/rump/lib/libc.a(findfp.o): In function
`__sfp':
/home/garasubo/workspace/frankenlibc/src/lib/libc/stdio/findfp.c:159:
multiple definition of `__sfp'
/usr/lib/gcc/arm-none-eabi/4.9.2/../../../../arm-none-eabi/lib/libg.a(lib_a-findfp.o):findfp.c:(.text.__sfp+0x0):
first defined here
/usr/lib/gcc/arm-none-eabi/4.9.2/../../../../arm-none-eabi/lib/libg.a(lib_a-fstatr.o):
In function `_fstat_r':
fstatr.c:(.text._fstat_r+0x1c): undefined reference to `_fstat'
collect2: error: ld returned 1 exit status
Makefile:31: recipe for target
'/home/garasubo/workspace/frankenlibc/rumpobj/tests/hello' failed
make: *** [/home/garasubo/workspace/frankenlibc/rumpobj/tests/hello] Error 1
make: Leaving directory '/home/garasubo/workspace/frankenlibc/tests'

I think arm-rumprun-netbsdelf-eabi-cc needs "-nostdlib" option.

Could you tell me how to fix them?

Reply via email to