Back to wiki

RCS History

/ TOP / cross-compiler.mdwn

Differences for revision 1.4 from 1.3

--- /cross-compiler.mdwn	2007/12/01 02:42:32	1.3
+++ /cross-compiler.mdwn	2007/12/01 02:43:55	1.4
@@ -1,7 +1,14 @@
-If you want to cross-compile pcc (from a build machine to a different host machine):
+A complete cross compile system can be setup easily. For example:
-$ export CC=mips-netbsdelf-pcc
-$ ./configure --host=mips-netbsdelf
+$ cd binutils-2.18
+$ ./configure --target=mips-netbsdelf
 $ make&& make install
+$ cd ../pcc
+$ ./configure --target=mips-netbsdelf
+$ make&& make install
+The compiler from the above example is called /usr/local/bin/mips-netbsdelf-pcc.
+Copying the header files from the target machine into /usr/local/mips-netbsdelf/include and the libraries into /usr/local/mips-netbsdelf/lib is sufficient to build binaries.
+It's possible for multiple cross-compilers to exist on the host system at the same time (which was the motivation for doing this!).
-This will build pcc into a mipsel binary for running on NetBSD.
\ No newline at end of file

Powered by rcshistory.cgi 0.3