new port : libgcc ? newlib ?
Florent DEFAY
spira.inhabitant@gmail.com
Fri Mar 13 09:46:00 GMT 2009
Hi,
I am working on a new port of GCC. I am now dealing with multiply, divide, mod.
The target machine does not support these operations. Then I think I
have to consider LIBGCC.
But here I get in trouble.
First, there are 2 libgcc : libgcc1 and libgcc2. What is the difference ?
When reading GCC Internals, I found information about libgcc2 and I
tried to insert the following line in the t-target :
LIB2FUNCS_EXTRA=mulhi3.S
where mulhi3.S contains the assembler code for the function __mulhi3.
When building GCC, no rule to compile mulhi3.S ... I think my t-target
is not complete but I do not find anything more.
Then I tried this (just like msp430) :
LIB1ASMSRC = target/mulhi3.S
LIB1ASMFUNCS = __mulhi3
GCC build succeeds (with errors, see below). But then, when linking a
program using multiply :
undefined reference to `__mulhi3'
I tried to add -lgcc in the Makefile when linking but :
target-ld: cannot find -lgcc
Moreover, when building GCC, it finishes with this error :
*** Configuration target-unknown-none not supported
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/home/me/gcc/build_target'
make: *** [all] Error 2
I searched about this error. I found a reply. It says "sym-link newlib
into GCC sources".
I do not understand why is it newlib about? My target has no system. I
just would like to disable all of this.
I also get an error at 'make install' time :
make[2]: Entering directory `/home/me/gcc/build_target/target/libstdc++-v3'
make[2]: *** No rule to make target `install'. Stop.
make[2]: Leaving directory `/home/me/gcc/build_target/target/libstdc++-v3'
make[1]: *** [install-target-libstdc++-v3] Error 2
make[1]: Leaving directory `/home/me/gcc/build_target'
make: *** [install] Error 2
This is the same, I am not intrested in libstdc++, how to disable that?
So, please, could you help me about how to implement simplest libgcc.
Regards.
Florent
More information about the Gcc-help
mailing list