From: J DOT J DOT vanderHeijden AT student DOT utwente DOT nl (J.J. van der Heijden) Newsgroups: comp.os.msdos.djgpp Subject: Re: cross-compiling: FROM linux TO msdos Date: Sun, 17 Nov 1996 12:57:22 GMT Organization: University of Twente, Enschede, The Netherlands Lines: 52 Message-ID: <328f09db.1399130@news.student.utwente.nl> References: <56lkks$gpg AT agate DOT berkeley DOT edu> NNTP-Posting-Host: wit381304.student.utwente.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On 17 Nov 1996 00:01:32 GMT, 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. > >So far, following the directions, I've managed to successfully compile >gcc-2.7.2.1 with i486-unknown-linux -> i486-unknown-linux, but when I try >to specify the target as msdos, it says that that configuration is not >supported, when it is specifically mentioned in the docs as a supported >target. I know I also need cross-compiled binutils eventually (the >instructions don't seem to indicate that I don't need them yet) but the >directions on building them for a cross-compiler are much worse than >gcc's. > >So, a few questions for someone who's done this before (or someone smart >who hasn't): > I did this; you can download the complete toolchain from you nearest SunSite linux mirror, directory is devel/msdos. It's still v2.0 though (didn't bother to upgrade yet) >+Why does the gcc configuration utility not acknowledge the valid target > msdos? You have to edit `config.sub' and add -go32* to list of supported OS's > >+Is there an easier way to do this, since I know the processor is the same > (and thus the assmbler code should be, shouldn't it?) > No. Linux uses ELF object format, DJGPP uses COFF. >+How do you build the binutils for a cross-compiler? Do I need to, given > that they are intended to produce code for the same processor? > ./configure --host=i486-linux --target=i386-go32 --build=i486-linux *BUT* you need some patches to change the default object format from coff-i386 to coff-go32 >+Is there anything else besides gcc and binutils I need (special msdos > libraries or headers for example) to set up a cross-compiler? You need a C-library, which is basically djdevXXX.zip with the header files converted to UNIX text format. /janjaap