This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to generate the LIBGCC.A for mc68000


Well,

Thank you for your precious counsels.

I do not know what is to have a "clear understanding of the linux
environment" .
What I know is that I am used to configure and recompile the Linux kernel on
i386 systems for several years.

That is true that build a cross-compiler for an embedded system is something
a little bit
more complex but I am also used to compile and run several embbeded RTOS
in our harware platform (such as VxWorks or AMX ).

To speak franckly we have several project and one them is to port Linux on
a MPC system (Power Quick) with different options for a new harware.
As now we use Linux in most of our host systems but not embedded in the
hardware that does not require a lot of functionnalities.
The new project will require more features (such as TCP/IP) and that is why
we want to use the Linux kernel in it.

Since our current hardware is based on mc68LC302 I want to be more familiar
with embedded Linux by building a kernel for this base. This is only a step.
This processor has no MMU ( it is derived from mc68000) so I am using for
this step the ucLinux distribution that I found on the related site.
This distribution included several ports and on one them is for a mc68EN302
witch is very near our processor.
There are also all the tools needed to compile the kernel and build an image
for this
target but it is not what I want : I want to control all the steps required
to build
an embedded system and not to blindy use a "make" file that produce the
result without
understanding what happen during all the steps.

I do not known if it is clear: I appologise I would not want to disturb you
or be some
one rude. My questions were only related on my comprehension on the steps
required
for that.
Now, with the gnu good support, I think that the compiler is compliant this
the goal
I have fixed: to be abble to compile the ucLinux kernel with a self-produced
cross
compiler chain.
After that we will check all the points related on the bootstrap process but
we have
already do a lot of thing for the other RTOS and we are confident on it.

Of course I accept with pleasure all counsels that will help us to go ahead
: I have already
found a lot of tricks in the Internet and I have planned to continue the
investigation
as far as everything will not be clear.

Best regards
Pascal Chaperon

----- Original Message -----
From: "Peter Barada" <peter@the-baradas.com>
To: <pascal.chaperon@sectrad.fr>
Cc: <ian@airs.com>; <gcc@gnu.org>
Sent: Thursday, December 16, 2004 6:15 PM
Subject: 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]