Your message dated Sat, 01 Oct 2016 22:27:37 +0000
with message-id <e1bqskr-0002u4...@franck.debian.org>
and subject line Bug#836988: fixed in debhelper 10.1
has caused the Debian Bug report #836988,
regarding dh_auto_build: makefile build system: handle cross compilation
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
836988: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836988
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: debhelper
Version: 9.20160814
Severity: wishlist
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap
Control: affects -1 + src:cjet

Hi Niels et al,

During my journey on cross compiling more packages I encountered cjet.
Its debian/rules file currently is the text book example containing
nothing more than the default "%:\n\tdh $@\n" rule. I couldn't take away
its pristine beauty and figured that debhelper should just work here.

The issue here is that for the makefile build system, no cross compilers
are passed to make. The solution is to have dh_auto_build figure that we
are cross compiling and pass CC and CXX with suitable values to make.
Given that quite some Makefiles provide defaults, I opted for passing
them as command line arguments overriding simple assignments.

The difficulty now is that we only want to pass them for simple Makefile
packages. In particular, the autoconf and cmake build systems handle
cross compilation quite well already. I first tried to rename the
makefile build system into a makefile_base class and have makefile
derive it.  Unfortunately, that causes cmake packages to be detected as
makefile packages, because cmake no longer inherits from makefile (see
comment in autoselect_buildsystem). Thus we cannot change the class
hierarchy of build systems and I opted for disabling that functionality
via a constant in child classes.

This may not be the best solution, but it doesn't break cmake and it
makes cjet cross build just fine. So the patch should at least serve as
a basis for further discussion. What do you think?

Helmut
diff --minimal -Nru 
debhelper-9.20160814/Debian/Debhelper/Buildsystem/autoconf.pm 
debhelper-9.20160814+nmu1/Debian/Debhelper/Buildsystem/autoconf.pm
--- debhelper-9.20160814/Debian/Debhelper/Buildsystem/autoconf.pm       
2016-06-10 19:44:02.000000000 +0200
+++ debhelper-9.20160814+nmu1/Debian/Debhelper/Buildsystem/autoconf.pm  
2016-09-07 22:06:06.000000000 +0200
@@ -11,6 +11,8 @@
 use Debian::Debhelper::Dh_Lib qw(dpkg_architecture_value sourcepackage compat);
 use parent qw(Debian::Debhelper::Buildsystem::makefile);
 
+use constant DEB_CROSS_TOOLS => 0;
+
 sub DESCRIPTION {
        "GNU Autoconf (configure)"
 }
diff --minimal -Nru debhelper-9.20160814/Debian/Debhelper/Buildsystem/cmake.pm 
debhelper-9.20160814+nmu1/Debian/Debhelper/Buildsystem/cmake.pm
--- debhelper-9.20160814/Debian/Debhelper/Buildsystem/cmake.pm  2016-06-10 
19:44:02.000000000 +0200
+++ debhelper-9.20160814+nmu1/Debian/Debhelper/Buildsystem/cmake.pm     
2016-09-07 22:06:13.000000000 +0200
@@ -11,6 +11,8 @@
 use Debian::Debhelper::Dh_Lib qw(compat dpkg_architecture_value error 
is_cross_compiling);
 use parent qw(Debian::Debhelper::Buildsystem::makefile);
 
