"I need a way to cross-compile plan9port" would
have been a much more productive opening statement
than "I'm going to modularize plan9port".

I think you should be able to cross-compile it
pretty easily if you already have a cross-compilation
environment set up.  

1. Build a local plan9port tree, put it in the chroot
  environment, and put it at the end of your chrooted $PATH.
2. Edit that tree's 9 script to override $PLAN9 with
  the path to the local tree (1 line change).
3. Extract a fresh tree somewhere else.
4. run SYSNAME=xxx OBJTYPE=xxx INSTALL in the fresh tree.
  (assumes 
I haven't tried this (I find it much easier just to set up
a dedicated machine of the right OS and architecture
and use its native tools), but having the local copy of
the tools in the path before running INSTALL should
make it use those instead of the ones it builds.

That sounds like a lot less work than your original proposal.

Good luck.

Russ


Reply via email to