Date: Fri, 1 Aug 2008 18:44:20 +1000 From: Peter Jeremy <peterjeremy@optushome.com.au> To: Chuck Robey <chuckr@telenix.org> Cc: freebsd-amd64@freebsd.org Subject: Re: app programming on freebsd amd64 Message-ID: <20080801084420.GL1359@server.vk2pj.dyndns.org> In-Reply-To: <489243B0.80307@telenix.org> References: <4891F3F3.8090608@telenix.org> <20080731195527.GT1359@server.vk2pj.dyndns.org> <489243B0.80307@telenix.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--d9ADC0YsG2v16Js0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2008-Jul-31 18:58:56 -0400, Chuck Robey <chuckr@telenix.org> wrote: >I wasn't trying to force you to go my way, just stop trying to make me go = your >way. I wasn't intending to force you to use my way. >Well, I'm doing this with X11, which was written to begin with in a 32 bit >atmosphere, and does have several nontrivial 64 bit problems. I run 64-bit X.org on several systems and haven't noticed that. Can you give some more details. >Oh, you're telling me that if I run one app as 32 bit (compiling it, the w= hole >enchilada, as 32 bit) would only work if I had the OS, kernel and all libs= , as >32 bits? No. A 64-bit kernel will happily run 32-bit or 64-bit apps, with the exception of 32-bit apps that grovel in kernel memory. The problem is that include files wind up getting defines from /usr/include/machine and the contents of that directory assume that longs and pointers are 64 bits but they are 32 bits with -m32. Try comparing /usr/include/machine on i386 and amd64 boxes to see what I mean. This means that if you #include <sys/stat.h> in -m32, your struct stat will be different to the one that the kernel expects. (And I forgot about the linking problems that other people pointed out, sorry). Given the current situation with FreeBSD, I believe the easiest way to build a 32-bit app is to install an i386 world under (eg) /i386 and chroot into it to build the app. You can still run it outside the chroot area. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --d9ADC0YsG2v16Js0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkiSzOQACgkQ/opHv/APuIcOtQCeJMfwX9vK55GXNpCKKsTTw/Ll w2cAoJUl/8/WPejKLymysm+YnV8RRFjn =CT1g -----END PGP SIGNATURE----- --d9ADC0YsG2v16Js0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080801084420.GL1359>