PSARC/2008/179 cross link-editor

Ali Bahrami Ali.Bahrami at sun.com
Thu Mar 6 10:20:48 PST 2008


Several questions have come in publicly and privately regarding
cross compiling, whether our compilers support cross compilation,
and whether I've made any attempt to cross build ON. Let me fill
in some of those details.

A cross link-editor is just one part of the larger build picture. It
is a significant step, but there is much left to do. For example, to
cross build an ON nightly build, we will need cross-capable:

	- compilers, assemblers, and any related tool chain components
	- Related build tools (mcs?)
	- ctfconvert
	- makefiles will probably need adjustment
	- elfsign

Some of these are hard, others easy, but clearly there's work left to do.
And no doubt there are 5-10 additional things that I'm not thinking of at
the moment. As much as I'd love to use my fast amd64 desktop box to do my
nightly sparc builds, it's not something that will happen over night.

The compiler/assembler is the biggest remaining piece of the puzzle.
gcc can be built as a cross compiler, but as far as I know, the standard
Sun Studio compilers are native-only. I am aware of one cross compilation project
going on within our compiler group, and I know there is wider interest in
the subject, so it is certainly possible that they might move in that direction
now that there is a linker to use. This is a business decision they need to
make.

My primary focus in turning ld into a cross link-editor has therefore
been to establish the internal framework for cross-support, and to ensure
that native operation doesn't suffer. Used as a cross linker:

	- I've built small cross programs manually, but using two terminal
	  windows (one x86, the other sparc): Compile in one, link in the
	  other, return to the first to run the result.

	- The cross link-editor prototype was used in the cross
	  compilation project I mentioned above.
- Ali



More information about the opensolaris-arc mailing list