From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu From: Charles Forsyth Date: Mon, 4 Feb 2008 14:32:30 +0000 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] cross-compilation. Topicbox-Message-UUID: 44582db4-ead3-11e9-9d60-3106f5b1d025 > because > something had to be used to compile Plan 9 itself, etc and I figure it's > not being done as a cross-compiler). > -- ken thompson wrote a nice little C compiler. cross-compilation is trivial: if 8c is the x86 compiler and qc is the power pc compiler, you get a cross compiler from x86 to powerpc by compiling qc with 8c. unchanged. that's it. no nest of peculiar configuration files just to make a given compiler into a cross-compiler. to cross-compile the whole system for (say) PowerPC on any architecture, including itself, use objtype=power mk install on an x86, sparc, amd64, powerpc, ... . you can also build all of them in the same tree: objtype=power mk install objtype=386 mk install objtype=arm mk install and simultaneously. no peculiar `buildroot' environments. and so on. the mkfiles are essentially configured for a target platform by /$objtype/mkfile. here's /386/mkfile: