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

Re: Detecting build architecture



On 2011-01-12 13:34 +0100, Alessandro Ghedini wrote:

> On Wed, Jan 12, 2011 at 01:19:18PM +0100, Andreas Tille wrote:
>> Hi,
>
> Hello,
>
>> I try to build a package which needs information about the architecture
>> 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.

Cheers,
       Sven


Reply to: