Compiling GCC

"Kai Ruottu" (karuottu@freenet.hut.fi)
Mon, 5 Apr 1999 23:53:15 +0000


Mon, 5 Apr 1999 19:54:36 +0400 (MSD) "Denis V. Manilo" <denis@post.tepkom.ru>  wrote :

> I'm trying to build sparc-sun-solaris2.4-gcc
> on linux host.
> I've met such message:
>  make LANGUAGES=c
>  ./xgcc -B./ -DCROSS_COMPILE -DIN_GCC   -g -I./include    -c ./libgcc1-test.c
>  Testing libgcc1.  Ignore linker warning messages.
>  ./xgcc -B./ -DCROSS_COMPILE -DIN_GCC   -g -I./include libgcc1-test.o -o libgcc1-test \
>    -nostartfiles -nostdlib ./xgcc -B./ --print-libgcc-file-namelibgcc1-test.o: In function ain_without__main':
>    /net/trill/alexey/gcc-2.7.2/./libgcc1-test.c:19: undefined reference to §mul'
>    /net/trill/alexey/gcc-2.7.2/./libgcc1-test.c:20: undefined reference to iv'
>    /net/trill/alexey/gcc-2.7.2/./libgcc1-test.c:21: undefined reference to em'
>    /net/trill/alexey/gcc-2.7.2/./libgcc1-test.c:23: undefined reference to §div'
>    /net/trill/alexey/gcc-2.7.2/./libgcc1-test.c:24: undefined reference to §rem'
>    make: *** [libgcc1-test] Error 1

 These are some machine instructions some Sparc CPUs have, some not... If not, 
the 'emulations' for them are in the 'libc.a', like :

   umultiply.o:
   00000000 T .umul
 
 So you have to remove the '-nostdlib' from the 'libgcc1-test' rule, or to 
remove the 'libgcc1-test' prerequisite where it exists (ignoring the test).

 Cheers, Kai
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.