After finishing Newlib syscalls and elf support, I ported some small programs easily. Then I wanted to port a bit harder one, Binutils.
I added i686-agola host to Binutils, then configured Binutils with
Then started compiling with make all... But compilation failed with an error:../agola-binutils/configure --target=i686-agola --host=i686-agola --prefix=$HOME/agola/sysroot/binutils --disable-werror
getcwd is a syscall, but compilation fails. It is defined in syscalls.c:libc.a (syscalls.o): In function `syscall_getcwd':
newlib/libc/sys/agola/../../../newlib/libc/sys/agola/syscalls.c:86: multiple definition of `getcwd' ../libiberty/libiberty.a (getcwd.o): /binutils/libiberty/../binutils/libiberty/getcwd.c:42: first defined here
Code: Select all
DEFINE_SYSCALL_2ARGS(getcwd, 27, char*, size_t)
char *getcwd(char *buf, size_t size)
{
return (char*) syscall_getcwd(buf, size);
}
How can I solve that, I'm stucked