Document / Script for automating cross-compiler build

David Williams
Mon Aug 14 16:22:00 GMT 2000

Thanks for the script. I have used an earlier version of the script you
posted and
was eventually, with just a few minor hiccups able to compiler for
m68k-coff. I
will be trying m68k-elf soon.

I am using latest cygwin net release 1.1.4 on Win98SE (Celeron 533). The
problem I had was that my user name was "David Williams". The space in
the name
seemed to cause a lot of problems. I changed it to just "Dave" and it
worked much
better. The first time I attempted to compile I had the build directory
outside of
the root directory for cygwin, ie somewhere else in the windows
structure and I got problems building binutils and then GCC. The next
time I tried
it I put the build directory inside my home directory and this seemed to
work ok.
It took about 3 hours to compile the lot. I am not sure if I had fixed
my user
name when trying to build the first time.

A couple of questions

The compiler that is built seems to not output line terminators in the
output (as it use to). I end up with very long lines of verbose (-v)
from the compiler. I have been using V6 of David Fiddes coldfire
binaries (ECGS
1.1.2) and the output of verbose information in that was fine. Where
should I
start looking?

Why should I prefer elf to coff for an m68k embedded target?

I was examining your script to determine what things it does so that I
can build
individual pieces of the system as required. More specifically I think I
will need
to modify some functions in newlib and was wondering how that was built.
I could
not see any specific commands that built newlib so I assume that the
option when building GCC also causes newlib to be built. Can you confirm
this? How
would I just build newlib?


Christopher Bahns wrote:

> Hello All,
> Attached is a script that is intended to make the building of a
> cross-compiler under Windows 95/98/NT and Cygwin 1.1.x as easy and
> automated as possible. I don't know if it would be just as useful to
> non-Windows people, but I suspect it might be (with some modification
> perhaps). But, it is intended for Windows/Cygwin people.
> I had a lot of trouble getting compiler builds to work on my SMP
> dual-Celeron system running Windows NT 4.0 Workstation. If anyone has
> success on an SMP system using Cygwin 1.1.x, please let me know.
> The script starts from scratch and assumes that you have nothing except
> a computer running Windows NT or 98 (95 should work too, but don't know
> about 2000). Unfortunately the only editor you will end up having
> available in the Cygwin environment is vi. I prefer Emacs, and have
> built and installed XEmacs on my machine, but this is not included in
> the attached script. You also will not have the benefit of perl or info.
> I really wish Cygnus/RedHat will include at least these three tools in
> future releases of its Cygwin environment.
> The script also includes some advice on what all you need to get an
> embedded program linked and running properly. Although I'm far from an
> expert on this, I have gotten my program to run on my M68306-based
> device, and I include in the script's comments some of the things I had
> to do to get to that point..
> Please let me know if this is helpful, or if you have recommendations
> for changes/additions, or whether a similar thing already exists for us
> unfortunate Windows people and I just could not find it.
> The script is currently configured as follows (based on what I needed),
> but is designed in a way to make these things easy to change:
>     Target: m68k-coff
>     Prefix: /gcc-m68k
>     binutils-2.10
>     gcc-2.95.2
>     newlib-1.8.2
> I have also done successful builds with the Target set to "m68k-elf".
> Chris
>   ------------------------------------------------------------------------
>                       Name: buildgcc.tar.gz
>    buildgcc.tar.gz    Type: Winzip32 File (application/x-winzip)
>                   Encoding: base64
>   ------------------------------------------------------------------------
> ------
> Want more information?  See the CrossGCC FAQ,
> Want to unsubscribe? Send a note to

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list