Russ Allbery [08/Feb 9:17am -08] wrote: >>From 46654ef0c3135e371246e948e38ce8d161618917 Mon Sep 17 00:00:00 2001 > From: Russ Allbery <[email protected]> > Date: Sun, 8 Feb 2026 09:14:31 -0800 > Subject: [PATCH] Require use of dpkg-buildflags > > Require (at the level of should) packages to get their default > compiler flags from dpkg-buildflags if they use a supported compiler, > but carve out an exception for packages like glibc, or packages that > need special build flags for performance or security such as some > crypto libraries. > > Closes: #1063605 > --- > policy/ch-source.rst | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/policy/ch-source.rst b/policy/ch-source.rst > index a2aa4cc..04a9957 100644 > --- a/policy/ch-source.rst > +++ b/policy/ch-source.rst > @@ -670,6 +670,23 @@ Examples of valid use of the `gain root command`:: > unshift(@cmd, split(' ', $ENV{DEB_GAIN_ROOT_CMD})) if > $ENV{DEB_GAIN_ROOT_CMD}; > system(@cmd) == 0 or die("@cmd failed"); > > +``debian/rules`` and dpkg-buildflags > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +Source packages that invoke a compiler that is supported by > +:command:`dpkg-buildflags` should use that command to obtain the default > +flags to pass to the compiler. See :manpage:`dpkg-buildflags(1)` for more > +information. In many cases, this is handled automatically by the ``dh`` > +tool provided by the debhelper package. > + > +Packages that require special handling of compiler flags may selectively > +override the results of :command:`dpkg-buildflags` or avoid that command > +entirely, but only if the package maintainer is prepared to track future > +changes to the default compiler flags and update the package as necessary. > +This may be necessary for packages such as ``glibc`` that have special > +build considerations, or packages that need specific compiler flags for > +performance or security reasons such as some crypto libraries. > + > .. _s-substvars: > > Variable substitutions: ``debian/substvars``
Seconded. I don't think Bill's valid point about being careful with our flags such that we don't cause problems for compilation done by users means we need to change anything in your proposed wording. -- Sean Whitton
signature.asc
Description: PGP signature

