delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/11/06/07:00:40

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: cross compiler setup question
Date: 6 Nov 2002 11:59:10 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 39
Message-ID: <aqb06e$hbt$1@nets3.rz.RWTH-Aachen.DE>
References: <283gsu4cif5agk80cab1sge47c05rp2414 AT 4ax DOT com>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1036583950 17789 137.226.32.75 (6 Nov 2002 11:59:10 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 6 Nov 2002 11:59:10 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Charles Wilkins <chas AT pcscs DOT com> wrote:

> but where I get confused is when the discussion refers to cross
> compiling in the context of building the cross compiler for use on
> another platform versus just creating the binaries for use on an
> alternative platform.

This confusion probably stems from the remarkable complexity the GCC 
(and binutils) build process can handle.  They have not just two, but
*three* platforms to handle:

1) the platform the tools themselves are built on. ("build")
2) the platform the tools will be *run* ("host")
3) the platform the tools will produce code for ("target")

For your plan, you need a build with host=build={your linux platform},
and target=DJGPP.  In a very small nutshell, you'll want to configure
and make binutils and GCC with a call sequence like this:

	mkdir gcc-build
	mkdir binutils-build
	cd binutils-build
	../binutils-3.1/configure --target=i386-pc-msdosdjgpp
	make
	cd ../gcc-build
	../gcc-3.2/configure --target=i386-pc-msdosdjgpp
	make 

This won't work quite out of the box, though.  You'll need the
'dj203crx.zip' package to provide that cross compiler with include
files and the DJGPP runtime (startup .o files, libc.a).  Details about
that are contained in the GCC installation instructions (gcc/README,
gcc/INSTALL)

There's a (probably somewhat outdated) HOWTO explaining all this on
DJ's web site, IIRC.
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019