On Sun, Nov 11, 2007 at 06:09:22PM +0000, J.H.M. Dassen (Ray) wrote:
> On Sat, Nov 10, 2007 at 12:53:09 +0100, Pierre Habouzit wrote:
> > for some reason when building on a biarch machine you have to tell him you
> > want the 64bits API. Run:
> > 
> >   cgcc -m64 .... yourtest.c
> > 
> >   and it will work as expected.
> 
> Thanks for that hint; it does indeed.
> 
> >   cgcc is a tiny wrapper, and I believe it's the place where you have to
> > fix that -m64 for sparse. I'll have a deeper look.
> 
> I don't think it's really a bug in the wrapper.
> 
> Here's what I did, using a simplified test file, test2.c:

  [...]

> So the "sparse" command itself behaves differently on amd64 when "-m64" is
> specified than when neither "-m32" nor "-m64" is specified; that seems buggy
> to me.

  I'll try to have a look, I'm not sure when, though thanks to the
workaround I gave you, you should be able to use it for now this way :)

  But IUIC sparse always works in "m32" mode by default, and I still
believe that cgcc is the place where to add the -m64 for 64bits
architectures.

  Sparse is architecture agnostic, that's why there is cgcc to force
some defines that the _glibc_ (not sparse) needs to be preprocessed
properly. But sparse doesn't treats the -D__x86_64__ specifically at
_all_. It's confusing, but sparse isn't a compiler.

-- 
·O·  Pierre Habouzit
··O                                                [EMAIL PROTECTED]
OOO                                                http://www.madism.org

Attachment: pgprLQFMbqw0O.pgp
Description: PGP signature

Reply via email to