problem installing gcc 2.95.2 on m68k-coff

Meir Hacohen meir.hacohen@telrad.co.il
Tue Oct 31 01:28:00 GMT 2000


Hello, Kai !

  Thanks a lot for your help. I did what you suggest (about the m68k-coff)
and now I got :

  ********************************************************************

/gnu/gcc-obj/gcc/xgcc -B/gnu/gcc-obj/gcc/ -B/usr/local/m68k-coff/bin/
-I/usr/loc
al/m68k-coff/include -DCROSS_COMPILE -DIN_GCC     -O2 -I./include     -c
../../g
cc-2.95.2/gcc/libgcc1-test.c
../../gcc-2.95.2/gcc/libgcc1-test.c:101: warning: conflicting types for
built-in
 function `memcpy'
Testing libgcc1.  Ignore linker warning messages.
/gnu/gcc-obj/gcc/xgcc -B/gnu/gcc-obj/gcc/ -B/usr/local/m68k-coff/bin/
-I/usr/loc
al/m68k-coff/include -DCROSS_COMPILE -DIN_GCC     -O2 -I./include
libgcc1-test.
o -o libgcc1-test \
  -nostartfiles -nostdlib `/gnu/gcc-obj/gcc/xgcc -B/gnu/gcc-obj/gcc/
-B/usr/loca
l/m68k-coff/bin/ -I/usr/local/m68k-coff/include --print-libgcc-file-name`
/usr/local/m68k-coff/bin/ld: cannot open -lc: No such file or directory
collect2: ld returned 1 exit status
make[1]: *** [libgcc1-test] Error 1
make[1]: Leaving directory `/gnu/gcc-obj/gcc'
make: *** [all-gcc] Error 2

   **********************************************************************


What should I do now ?

Regards,

Meir 

*******************************************************************************
Meir     Hacohen                         Tel    :           +972-8-9133394
PLS-DMS-SIR team                         Fax    :           +972-8-9133264
Telrad,   Israel                         e-mail: meir.hacohen@telrad.co.il
P.O.B. 50,   Lod                         ESN    :                 828-3394   
*******************************************************************************


On Fri, 27 Oct 2000, Kai Ruottu wrote:

