Hi!

On Sun, 2012-04-15 at 19:06:53 +0200, Helmut Grohne wrote:
> As a result of the discussion on this bug log I am proposing the
> attached patch to the *table files introducing the x32 architecture.
> Please apply it or comment on it.

> diff -ruN dpkg-1.16.2/cputable dpkg-1.16.3/cputable
> --- dpkg-1.16.2/cputable      2012-03-19 07:40:07.000000000 +0100
> +++ dpkg-1.16.3/cputable      2012-04-15 18:52:27.000000000 +0200
> @@ -38,3 +38,4 @@
>  sh4eb                sh4eb           sh4eb                   32      big
>  sparc                sparc           sparc                   32      big
>  sparc64              sparc64         sparc64                 64      big
> +x32          x32             x32                     32      little

This should not match against anything as it's not the cpuname used in
the Debian triplet.

> diff -ruN dpkg-1.16.2/triplettable dpkg-1.16.3/triplettable
> --- dpkg-1.16.2/triplettable  2012-03-19 07:40:10.000000000 +0100
> +++ dpkg-1.16.3/triplettable  2012-04-15 18:50:49.000000000 +0200
> @@ -9,6 +9,7 @@
>  gnueabi-linux-arm    armel
>  gnuspe-linux-powerpc powerpcspe
>  gnulp-linux-i386     lpia
> +gnux32-linux-x86_64  x32
>  gnu-linux-<cpu>              <cpu>
>  gnu-kfreebsd-<cpu>   kfreebsd-<cpu>
>  gnu-knetbsd-<cpu>    knetbsd-<cpu>

And this should not work as gnux32-linux-x86_64 is not a known Debian
triplet either (the Debian cpuname for x86_64 is amd64).

What I've ended up doing is adding an abitable, with overrides for cpu
attributes, so that for MIPS n32 and AMD64 x32 we can override the
bits to 32. This gives this output:

$ PERL5LIB=`pwd`/scripts DPKG_DATADIR=`pwd` \
  scripts/dpkg-architecture.pl -ax32
dpkg-architecture.pl: warning: specified GNU system type x86_64-linux-gnux32 
does not match gcc system type x86_64-linux-gnu, try setting a correct CC 
environment variable
DEB_BUILD_ARCH=amd64
DEB_BUILD_ARCH_BITS=64
DEB_BUILD_ARCH_CPU=amd64
DEB_BUILD_ARCH_ENDIAN=little
DEB_BUILD_ARCH_OS=linux
DEB_BUILD_GNU_CPU=x86_64
DEB_BUILD_GNU_SYSTEM=linux-gnu
DEB_BUILD_GNU_TYPE=x86_64-linux-gnu
DEB_BUILD_MULTIARCH=x86_64-linux-gnu
DEB_HOST_ARCH=x32
DEB_HOST_ARCH_BITS=32
DEB_HOST_ARCH_CPU=amd64
DEB_HOST_ARCH_ENDIAN=little
DEB_HOST_ARCH_OS=linux
DEB_HOST_GNU_CPU=x86_64
DEB_HOST_GNU_SYSTEM=linux-gnux32
DEB_HOST_GNU_TYPE=x86_64-linux-gnux32
DEB_HOST_MULTIARCH=x86_64-linux-gnux32

if that looks ok, then I'll include this on my next push targetting
1.16.3. Something to consider is if it's useful to expose the
difference between cpu and abi bits, but that can always be exposed
later on.

thanks,
guillem



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to