Package: debhelper Version: 13.10.1 Severity: wishlist X-Debbugs-Cc: debian-cr...@lists.debian.org
Hi Niels and d-cross@l.d.o, I've recently created a small dh buildsystems for the "puredata" ecosystem (see the 'dh-puredata' package). the buildsystem is a very thin wrapper over the ordinary makefile buildsystem, invoking 'make' with some custom variables (that are standardized in the ecosystem). Now that I've uploaded the first package that uses the new 'dh-sequence-pd-lib-builder', i discovered that cross-building does not work at all (instead, packages that are supposed to cross-build just use the native toolchain). After investigating a bit, i found that this is kind-of intentional, as the 'makefile' buildsystem explicitely does not do anything with respect to cross-building if it is not called explicitely (but instead, as the base for another buildsystem). See <https://salsa.debian.org/debian/debhelper/-/blob/debian/13.10.1/lib/Debian/Debhelper/Buildsystem/makefile.pm#L147-160> One workaround for the problem is to simply duplicate these lines in any derived buildsystem, but that is of course not very DRY (and therefore I'd like to avoid this). Raising the issue on #debian-devel, helmut explained that the current behaviour is to not interfere with makefile-generating buildsystems (e.g. autoconf, cmake) when it comes to cross-compiling. One possible solution to the problem would be to be able to differentiate between these two classes of buildsystems and pass cross-tools to non-makefile-generating derivatives. helmut suggested to check whether the buildsystem does something to 'dh_auto_configure' as a basis for this discrimination. It should be noted that this might be a good discriminator only, if only the buildsystem's changes to 'dh_auto_configure' were taken into account (as opposed to the user specifying 'override-dh_auto_configure' or the like). IOhannes PS: helmut will hopefully correct me, if i borked things while rephrasing them