How to generate the LIBGCC.A for mc68000

Pascal Chaperon pascal.chaperon@sectrad.fr
Thu Dec 16 16:29:00 GMT 2004


Well,

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

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 =

How about this issue ?

I think it is the last one !

Best regards
Pascal Chaperon


----- Original Message -----
From: "Ian Lance Taylor" <ian@airs.com>
To: "Pascal Chaperon" <pascal.chaperon@sectrad.fr>
Sent: Thursday, December 16, 2004 4:33 PM
Subject: Re: How to generate the LIBGCC.A for mc68000


> "Pascal Chaperon" <pascal.chaperon@sectrad.fr> writes:
>
> > Thank you very much for your contribution.
>
> You're welcome.  Please reply to the list and not just to me.
> Thanks.
>
> > I have well understand that the trouble is around the configuration of
GCC
> > and the
> > config stricts in the gcc / config / m68k directory.
> > This one has a lot different scripts and I do not known how to specify
that
> > I want this
> > script and not the other one.
> > And first what is the default one ?
> > I saw that the t-m68kelf seems to have the lines you specified but how
can I
> > do to use it ?
>
> These files are chosen in gcc/config.gcc.  For example, t-m68kelf will
> be used if you configure for the m68020-elf or the m68k-elf target.
> t-m68kelf is a Makefile fragment; it will be included by the gcc
> Makefile.
>
> The default Makefile fragment would be t-m68k, although since that
> file does not exist there is no default.
>
> Ian



More information about the Gcc mailing list