This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=73ff957bb512a2fd0a1cdd714ebe6d5c82f1b596 commit 73ff957bb512a2fd0a1cdd714ebe6d5c82f1b596 Author: Guillem Jover <[email protected]> AuthorDate: Wed Jul 1 18:24:13 2020 +0200 data: Prefix the specs file spec string self_spec with + instead of * Using * as a prefix for the spec entry makes it override any previous setting. This is problematic when we pass two or more -specs options to the compiler (f.ex. to link and compile on the same run), as then only the last one will take effect, breaking the builds. Closes: #870383 Ref: https://dev.gnupg.org/T4982 Prompted-by: NIIBE Yutaka <[email protected]> Tested-by: Daniel Kahn Gillmor <[email protected]> --- data/no-pie-compile.specs | 2 +- data/no-pie-link.specs | 2 +- data/pie-compile.specs | 2 +- data/pie-link.specs | 2 +- debian/changelog | 5 +++++ 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/data/no-pie-compile.specs b/data/no-pie-compile.specs index 2277b97ef..70cb36095 100644 --- a/data/no-pie-compile.specs +++ b/data/no-pie-compile.specs @@ -1,2 +1,2 @@ -*self_spec: ++self_spec: + %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fno-PIE}}}}}} diff --git a/data/no-pie-link.specs b/data/no-pie-link.specs index 54db649b1..fa4162793 100644 --- a/data/no-pie-link.specs +++ b/data/no-pie-link.specs @@ -1,2 +1,2 @@ -*self_spec: ++self_spec: + %{!shared:%{!r:%{!fPIE:%{!pie:-fno-PIE -no-pie}}}} diff --git a/data/pie-compile.specs b/data/pie-compile.specs index 74d82155c..c1ee08c71 100644 --- a/data/pie-compile.specs +++ b/data/pie-compile.specs @@ -1,2 +1,2 @@ -*self_spec: ++self_spec: + %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:%{!fno-PIE:%{!no-pie:-fPIE}}}}}}}} diff --git a/data/pie-link.specs b/data/pie-link.specs index 94c122fd3..9b401e34a 100644 --- a/data/pie-link.specs +++ b/data/pie-link.specs @@ -1,2 +1,2 @@ -*self_spec: ++self_spec: + %{!static:%{!shared:%{!r:%{!fno-PIE:%{!no-pie:-fPIE -pie}}}}} diff --git a/debian/changelog b/debian/changelog index 57f14010f..b3c90561c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,11 @@ dpkg (1.20.4) UNRELEASED; urgency=medium [ Guillem Jover ] + * Improve PIE flags support: + - Prefix the specs file spec string self_spec with + instead of *. + This way we do not override any previous setting, otherwise when + passing the -specs options twice (f.ex. to compile and link), only the + last one will take effect, which can break the build. Closes: #870383 * Perl modules: - Dpkg::Source::Package: Explicitly initialize constructor options to their implicit values, otherwise other code end up assuming different -- Dpkg.Org's dpkg

