From: cgjks1 AT lut DOT ac DOT uk (James Soutter) Newsgroups: comp.os.msdos.djgpp Subject: Re: cross-compiling: FROM linux TO msdos Date: 17 Nov 1996 16:09:53 GMT Organization: Loughborough University, UK. Lines: 80 Message-ID: <56ndch$fq0@sun-cc204.lboro.ac.uk> References: <56lkks$gpg AT agate DOT berkeley DOT edu> NNTP-Posting-Host: cgneiss.lut.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp cdamond AT uclink2 DOT berkeley DOT edu wrote: : I'm trying to compile a C cross-compiler out of the gcc sources. I want : it run with an i486-unknown-linux host and i486-unknown-msdos target, and : I'm compiling it on an i486-unknown-linux (host==server). Thus, this is : sort of the inverse of djgpp. Creating a DOS cross compiler is not as simple as just compiling gcc with the target host "MSDOS". While LINUX and DOS both run on the same CPU, the DOS "kernel" provides different functions from the LINUX kernel. To cross compile LINUX programs to DOS you need some smart libraries to bridge the difference between UNIX and DOS. DJGPP provides these libraries as well as some other tools you need. To get a binary of the LINUX to DOS cross compiler: 0) If you are running a distribution of Linux that supports rpm-2.2.x, for example Linux 4.0, then download the RPM binary and try it. ncftp ftp.redhat.com cd pub/contrib/RPMS bin get djgpp-2.1-1.i386.rpm quit rpm -ivh djgpp-2.1-1.i386.rpm Note that this distribution is missing the latest round of bugfixes to DJGPP. To recompile the cross compiler: 1) Start by creating a new directory. mkdir djgpp cd djgpp 2) Download the package "djcrx201.zip" from the DJGPP distribution as well as GCC and BINUTILS. Also get csdpmi3b.zip as you may need it to run the binaries that are built with the cross compiler. ncftp ftp.simtel.net cd mirrors/simtelnet/gnu/dgjpp/v2 bin get djcrx201.zip cd ../v2misc get csdpmi3b.zip quit ncftp prep.ai.mit.edu cd pub/gnu bin get binutils-2.7.tar.gz get gcc-2.7.2.tar.gz quit 3) Uncompress everything (note the -a flag for djcrx201.zip). tar -xzf binutils-2.7.tar.gz tar -xzf gcc-2.7.2.tar.gz unzip -a djcrx201.zip 4) Move the cross compiler stuff into the root directory cp cross/* . 5) read the installation instructions and follow them. less install .... -- James