summaryrefslogtreecommitdiff
path: root/scripts/Dpkg
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2017-09-18 03:02:58 +0200
committerGuillem Jover <guillem@debian.org>2017-10-13 00:38:11 +0200
commitd917dd74cfb8c78f7a99a7e02d4098866f3f763d (patch)
tree5640cceaaf01a0e59939340123e624d3e7130d5b /scripts/Dpkg
parente59a804d37e129042be326702d6af62fda493f49 (diff)
downloaddpkg-d917dd74cfb8c78f7a99a7e02d4098866f3f763d.tar.gz
dpkg-buildflags: Add support for new future feature area
This new area includes an lfs feature, to be used instead of the getconf(1) interfaces which cannot support cross-building.
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r--scripts/Dpkg/BuildFlags.pm6
-rw-r--r--scripts/Dpkg/Vendor/Debian.pm15
2 files changed, 18 insertions, 3 deletions
diff --git a/scripts/Dpkg/BuildFlags.pm b/scripts/Dpkg/BuildFlags.pm
index b97e5c779..0533b12b5 100644
--- a/scripts/Dpkg/BuildFlags.pm
+++ b/scripts/Dpkg/BuildFlags.pm
@@ -237,7 +237,7 @@ sub set {
Update the boolean state of whether a specific feature within a known
feature area has been enabled. The only currently known feature areas
-are "qa", "sanitize", "hardening" and "reproducible".
+are "future", "qa", "sanitize", "hardening" and "reproducible".
=cut
@@ -409,8 +409,8 @@ sub is_maintainer_modified {
=item $bf->has_features($area)
Returns true if the given area of features is known, and false otherwise.
-The only currently recognized feature areas are "qa", "sanitize", "hardening"
-and "reproducible".
+The only currently recognized feature areas are "future", "qa", "sanitize",
+"hardening" and "reproducible".
=cut
diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm
index 4b5436ee1..e0fd01113 100644
--- a/scripts/Dpkg/Vendor/Debian.pm
+++ b/scripts/Dpkg/Vendor/Debian.pm
@@ -103,6 +103,9 @@ sub _add_build_flags {
# Default feature states.
my %use_feature = (
+ future => {
+ lfs => 0,
+ },
qa => {
bug => 0,
canary => 0,
@@ -153,6 +156,18 @@ sub _add_build_flags {
($abi, $os, $cpu) = ('', '', '');
}
+ ## Area: future
+
+ if ($use_feature{future}{lfs}) {
+ my ($abi_bits, $abi_endian) = Dpkg::Arch::debarch_to_abiattrs($arch);
+ my $cpu_bits = Dpkg::Arch::debarch_to_cpubits($arch);
+
+ if ($abi_bits == 32 and $cpu_bits == 32) {
+ $flags->append('CPPFLAGS',
+ '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64');
+ }
+ }
+
## Area: qa
# Warnings that detect actual bugs.