This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Some questions of GCC cross tool 3.3 for ColdFire linux
- From: Bernardo Innocenti <bernie at develer dot com>
- To: Chen Qi-A18263 <A18263 at motorola dot com>
- Cc: uClinux development list <uclinux-dev at uclinux dot org>,gcc at gcc dot gnu dot org
- Date: Wed, 30 Jul 2003 18:08:18 +0200
- Subject: Re: Some questions of GCC cross tool 3.3 for ColdFire linux
- Organization: Develer S.r.l.
- References: <01139FC052A0D411900B00508B9535FC092A9786@ZCH07EXM04.corp.mot.com>
On Wednesday 30 July 2003 15:48, Chen Qi-A18263 wrote:
> I am about to build a gcc cross tool on my cygwin envrioment.
Nice! I was looking for somebody to test my work on cygwin. I only
have one Windows system in my office. It has cygwin, but it's a very
slow computer.
> I have successfuly building it for gcc2.95 useing the following source &
> patch :
>
> <http://www.uclinux.org/pub/uClinux/m68k-elf-tools/tools-20030314/> : This
> is the cross tool source you based on.
Yes. There have been _many_ changes in my build script. I didn't drop
cygwin support, but it's probably broken at the moment.
> <http://www.coredinal.nl/~leon/coldfire/cygwin/>
>
> The second link contain some path files which fix some problem maybe exist
> when building under cygwin, for example: -- With out that patch, I got
> error when build the uClibc with first pass compiler.( , it's because the
> cygwin environment did not have header files libgen.h which the uClibc code
> require).
I didn't know about Leon's patches for cygwin. Perhaps with yoour help I could
integrate them in my distribution, with your help of course.
> Now I want to build a gcc3.3 based cross tool chain, and here comes some
> questions
>
> 1. If you have involved the above patch to get it been build in cygwin?
I know cygwin and use it sometimes. I'm not interested so much in Windows to
spend much time on it, but I'd be very happy to include cygwin support in my
release if someone else does it.
> 2. In your "build-uclinux-tools.sh", it supposed to "extract
> gcc-*${GCCVERS}.tar.*", where the gcc version is defined as
> GCCVERS="3.3.1-20030720", but I did not find any gcc-3.3.1-20030720.tar
> files in the sources you provide.
> If you had miss it or we can use gcc-2.95 as well( with 3.3 related patches?).
> I think that is a bug.
Perhaps you've downloaded the files from an older release where I had forgot
to update the links for the gcc archives :-)
Look at the latest distribution:
<http://www.develer.com/uclinux/uclinux-elf-tools.html>
There are also some more patches that are mostly needed for C++ programs.
> 3. Beside that, I am about to build another GCC tool chain for specific CF
> board ( 5272 & 5407 ), by which it will create binary that running on bare
> board with out any operation system. As far as I know, there must be
> some library support for specific board.
The tools can be used both for uClinux and for bare-board developement (the Linux
kernel does not use Linux! :-).
The easier way to work without the OS is linking this way:
m68k-elf-gcc -m5307 -nostartfiles -nostdlib \
some/path/crt0.o file1.o file2.o -o program -lgcc
You just need libgcc if your source does things for which GCC needs
to call external functions. Sometimes you can get along with -fno-builtin.
Anyway, libgcc does not depend on uClibc or other C libraries.
> Because in common GCC cross tool
> chain, it may use system call to implement some information. But I do not
> know where to find these lib/package. Is there any website that contain
> such rebuild cross tools?
If you need a standard C library (for memcpy, etc.), you could try building
with newlib, which is targeted for embedded systems without an OS. newlib is
part of the binutils/gdb CVS repository. I think there's an home page on the
Cygnus/Redhat site:
<http://sources.redhat.com/>
Please, try to extend the build-uclinux-tools.sh script in a clean and
configurable way, so we can easily merge our work and provide a single
GCC distribution for both Linux and Windows, and for both uClinux and
bare-metal.
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/
Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html