This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to generate the LIBGCC.A for mc68000
>I had understood that my compiler has been generated for 68020 family.
>So I re-compiled all the sources (including the binutils) with the following
>option :
>--target=m68k-coff
>I also create a t-coff file by copying and renaming the t-m68kelf.
>( I think it was not good, according to you e-mail the name should has been
>t-m68kcoff ).
>In any case the result is a compiler installed in a new directory created
>for it
>../cross-compiler/m68k-coff
>All the binaries are well installed and now the libgcc.a contains all the
>arithmetics functions
>I need for a mc68000 compilation ( including mulsi3 and friends ).
>
>So it seems to be better isn't ? :-)
>
>I made a test for my compiler :
>
>vi test.c
>-->
>
>int main( int argc, char **argv)
>{
> return 0;
>}
>
>and I tried to compile this file :
>
>m68k-coff-gcc test.c
>
>I have got an error in the linker :
>it is deplayed in french but in english it should be somethink like that :
>
>../m68k-coff/bin/ld: unable to find -lc
>collect2: ld has returned 1 error code
This is expected since you built a cross-compiler for m68k, but not a
libc for m68k that you can link with.
>Note that I had exactly the same error while compiling GCC and I found a
>workaround by manualy edit the
>Makefile in gcc directory :
>SHLIB_LC = -lc
>
>replaced by
>SHLIB_LC =
Blindly removing the -lc option is *not* what you wanted to do.
>How about this issue ?
>
>I think it is the last one !
Ah, no. This is just another issue in a long list of issues that
you're going to run into since you really don't have a clear
understanding of the linux environment, or how to build cross-target
toolchains.
Again, go look at:
http://www.uclinux.org/
where you'll find kernels that have been modified to support m68000,
as well as toolcahins that can build that kernel as well as the
userland applications you want to run.
Until you have a much clearer understanding of what you are trying to
do, blindly throwing together a cross-compiler is not going to get you
there.
--
Peter Barada
peter@the-baradas.com