Re: [uml-devel] Re: Supporting building on x86-64 host as 32-bit UML
On Sunday 20 March 2005 16:03, Gerd Knorr wrote: 1) how the user must choose what he wants (SUBARCH=i386 can be useful, maybe a Kconfig option would be nice - we need to choose the default depending on the host arch). That one is easy -- just use linux32 make That will switch the personality and uname will return i686 instead of x86_64 then ;) linux32 is a SuSE specific alias like the i386 for Fedora, right (they both alias setarch, IIRC)? 2) using the proper options for the tools (addressed partially by the patch below) Probably still needed. Maybe not any more with gcc4, I remember there was some discussion among the gcc folks to make gcc default to -m64 / -m32 depending on the current personalily. In that case the linux32 thingy mentioned above should catch that one as well. Not sure that actually happened. We're not going to wait gcc4, especially if it is still so memory hungry... 3) using the proper headers (asm-i386 instead of asm-x86_64)... Fedora linux32 should fix that one as well. +AFLAGS += -m32 +CFLAGS += -m32 I think that can also be fixed on the make command line, with a small wrapper script -- named make32 for example -- doing something like this: #!/bin/sh exec linux32 make CC=gcc -m32 AS=as -m32 ... $@ Last time I tried I ran into the problem that the glibc headers of the x86_64 biarch compiler slightly different from the ones on a real i386 machine, thus some #ifdefs in uml userspace code didn't work as expected and broke the build. +HOSTCFLAGS += -m32 +HOSTLDFLAGS += -m32 Not needed I think. Thats used for kconfig and other stuff which runs on the _host_ machine (for cross compiles), thus it doesn't hurt if it is 64 bit. I'm not sure, but that's probably needed for the userspace utilities that print out some headers (with offsets inside host proc. specific structs). -- Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade --- This SF.net email is sponsored by: 2005 Windows Mobile Application Contest Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones for the chance to win $25,000 and application distribution. Enter today at http://ads.osdn.com/?ad_id=6882alloc_id=15148op=click ___ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: [uml-devel] Re: Supporting building on x86-64 host as 32-bit UML
On Tue, Mar 22, 2005 at 06:53:20PM +0100, Blaisorblade wrote: On Sunday 20 March 2005 16:03, Gerd Knorr wrote: 1) how the user must choose what he wants (SUBARCH=i386 can be useful, maybe a Kconfig option would be nice - we need to choose the default depending on the host arch). That one is easy -- just use linux32 make That will switch the personality and uname will return i686 instead of x86_64 then ;) linux32 is a SuSE specific alias like the i386 for Fedora, right (they both alias setarch, IIRC)? Don't have a setarch binary here. But most likely they do almost the same, yes. Not needed I think. Thats used for kconfig and other stuff which runs on the _host_ machine (for cross compiles), thus it doesn't hurt if it is 64 bit. I'm not sure, but that's probably needed for the userspace utilities that print out some headers (with offsets inside host proc. specific structs). Uhm, ok, then it probably is needed. This also means that you can't cross-compile uml kernels, right? Gerd -- #define printk(args...) fprintf(stderr, ## args) --- This SF.net email is sponsored by: 2005 Windows Mobile Application Contest Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones for the chance to win $25,000 and application distribution. Enter today at http://ads.osdn.com/?ad_id=6882alloc_id=15148op=click ___ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel