File: from-debian-gcc-gcc-SOURCE_DATE_EPOCH-doc.diff

package info (click to toggle)
gcc-6-doc 6.3.0-1
  • links: PTS, VCS
  • area: non-free
  • in suites: stretch
  • size: 26,640 kB
  • ctags: 102
  • sloc: perl: 473; python: 291; makefile: 269; cpp: 17
file content (29 lines) | stat: -rw-r--r-- 954 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# DP: This patch was converted from gcc-SOURCE_DATE_EPOCH-doc.diff
# DP: Original comment:
# DP:
# DP: Allow embedded timestamps by C/C++ macros to be set externally (docs)

--- a/gcc/doc/cppenv.texi
+++ b/gcc/doc/cppenv.texi
@@ -79,4 +79,21 @@
 @ifclear cppmanual
 @xref{Preprocessor Options}.
 @end ifclear
+
+@item SOURCE_DATE_EPOCH
+
+If this variable is set, its value specifies a UNIX timestamp to be
+used in replacement of the current date and time in the @code{__DATE__}
+and @code{__TIME__} macros, so that the embedded timestamps become
+reproducible.
+
+The value of @env{SOURCE_DATE_EPOCH} must be a UNIX timestamp,
+defined as the number of seconds (excluding leap seconds) since
+01 Jan 1970 00:00:00 represented in ASCII, identical to the output of
+@samp{@command{date +%s}}.
+
+The value should be a known timestamp such as the last modification
+time of the source or package and it should be set by the build
+process.
+
 @end vtable