> Meir Hacohen wrote:
> > 
> > Hello,
> > 
> >   I tried to install gcc cross compilers, and that is what I got :
> > 
> > 1. When I work with target m68k-aout I use the command :
> > 
> > ../gcc-2.95.2/configure --build=hppa1.1-hp-hpux10.20 --host=hppa1.1-hp-hpux10.20 --target=m68k-aout
> > --with-headers=/gnu/newlib-1.8.2
> > 
> > and the configure works fine.
> > 
> > But after the make command I got at the end :
> > 
> > _mulsi3
> > as: unrecognized option `-mc68020'
> > make[1]: *** [libgcc1-asm.a] Error 1
> > make[1]: Leaving directory `/gnu/gcc-obj/gcc'
> > make: *** [all-gcc] Error 2
> 
>  It doesn't find your 'm68k-aout' target assembler. It should be in the default place,
> '$prefix/$target/bin', ie. in your case in '/usr/local/m68k-aout/bin'. The default
> $prefix is '/usr/local' (used when the '--prefix=something' wasn't used). If the right
> assembler is not found, the wrong 'as' from the $PATH will be used. Perhaps you forgot
> to build the GNU binutils for 'm68k-aout' and install them...
> 
> > 2. When I work with target m68k-coff I use the command :
> > 
> > ../gcc-2.95.2/configure --build=hppa1.1-hp-hpux10.20
> > --host=hppa1.1-hp-hpux10.2$ --target=m68k-coff
> > --with-headers=/gnu/newlib-1.8.2
> > 
> > and the configure works fine.
> > 
> > But after the make command I got at the end :
> > 
> > make[2]: Entering directory `/gnu/gcc-obj/m68k-coff/libiberty'
> > make[2]: *** No targets.  Stop.
> > make[2]: Leaving directory `/gnu/gcc-obj/m68k-coff/libiberty'
> > make[1]: *** [../libiberty/libiberty.a] Error 2
> > make[1]: Leaving directory `/gnu/gcc-obj/m68k-coff/libstdc++'
> > make: *** [all-target-libstdc++] Error 2
> > 
> > Can someone tell me what is the meaning of those errors , and how can I fix
> > them ?
> 
>  All the m68k-* embedded 'targets' come without a default 'real target', ie.
> the target board and the startup and glue library for it are unknown. The
> Cygnus newlib comes with some Board Support Packages and you could select
> one of these as your temporary default target. The libiberty is a library
> which should include all those routines missing from your standard C-library
> (newlib here) and before trying to build it a simple program is tried to be
> compiled and linked. This must succeed otherwise there are no sanity in the
> libiberty build.
> 
>  So you must edit a real target into your 'gcc/specs' file while building,
> ie. define the linker script and the used libs there. The startup (crt0.o)
> is defined in the linker script and the spec for it must be empty. Something
> like:
> 
> -------------- clip ---------------------
>   *endfile:
> 
> 
>   *link:
>   -m m68kcoff -T bcc.ld%s
> 
>   *lib:
>   -lc -lbcc -lc
> 
>   *libgcc:
>   -lgcc
> 
>   *startfile:
> 
> 
>   *switches_need_spaces:
> -------------- clip ---------------------
> 
> must then be seen in your 'specs'. Here the BCC-board was selected as the
> 'real target'.
> 
>  In the phase you are, the GCC is already built (only the stuff in 'gcc'
> belongs to the compiler). When you haven't installed the 'newlib' sources
> into the same directory with 'gcc', 'libiberty', 'libstdc++' etc., it is
> now a good time to install GCC from the 'gcc' subdir. Use 'make all-install-gcc'
> or something... Then configure and build newlib for the m68k-coff and install
> it. After that you should have the BCC and other support libs among your
> standard C-library. The linker scripts too...
> 
> -------------------- clip -----------------------
>  Directory of E:\usr\local\m68k-coff\lib
> 
> 11.08.2000  11:40       <DIR>          .
> 11.08.2000  11:40       <DIR>          ..
> 30.10.1998  06:57                2 790 bcc.ld
> 24.03.1999  17:52                  934 crt0.o
> 27.10.1999  20:03                3 054 idp.ld
> 24.03.1999  16:08       <DIR>          ldscripts
> 24.03.1999  17:52               48 462 libbcc.a
> 24.03.1999  17:20              194 010 libc.a
> 24.03.1999  17:52               48 634 libdbug.a
> 24.03.1999  17:20              194 010 libg.a
> 24.03.1999  17:52               60 584 libidp.a
> 24.03.1999  17:18              257 456 libm.a
> 24.03.1999  17:52               48 462 libmvme135.a
> 24.03.1999  17:52               48 462 libmvme162.a
> 24.03.1999  16:08       <DIR>          m5200
> 24.03.1999  16:08       <DIR>          m68000
> 24.03.1999  16:08       <DIR>          m68020
> 24.03.1999  16:08       <DIR>          m68040
> 24.03.1999  16:08       <DIR>          m68060
> 30.10.1998  06:57                2 776 mvme135.ld
> 30.10.1998  06:57                2 828 mvme162.ld
> 30.10.1998  06:57                2 784 sbc5204.ld
> 30.10.1998  06:57                2 782 sbc5206.ld
> -------------------- clip -----------------------
> 
>  Then you can try the extra libs coming with gcc-2.95.2 again
> and the 'make' should now work (of course the 'specs' must be
> edited to use the linker script and the glue library). The
> 'config.log' in 'm68k-coff/libiberty' will show the reason if
> it still fails...
> 
> Cheers, Kai
> 


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list