diff options
author | Paul Wise <pabs@debian.org> | 2014-09-27 05:07:44 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2014-10-06 00:40:43 +0200 |
commit | 8ac9b317f6fabdaf6c8fb723fe7063bb9f5414b5 (patch) | |
tree | ba8a5077cb857ba30b26be155485c8118b841b0d /scripts | |
parent | 24ce14e24fd53887efcff43b66eaaf7ad1de7be4 (diff) | |
download | dpkg-8ac9b317f6fabdaf6c8fb723fe7063bb9f5414b5.tar.gz |
Dpkg::Vendor::Debian: Add a timeless feature in the reproducible area
This will add approproriate options to warn about __TIME__, __DATE__ and
__TIMESTAMP__ macros.
Closes: #762683
Signed-off-by: Guillem Jover <guillem@debian.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Dpkg/Vendor/Debian.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm index 0dbc19eb8..cbe939cc1 100644 --- a/scripts/Dpkg/Vendor/Debian.pm +++ b/scripts/Dpkg/Vendor/Debian.pm @@ -151,11 +151,17 @@ sub _add_reproducible_flags { # Default feature states. my %use_feature = ( + timeless => 0, ); # Adjust features based on user or maintainer's desires. $self->_parse_feature_area('reproducible', \%use_feature); + # Warn when the __TIME__, __DATE__ and __TIMESTAMP__ macros are used. + if ($use_feature{timeless}) { + $flags->append('CPPFLAGS', '-Wdate-time'); + } + # Store the feature usage. while (my ($feature, $enabled) = each %use_feature) { $flags->set_feature('reproducible', $feature, $enabled); |