Thursday, April 24, 2008

Multi-Architecture Builds

Building for multiple architectures tends to get a bit messy. Trying to get a clean OS build that uses:
  • Core OS kernel (same code base on multiple targets)
  • Processor specific drivers
  • Platform (hardware attached to processor) specific drivers
Current build system uses vpaths to locate all source files that are built into objects residing in a single build directory. Unfortunately, this build system is very ad hoc and rather painful to expand or even maintain. I had hoped to move over to autotools ('cause they make everything better, right...) but soon ran into problems. I've not figured out how to link to an object file built in directory X from another directory Y. My current solution uses libtool (rather viral suite of tools, you grab piece of autotools and the rest soon follow) to create a holder library in each directory if interest and link these into a final image. Good idea? Yes, except it fails. The final image uses jump tables of code not directly accessed from any point in the program. I've not yet figured out (seems that this happens a lot to me) how to force the linking of code that is not ever accessed. I'm currently working off of two sample tutorials on line. We'll see if a combination of them solves my problems:

08/04/30

It looks like the best way to do what I have in mind is through the use of the subdir-objects. But I didn't get that up and running before heading back to research.

No comments: