linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] Problem with UML cross compilation
@ 2003-10-18 18:31 Dan Aloni
  2003-10-19 17:16 ` Jeff Dike
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Aloni @ 2003-10-18 18:31 UTC (permalink / raw)
  To: User-mode Linux Kernel Development

Hi,

Lately I have found a problem with UML and cross compilation. Cross 
compilation means that the architecture that the UML kernel will 
run on (target) is different than the one that it is compiled on 
(host). 

I attempted cross compilation and found that some utils are being
built and run during the build process. These utils were compiled
using the target compiler, which obviously didn't work (all which 
is run on the host needs to be compiled with HOSTCC instead of CC).
Fixing the Makefiles fixes the build procedure from breaking, 
however, the problem is that there is no gaurantee that the UML 
kernel that was built would work.

The reason for the problem is that those utils generate code that
depends on things like offsets inside structs, which obviously 
change between architectures that have different word size. 
It also relies on the target's libc headers, for that purpose.

I've discussed with Jeff about this problem in private E-Mail,
we both thought about solutions but didn't share them yet.

My solution is:

 * Let not build and run those utils on the build host, obviously.
 * All the required versions of the generated code for each of the
   targets will already reside in the tree, the build process will
   automatically pick up the right version and symlink to it.
 * Create a completely standalone program that embeds those utils 
   and generates the code. People who port UML to other 
   architectures will take this program, compile and run it on
   the target and put its output(s) in the tree.
   
The main problem with this method is when and if the target 
changes in such a way that requires those outputs to be 
regenerated. 

I would like your suggestions and opinions about how feasible 
this solution with the 2.4 and 2.6 trees, and if you have
other solutions I'd like to know.

Thanks,

-- 
Dan Aloni
da-x@gmx.net


-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-25  1:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-18 18:31 [uml-devel] Problem with UML cross compilation Dan Aloni
2003-10-19 17:16 ` Jeff Dike
2003-10-19 20:28   ` Dan Aloni
2003-10-25  1:34     ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox