Thread: OpenBSD Compilers in OpenBSD
View Single Post
  #7   (View Single Post)  
Old 1st August 2013
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 429
Default

Related FAQ entry:

Can I cross-compile? Why not?

I think "not maintained for general use" is the key thing here. The developers hammer it into place just enough to make a new arch "native build" capable, and then throw away the cross compiler. Not really intended for general use.

Edit - and as long as the compiler is designed in a semi-sane fashion (take the source in, say, C, and emit the equivalent assembly, then assemble to machine code), the compiler doesn't need to be re-written in assembler, it just needs to have a new target arch written into it to permit it to output correct assembler for that architecture. (But I'll grant the fact that this observation is the 10,000 foot view of the problem, and just because a compiler outputs proper assembly for unsupported arch when run on supported arch doesn't mean the compiler can cross-compile itself to make it "native build" capable).
__________________
Linux/Network-Security Engineer by Profession. OpenBSD user by choice.

Last edited by rocket357; 1st August 2013 at 05:21 PM.
Reply With Quote