Package: dpkg-dev Version: 1.16.10 Severity: normal Dear Maintainer,
I work on an i386 package which I build on an amd64 host. To do so I use CC='gcc -m32' which produces binaries of the right type. Yet dpkg-architecture gives me the following warning: dpkg-architecture: warning: specified GNU system type i486-linux-gnu does not match gcc system type x86_64-linux-gnu, try setting a correct CC environment variable As far as I can tell this comes from the following line in get_gcc_host_gnu_type() of /usr/share/perl5/Dpkg/Arch.pm: my $gcc_host_gnu_type = `\${CC:-gcc} -dumpmachine`; My understanding is that '-dumpmachine' always prints the compiler's default target machine. Indeed: $ gcc -dumpmachine x86_64-linux-gnu $ gcc -m32 -dumpmachine x86_64-linux-gnu That's even probably the appropriate result for get_gcc_host_gnu_type(). However I don't think that's what dpkg-architecture should be comparing to the package's target architecture, particularly not when suggesting to fix $CC. I think checking the value of '$CC -print-multiarch' would be more appropriate: $ gcc -print-multiarch x86_64-linux-gnu $ gcc -m32 -print-multiarch i386-linux-gnu That will leave the issue of i386 vs. i486 which should not cause a warning if I read bug #302033 correctly. #302033 dpkg-architecture: Specified GNU system type i386-linux does not match gcc system type i486-linux-gnu http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=302033 I have uploaded a test package there: http://fgouget.free.fr/bugs/testarch_1.0-1.tar.gz -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (990, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages dpkg-dev depends on: ii base-files 7.2 ii binutils 2.22-8 ii bzip2 1.0.6-4 ii libdpkg-perl 1.16.10 ii make 3.81-8.2 ii patch 2.6.1-3 ii xz-utils 5.1.1alpha+20120614-2 Versions of packages dpkg-dev recommends: ii build-essential 11.6 ii fakeroot 1.18.4-2 ii gcc [c-compiler] 4:4.7.2-1 ii gcc-4.6 [c-compiler] 4.6.4-2 ii gcc-4.7 [c-compiler] 4.7.3-4 ii gnupg 1.4.12-7 ii gpgv 1.4.12-7 ii libalgorithm-merge-perl 0.08-2 Versions of packages dpkg-dev suggests: ii debian-keyring 2013.04.21 -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org