Mail Archives: djgpp/2001/08/23/02:38:14
"Yeah, it's definitely possible; I did it a month ago..." :-)
But seriously, all you need to do is:
- get a binutils tarball (2.11.2 is the latest I think)
- get a gcc tarball (might as well use 3.0)
[both the above are at ftp.gnu.org/gnu/; you can use CVS versions
as well, of course]
- get djcrx203.zip
- choose where to put the cross-compiler (ie: what prefix)
[these guidelines assume /opt/djgpp, but you can just put it in /usr
with the rest of the system]
- mkdir /opt/djgpp; cd /opt/djgpp
[Note: for optimal safety, make /opt/djgpp user-owned; that way, you
can do 'make install' as a regular user during this build process
and avoid overwriting files due to typos]
- mkdir i586-pc-msdosdjgpp
- unzip djcrx203.zip in /opt/djgpp/i586-pc-msdosdjgpp
- extract the binutils tarball somewhere
- cd <binutils-source-dir>
- mkdir djbuild; cd djbuild
- ../configure --prefix=/opt/djgpp --target=i586-pc-msdosdjgpp
[use whatever flags/options you like, but the --target and --prefix
must be there]
- make
- make install
[You can now remove the binutils tree to save space if you like]
- extract the gcc tarball somewhere
- cd <gcc-source-dir>
- mkdir djbuild; cd djbuild
- ../configure --prefix=/opt/djgpp --target=i586-pc-msdosdjgpp
[Note: you _might_ need to add /opt/djgpp/i586-pc-msdosdjgpp/bin to
PATH for this to work properly]
- make bootstrap
[This builds the compiler 2 or three times to verify it's functional]
- make
[This _should_ build ebverything else (C++ library, ...)]
- make install
- all done!
In order to use the stuff you built, you'll need to adjust a few envvars
so /opt/djgpp is used. I have the following in my .bashrc:
if (echo $PATH | grep /opt/djgpp 2>/dev/null >/dev/null); then
: already set up
else
export PATH=/opt/djgpp/bin:$PATH:$HOME/bin
export LD_LIBRARY_PATH=/opt/djgpp/lib:$LD_LIBRARY_PATH
export MANPATH=/opt/djgpp/man:$MANPATH
export INFOPATH=/opt/djgpp/info:/usr/info:/usr/local/info
fi
Hope this helps. Note: no guarantees; as far as I remember, this is what
I did when I built my cross-to-djgpp compiler on RedHat 6.2 (I used
binutils 2.11 and a cvs version of gcc 3.0.1 in case it matters).
- Raw text -