aboutsummaryrefslogtreecommitdiff
path: root/bpkg/system-package-manager-debian.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/system-package-manager-debian.cxx')
-rw-r--r--bpkg/system-package-manager-debian.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/bpkg/system-package-manager-debian.cxx b/bpkg/system-package-manager-debian.cxx
index 9350a13..3037730 100644
--- a/bpkg/system-package-manager-debian.cxx
+++ b/bpkg/system-package-manager-debian.cxx
@@ -2708,9 +2708,24 @@ namespace bpkg
// example, they also cover Assembler, Fortran, and potentially others
// in the future).
//
+ string mo; // Include leading space if not empty.
+ if (ops_->debian_maint_option_specified ())
+ {
+ for (const string& o: ops_->debian_maint_option ())
+ {
+ if (!o.empty ())
+ {
+ mo += ' ';
+ mo += o;
+ }
+ }
+ }
+ else
+ mo = " hardening=+all";
+
os << "# *FLAGS (CFLAGS, CXXFLAGS, etc)" << '\n'
<< "#" << '\n'
- << "export DEB_BUILD_MAINT_OPTIONS := hardening=+all" << '\n'
+ << "export DEB_BUILD_MAINT_OPTIONS :=" << mo << '\n'
<< "include /usr/share/dpkg/buildflags.mk" << '\n'
<< '\n';