David Dudley <ddudley@xxxxxxx> writes: > I need to generate a cross compiler that will run on my OSX Darwin computer, > and generate objects for a i686-pc-linux-gnu system. Building a cross-compiler for a GNU/Linux system is painful. There are some scripts floating around. You should look for those. crosstool-ng is one. > The compiler builds fine till it gets to needing crti.o, crt1.o, libc.a, and > libm.a. I would have thought that pieces required for the compiler itself > would have been built in the compiler. I¹m using the include files from the > target Linux system to build things (since it wouldn¹t get to this point > without them. If you¹re building a cross compiler to build the target > system, what sense does it make to require files from the target, which > might not exist yet?). You have to stage the build. The files you mention are, as you know, part of glibc, not gcc. gcc is just a compiler and deliberately does not include a library. The same issue arises for any cross-compilation: you need to provide a library. > I¹m trying to build everything (binutils, gcc, gmp, mpfr, mpc) in a single > pass which doesn¹t work with mpc as it fails if gmp and mpfr aren¹t already > installed. I¹m assuming that crti and the other libs I need are probably in > glibc, so is there a way I can link it into my combined director to build as > a part of the process? You can't do a GNU/Linux cross-build in a single pass. Ian