Date: Tue, 2 Jun 2009 22:38:31 -0700 From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: David Xu <davidxu@freebsd.org> Cc: freebsd-amd64@freebsd.org Subject: Re: gcc -m32 and int64_t Message-ID: <20090603053831.GA35940@troutmask.apl.washington.edu> In-Reply-To: <20090603044320.GA35526@troutmask.apl.washington.edu> References: <4A25F31D.4040201@freebsd.org> <20090603044320.GA35526@troutmask.apl.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 02, 2009 at 09:43:20PM -0700, Steve Kargl wrote: > On Wed, Jun 03, 2009 at 11:50:53AM +0800, David Xu wrote: > > It seems there is a problem in /sys/am64/_types.h when cross-compiling a > > 32-bit code in amd64 machine, the following code prints 4 instead of 8: > > > > /* int64_size.c */ > > > > #include <sys/types.h> > > #include <stdio.h> > > > > int main() > > { > > printf("%d\n", sizeof(int64_t)); > > return (0); > > } > > > > > > $cc -m32 -o int64_size -B /usr/lib32/ int64_size.c > > $./int64_size > > 4 > > > > IIRC, the c compiler in the base system isn't setup > to be a cross-compiler. So, there are probably many > more problems than the one shown above. Peter Wemm > has posted about this previously. > For more info, see http://www.freebsd.org/cgi/query-pr.cgi?pr=gnu/112215 -- Steve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090603053831.GA35940>