Bug#1133272: dpkg-buildflags: please include LFS_CFLAGS and LFS_LDFLAGS

Martin-Éric Racine <[email protected]> Sat, 11 Apr 2026 13:46:06 +0300
Newsgroups gmane.linux.debian.devel.dpkg.bugs
Message-ID <177590436620.205305.15366878786048959468.reportbug__22486.5419951797$1775904570$gmane$org@p8b75.internal>
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.

Thanks!
Martin-Éric

-- System Information:
Debian Release: forky/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.74+deb13+1-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8), LANGUAGE=fi:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dpkg-dev depends on:
ii  binutils      2.46-3
ii  bzip2         1.0.8-6+b1
ii  libdpkg-perl  1.23.7
ii  make          4.4.1-3
ii  patch         2.8-2
ii  perl          5.40.1-7+b1
ii  tar           1.35+dfsg-4
ii  xz-utils      5.8.3-1

Versions of packages dpkg-dev recommends:
ii  build-essential          12.12
ii  fakeroot                 1.37.2-1
ii  gcc [c-compiler]         4:15.2.0-5
ii  gcc-15 [c-compiler]      15.2.0-16
ii  gnupg                    2.4.9-4
ii  gosop [sopv]             1.1.0-3+b2
ii  gpgv                     2.4.9-4
ii  libalgorithm-merge-perl  0.08-5
ii  sqv                      1.3.0-5

Versions of packages dpkg-dev suggests:
ii  debian-keyring             2026.03.25
ii  debian-tag2upload-keyring  1.2

-- no debconf information