Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uflorida!uakari.primate.wisc.edu!aplcen!unmvax!intvax!ray From: ray@intvax.UUCP (Larry P. Ray) Newsgroups: comp.unix.questions Subject: Setting Up Gnu cc for Cross-Compilation Keywords: gnu,gcc,crosscompile Message-ID: <3594@intvax.UUCP> Date: 20 Sep 90 16:48:38 GMT Distribution: usa Organization: Sandia National Labs, Org. 1411, Albq, NM Lines: 32 Gnu gcc seems to be widely used for cross-compilation, but I am having difficulty setting up to compile on a Sun-4 for a Sun-3 target. The documentation doesn't directly address this. Looking at the configuration files, it seems to me that 'config.h' should be linked to 'xm-sparc.h', since that is the host machine and 'tm.h' linked to 'tm-sun3os3.h', the target machine. However, when I do this, I get lots of #define errors during compilation. If I simply 'config.gcc sun3' these errors don't appear, but the host machine is then defined as a sun3. Nevertheless cross-compilation appears to be correct. What's the correct way of setting up for cross-compilation? Next question: gcc seems to require a cross-assembler for the target machine. gas seems like a natural candidate. But when I unpack gas v1.36, I find that it is identified as a 'beta-test'. Is it as stable and usable as gcc? There are no documentation files except a brief README file. Are there any switches? The same as some version of UNIX? Is it sufficient to link m-sun3.h to m-68k.h and 'make a68'? Finally, the Gnu cc documentation makes cryptic references to COFF-encapsulation. How can I know if I am using COFF-encapsulation? Why would I want to? Is there some documentation available that would address these questions? Thanks. Larry Ray lpray@cs.sandia.gov -- Larry Ray ray@intvax.UUCP Sandia National Labs, Albuquerque, New Mexico