Bug#1133272: dpkg-buildflags: please include LFS_CFLAGS and LFS_LDFLAGS
Guillem Jover <[email protected]> Sat, 11 Apr 2026 13:03:09 +0200
| Newsgroups | gmane.linux.debian.devel.dpkg.bugs |
|---|---|
| Message-ID | <adoqbcGrimnPi0D2__46541.4452877425$1775905525$gmane$org@thunder.hadrons.org> |
Hi! On Sat, 2026-04-11 at 13:46:06 +0300, Martin-Éric Racine wrote: > Package: dpkg-dev > Version: 1.23.7 > Severity: important > X-Debbugs-Cc: [email protected] > In my packages, I currently have to manually include the following in > debian/rules: > export DEB_CFLAGS_MAINT_APPEND +=$(shell getconf LFS_CFLAGS) $(HARDENING_CFLAGS) > export DEB_LDFLAGS_MAINT_APPEND +=$(shell getconf LFS_LDFLAGS) $(HARDENING_LDFLAGS) > > It would be nice if dpkg-buildflags provided these for us. The getconf interface is problematic as it does not correctly support cross-building. I clarified this in the lintian tag for the LFS support with: https://salsa.debian.org/lintian/lintian/-/commit/ba9c7fd96801e3c796d0233b4f7432e55dffe057 but now that the lintian LFS tag has been removed, that got lost. In any case, dpkg-buildflags already supports setting LFS flags with: export DEB_BUILD_MAINT_OPTIONS = abi=+lfs which should support cross-building correctly. I was going to close this report as invalid, but I guess I can instead document that the getconf interface should not be used in the dpkg-buildflags man page (although I'm not sure it would have helped here, as I assume the man page was not checked?). Thanks, Guillem