1
# DP: This patch was converted from gcc-SOURCE_DATE_EPOCH-doc.diff
2
# DP: Original comment:
4
# DP: Allow embedded timestamps by C/C++ macros to be set externally (docs)
6
--- a/gcc/doc/cppenv.texi
7
+++ b/gcc/doc/cppenv.texi
10
@xref{Preprocessor Options}.
13
+@item SOURCE_DATE_EPOCH
15
+If this variable is set, its value specifies a UNIX timestamp to be
16
+used in replacement of the current date and time in the @code{__DATE__}
17
+and @code{__TIME__} macros, so that the embedded timestamps become
20
+The value of @env{SOURCE_DATE_EPOCH} must be a UNIX timestamp,
21
+defined as the number of seconds (excluding leap seconds) since
22
+01 Jan 1970 00:00:00 represented in ASCII, identical to the output of
23
+@samp{@command{date +%s}}.
25
+The value should be a known timestamp such as the last modification
26
+time of the source or package and it should be set by the build