Re: Detecting build architecture
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.