+use constant DEB_CROSS_TOOLS => 0;
+
 my @STANDARD_CMAKE_FLAGS = qw(
   -DCMAKE_INSTALL_PREFIX=/usr
   -DCMAKE_VERBOSE_MAKEFILE=ON
diff --minimal -Nru 
debhelper-9.20160814/Debian/Debhelper/Buildsystem/makefile.pm 
debhelper-9.20160814+nmu1/Debian/Debhelper/Buildsystem/makefile.pm
--- debhelper-9.20160814/Debian/Debhelper/Buildsystem/makefile.pm       
2015-07-01 19:17:30.000000000 +0200
+++ debhelper-9.20160814+nmu1/Debian/Debhelper/Buildsystem/makefile.pm  
2016-09-07 22:05:37.000000000 +0200
@@ -8,9 +8,16 @@
 
 use strict;
 use warnings;
-use Debian::Debhelper::Dh_Lib qw(escape_shell clean_jobserver_makeflags);
+use Debian::Debhelper::Dh_Lib qw(dpkg_architecture_value escape_shell 
clean_jobserver_makeflags is_cross_compiling);
 use parent qw(Debian::Debhelper::Buildsystem);
 
+my %DEB_DEFAULT_TOOLS = (
+       'CC'    => 'gcc',
+       'CXX'   => 'g++',
+);
+
+use constant DEB_CROSS_TOOLS => 1;
+
 # make makes things difficult by not providing a simple way to test
 # whether a Makefile target exists. Using -n and checking for a nonzero
 # exit status is not good enough, because even with -n, make will
@@ -127,6 +134,15 @@
 
 sub build {
        my $this=shift;
+       if (ref($this)->DEB_CROSS_TOOLS and is_cross_compiling()) {
+               while (my ($var, $tool) = each %DEB_DEFAULT_TOOLS) {
+                       if ($ENV{$var}) {
+                               unshift @_, $var . "=" . $ENV{$var};
+                       } else {
+                               unshift @_, $var . "=" . 
dpkg_architecture_value("DEB_HOST_GNU_TYPE") . "-" . $tool;
+                       }
+               }
+       }
        $this->do_make(@_);
 }
 
diff --minimal -Nru 
debhelper-9.20160814/Debian/Debhelper/Buildsystem/perl_makemaker.pm 
debhelper-9.20160814+nmu1/Debian/Debhelper/Buildsystem/perl_makemaker.pm
--- debhelper-9.20160814/Debian/Debhelper/Buildsystem/perl_makemaker.pm 
2016-07-31 20:23:50.000000000 +0200
+++ debhelper-9.20160814+nmu1/Debian/Debhelper/Buildsystem/perl_makemaker.pm    
2016-09-07 22:06:23.000000000 +0200
@@ -12,6 +12,8 @@
 use parent qw(Debian::Debhelper::Buildsystem::makefile);
 use Config;
 
+use constant DEB_CROSS_TOOLS => 0;
+
 sub DESCRIPTION {
        "Perl ExtUtils::MakeMaker (Makefile.PL)"
 }
diff --minimal -Nru debhelper-9.20160814/Debian/Debhelper/Buildsystem/qmake.pm 
debhelper-9.20160814+nmu1/Debian/Debhelper/Buildsystem/qmake.pm
--- debhelper-9.20160814/Debian/Debhelper/Buildsystem/qmake.pm  2016-06-10 
19:44:02.000000000 +0200
+++ debhelper-9.20160814+nmu1/Debian/Debhelper/Buildsystem/qmake.pm     
2016-09-07 22:06:31.000000000 +0200
@@ -11,6 +11,8 @@
 use Debian::Debhelper::Dh_Lib qw(error);
 use parent qw(Debian::Debhelper::Buildsystem::makefile);
 
+use constant DEB_CROSS_TOOLS => 0;
+
 our $qmake="qmake";
 
 sub DESCRIPTION {
diff --minimal -Nru debhelper-9.20160814/debian/changelog 
debhelper-9.20160814+nmu1/debian/changelog
--- debhelper-9.20160814/debian/changelog       2016-08-14 11:19:35.000000000 
+0200
+++ debhelper-9.20160814+nmu1/debian/changelog  2016-09-07 21:35:01.000000000 
+0200
@@ -1,3 +1,11 @@
+debhelper (9.20160814+nmu1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * makefile buildsystem: Pass triplet-prefixed tools to make.
+    (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 07 Sep 2016 21:34:37 +0200
+
 debhelper (9.20160814) unstable; urgency=medium
 
   * dh_installdocs: Apply patch from Sven Joachim to make

--- End Message ---
--- Begin Message ---
Source: debhelper
Source-Version: 10.1

We believe that the bug you reported is fixed in the latest version of
debhelper, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 836...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niels Thykier <ni...@thykier.net> (supplier of updated debhelper package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 01 Oct 2016 20:45:27 +0000
Source: debhelper
Binary: debhelper dh-systemd
Architecture: source all
Version: 10.1
Distribution: unstable
Urgency: medium
Maintainer: Debhelper Maintainers <debhelper-de...@lists.alioth.debian.org>
Changed-By: Niels Thykier <ni...@thykier.net>
Description:
 debhelper  - helper programs for debian/rules
 dh-systemd - debhelper add-on to handle systemd unit files - transitional pack
Closes: 833789 836988 837585 838446 839389
Changes:
 debhelper (10.1) unstable; urgency=medium
 .
   * Apply patch from Michael Biebl to take over dh-systemd
     package to ease backporting to jessie-backports.
     (Closes: #837585)
   * Apply patch from Helmut Grohne and Julian Andres Klode
     to improve cross-building support in the cmake build
     system.  (Closes: #833789)
   * Make the makefile.pm buildsystem (but not subclasses thereof)
     pass the CC and CXX variables set to the host compilers when
     cross-building.  Thanks to Helmut Grohne for the idea and
     the initial patch.  (Closes: #836988)
   * dh_md5sums.1: Mention dpkg --verify as a consumer of the
     output file.  Thanks to Guillem Jover for reporting it.
   * debhelper-obsolete-compat.pod: Add a manpage for the
     upgrade checklist for all obsolete/removed compat levels.
     Thanks to Jakub Wilk for the suggestion.
   * Dh_Getopt,dh_*: Rename --onlyscripts to --only-scripts and
     --noscripts to --no-scripts for consistency with other
     options.  The old variants are accepted for compatibility.
     Thanks to Raphaƫl Hertzog for the suggestion.
     (Closes: #838446)
   * cmake.pm: If cmake fails, also down CMakeFiles/CMakeOutput.log
     and CMakeFiles/CMakeError.log if they are present.  Thanks to
     Michael Banck for the suggestion.  (Closes: #839389)
   * d/copyright: Correct copyright and license of dh_systemd*
     tools.
Checksums-Sha1:
 1422d81ff86bfc84d2b258fc92f0119a35999f31 1693 debhelper_10.1.dsc
 a88bacb82cbd304d745f247ce5cddd31ee14e3c5 353208 debhelper_10.1.tar.xz
 c7d04aeaa982ae012fb5e083c43b794d787a3faa 741570 debhelper_10.1_all.deb
 480b0b2ccd3ef82395d06771396e7ab47aaea0e2 98596 dh-systemd_10.1_all.deb
Checksums-Sha256:
 6e9989094d188878c635c6932f9b25e52486431512f4b634c136fcae923bff60 1693 
debhelper_10.1.dsc
 8f6bd9dac7070c0629178aaa6343cd1656a8cbdb8000ada021607f14d3497b09 353208 
debhelper_10.1.tar.xz
 6f058925424866b08624ded67bac9b0d86af1ba2946d71f665f80c9aa0c2fbb7 741570 
debhelper_10.1_all.deb
 5b60d93a2c8496ae51b443b22bf55031b6f798e09b0c1f53de0b70d10c38c59c 98596 
dh-systemd_10.1_all.deb
Files:
 2a0a577feab356ed094066ae0cce6b21 1693 devel optional debhelper_10.1.dsc
 b4201c16a8cd7da87f9a4082cb3e4139 353208 devel optional debhelper_10.1.tar.xz
 fcbf5222934eec3cb9a07140dec9c784 741570 devel optional debhelper_10.1_all.deb
 f1adb682b31e7ba750aac5cb7eff1e24 98596 oldlibs extra dh-systemd_10.1_all.deb

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJX8CDwAAoJEAVLu599gGRC2iIP/AkUCXOJ381AanvqAs31N+Ae
K1BUctg2hpgQQrrz3K7qtyiJVl+UtOKFtl7LKC3gnHKy+n+uQTCPOiL2smil5dF0
HIl92COM5nlgZWmw6sOjt2/pHL/RfxjHUpYecwZN48XOQUNpLDtCeW4UFM2JeX/3
SN4hBSddFgRAxCoj7lia7Ix+UXFhsBV5CTLu7Qn6Uxo+SBsYiTI2ZJfw7Fijcc+q
ZB4VGbe5LuuRb6VdGnVAVSCOMvXuGCqOY3LrPDGK5cebsH+e19Gu5RmOSukjoGTg
ycaL+UTjvtAaJe+m9DEK6oyQcE+Al6o09VszVJBGfXyhdfZx1eB8z8G6nsjOwI85
QunYJflpCa2L90n9ihQ2HTUcF5PsTHjOskKHxI6Hwpe7aq5P06DZzcwJrwrHIx/9
OvVoMFaefQq+m1zS092YcvamcBeAoh+hyl9m4ENmSPzkVSpWlx1kMvrCZsfwKgq1
1l7WprKWYfOpVi52l4QLfqCMpgXpbNWlaRyxvniDBJUOOu9yLJu613jA6JflIJvW
qrnDAwPfKnvNoqEV8pGhLYP5ypFWb8AYADqK18muygsmG1dXb9sYsIKZYpeQjeQx
supGFctHRLS5A70QYE/6AYf4+rfsufxh2oasF1XtNmmEp1dsYqTssP+qIHJQpS7I
IyXBwh3mSbQWU8huuwYm
=rS0c
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to