[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Detecting build architecture



On Thu, Jan 13, 2011 at 09:53:38AM +0100, Sven Joachim wrote:
> On 2011-01-13 09:38 +0100, Andreas Tille wrote:
> 
> > On Wed, Jan 12, 2011 at 01:39:05PM +0100, Sven Joachim wrote:
> >> >> at compile time.  Upstream said I need to set ARCH_64=1 if the
> >> >> architecture has 64 bit *pointers* (they said on architectures with 64
> >                              ^^^^^^^^^^
> >> >> bit integers and 32 bit pointers the programm needs to be compiled as 32
> >                              ^^^^^^^^
> >> >> bit).  Is there any safe way to obtain this information automatically or
> >> >> do I need to do some lookup in a table with `dpkg --print-architecture`
> >> >> as key (and if yes how would this table look like in the sense above)?
> >> >
> >> > See dpkg-architecture(1), in particular:
> >> >
> >> >     $ dpkg-architecture -qDEB_BUILD_ARCH_BITS
> >> 
> >> Not quite, DEB_HOST_ARCH_BITS is what you need.  See also the thread
> >> starting at http://lists.debian.org/debian-mentors/2009/09/msg00177.html.
> >
> > I remember the answers which were given in the thread I started. But
> > this variable returns the BITS (at least this is the name of it) and I
> > need information about POINTERS. 
> 
> DEB_HOST_ARCH_BITS *is* the pointer size.

I think Andreas is asking whether his packages would ever be built on
an architecture with differing sizes for integers and pointers; history has
known about I32 LP64, IL32 P64, IP32 L64 and other similar perversions :)
I'm just saying that to make sure that Andreas understands that people who
are replying to his message are aware of the possible size mismatch between
pointers and integers.

And, just as Sven Joachim says, Andreas, take a look at the dpkg-architecture
manual page, the documentation of the DEB_BUILD_ARCH_BITS variable explicitly
mentions the word "pointers" - so this is exactly what you need :)

G'luck,
Peter

-- 
Peter Pentchev	roam@ringlet.net     roam@FreeBSD.org      roam@cpan.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
I am not the subject of this sentence.

Attachment: signature.asc
Description: Digital signature


Reply to: