[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: GCC cross compiling



Raffaele Sandrini <rasa@gmx.ch> writes:
> Do i have to compile a special GCC for every source and destination
> platform or can i specify the destination on the command line? (the
> manual is a bit weird about that)

I believe you need to compile a separate gcc for each host/target.
The cross-compiler I have sitting around, for example, is
arm-linux-gcc built for x86 Linux.

> Do i have to compile a libc for that platform?

You need to acquire a set of runtime libraries, yes.  Often the
easiest way to do this is to copy them from a working system of the
target type.  For my cross-compiler, I copied all of /lib and /usr/lib
off of my iPAQ-running-Linux into a directory, and fixed the symlinks.

> Do i have to link staticly?

No, dynamic linking works fine (provided, of course, that you have an
appropriate cross-linker and the target platform supports shared
libraries).

(C++ Hello World)
> To execute that on an ARM platform like the Nokia 9210
> (Communicator) or a Psion is it enough to compile that for the
> specific platform?

Yup, should be fine.

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: