Hello,
I am currently trying to port gcc and binutils to my operating system. I am currently using Newlib 2.5.0, GCC 5.2.0 and binutils 2.25.
I have cross compiled binutils and gcc for my OS and their work and it seems to be functioning correctly.
I'm trying to compile a very simple program under my OS:
Code:
int main(int argc, char *argv[])
{
return 0;
}
I use this command to compile:
Code:
gcc -fno-use-linker-plugin /test.c
GCC correctly generates the. o file but binutils can't link it to the. a libraries (libgcc. a, libc. a, libnosys.a ...)
I get this error for all .a file:
Code:
libgcc.a: file not recognized: file format not recognized
But my libraries work perfectly because if I compile with
Code:
gcc -c /test.c
and that I link with the same libraries with my cross ld but under linux, it works and i get a valid executable that I can launch under my OS (and that doesn't do anything but is running well)
Anybody have any ideas on how to solve this problem? Thank you
EDIT: Under my OS, ar does'nt recognized .a files too but under linux, i386-haoudos-ar recognized it. It's strange...