In message: <20100301091756.ga73...@server.vk2pj.dyndns.org> Peter Jeremy <peterjer...@acm.org> writes: : On 2010-Feb-28 16:07:32 -0700, "M. Warner Losh" <i...@bsdimp.com> wrote: : >In message: <4b8af55c.6040...@freebsd.org> : > Nathan Whitehorn <nwhiteh...@freebsd.org> writes: : >: M. Warner Losh wrote: : >: > In message: <20100228195041.ga68...@server.vk2pj.dyndns.org> : >: > Peter Jeremy <peterjer...@acm.org> writes: : >: > : On 2010-Feb-26 14:57:36 +0100, Attilio Rao <atti...@freebsd.org> : >: > wrote: : >: > : >For the future, however, probabilly we would need to do something : >: > like : >: > : >pc98 already does wrt i386 (i386/include/ pc98/include/ : >: > amd64/include/ : >: > : >just have files wrappers to the generic one under x86/include/ when : >: > : >necessary). : >: > : : Not that something like this is also critical for getting : >: > i386/amd64 : >: > : cross compilation to work - one of the blocking issues is that the : >: > : correct machine/ includes are not available in cross-compilatio : >: > mode. : >: > : >: > Huh? : >: > : >: > I cross build all the time, and the machine/ includes are always : >: > right, with or without this patch. Maybe you could explain what you : >: > mean here... : >: > : >: I'm guessing what was meant is that one benefit of a merged tree (like : >: we will have with powerpc) is that you can do cc -m32 on a 64-bit host : >: to get a 32-bit binary, which is less than trivial now. : : Yep. : : >True enough. But we don't have anywhere close to a merged tree on : >x86, and won't for the foreseeable future. I don't really want to see : >an include32, when all the cross building tools exist in the tree : >already (see XDEV in Makefile.inc1)... : : I agree that we don't want an include32 - all that we need is the : machine-dependent directory (i386, amd64, ...).
No. We need a merged tree to make it actually work, otherwise machine/foo.h won't work right. simply having both i386/foo.h and amd64/foo.h is not sufficient. : > If you are cross building, you : >really need a full cross building environment. The -m32 hacks we have : >now are, as you describe, insufficient to the task... : : For building i386 executables in an amd64 world, we already have : almost everything needed - the toolchain is present, the libraries are : present, most of the headers are present. The only parts of the : environment that aren't installed in default are the machine-dependent : headers (and some glue to include the appropriate architecture). : : I'm not saying that installing the i386 headers will magically make : '-m32' work but it's a necessary prerequisite. We need merged support for both out of one tree, and we're nowhere near that. The toolchain also is only mostly present, last time I looked there were small bits and pieces missing here and there. Also, -m32 is a bit of a hack, since it isn't as useful as you'd like once you start to compile ports. Too many of them don't like it when you pass in a cc that has args with it, or they don't religiously use $CC, which means you get some 64-bit and some 32-bit goo. We have the same problem with MIPS... Warner _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"