This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: new port : libgcc ? newlib ?
Florent DEFAY <spira.inhabitant@gmail.com> writes:
> Thank you for your reply. I can precise some things:
>
>>> Then I tried this (just like msp430) :
>>>
>>> LIB1ASMSRC = target/mulhi3.S
>>> LIB1ASMFUNCS = __mulhi3
>>
>> Looks right, assuming you've written mulhi3.S.
>
> I have.
> Will the function __mulhi3 be placed in libgcc.a?
Yes.
> Then, to compile a
> program which use multiplications, should I link with -lgcc option?
The gcc driver will automatically link with -lgcc, unless you use
something like the -nodefaultlibs option.
> Now, the problem is that the port is not complete and, as a
> consequence, when compiling libgcc2.c this happens :
> /home/me/gcc/build_target/./gcc/xgcc
> -B/home/me/gcc/build_target/./gcc/ -B/home/me/target/target/bin/
> -B/home/me/target/target/lib/ -isystem /home/me/target/target/include
> -isystem /home/me/target/target/sys-include -O2 -g -g -O2 -O2 -O2 -g
> -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall
> -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
> -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2
> -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../.././gcc
> -I../../../gcc-4.3.3/libgcc -I../../../gcc-4.3.3/libgcc/.
> -I../../../gcc-4.3.3/libgcc/../gcc
> -I../../../gcc-4.3.3/libgcc/../include -o _muldi3.o -MT _muldi3.o
> -MD -MP -MF _muldi3.dep -DL_muldi3 -c
> ../../../gcc-4.3.3/libgcc/../gcc/libgcc2.c \
>
> ../../../gcc-4.3.3/libgcc/../gcc/libgcc2.c: In function â__mulsi3â:
> ../../../gcc-4.3.3/libgcc/../gcc/libgcc2.c:560: internal compiler
> error: Segmentation fault
>
> I would like (temporarily) not to compile libgcc2. But, in the same
> time, enable compiling of my multhi3. Is that possible? It would be a
> libgcc without libgcc2.
There is no simply way to do this. You can control it to some extent by
setting LIB2FUNCS_EXCLUDE in your t-* file. See, e.g.,
config/spu/t-spu-elf.
Ian