diff options
author | doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-28 09:12:05 +0000 |
---|---|---|
committer | doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-28 09:12:05 +0000 |
commit | e3e8c48c4a494d9da741c1c8ea6c4c0b7c4ff934 (patch) | |
tree | a72db5c4b6147a63f588b215e341061ba7b18de5 /libcpp/include | |
parent | f0307fcb54df45f94a262c3ce5af1cb97b0b4a6d (diff) | |
download | gcc-e3e8c48c4a494d9da741c1c8ea6c4c0b7c4ff934.tar.gz |
gcc/c-family/ChangeLog:
2016-04-28 Eduard Sanou <dhole@openmailbox.org>
Matthias Klose <doko@debian.org>
* c-common.c (get_source_date_epoch): New function, gets the environment
variable SOURCE_DATE_EPOCH and parses it as long long with error
handling.
* c-common.h (get_source_date_epoch): Prototype.
* c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
gcc/ChangeLog:
2016-04-28 Eduard Sanou <dhole@openmailbox.org>
Matthias Klose <doko@debian.org>
* doc/cppenv.texi: Document SOURCE_DATE_EPOCH environment variable.
libcpp/ChangeLog:
2016-04-28 Eduard Sanou <dhole@openmailbox.org>
Matthias Klose <doko@debian.org>
* include/cpplib.h (cpp_init_source_date_epoch): Prototype.
* init.c (cpp_init_source_date_epoch): New function.
* internal.h: Added source_date_epoch variable to struct
cpp_reader to store a reproducible date.
* macro.c (_cpp_builtin_macro_text): Set pfile->date timestamp from
pfile->source_date_epoch instead of localtime if source_date_epoch is
set, to be used for __DATE__ and __TIME__ macros to help reproducible
builds.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235550 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/include')
-rw-r--r-- | libcpp/include/cpplib.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index 35b0375c09c..4998b3a8ab8 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -784,6 +784,9 @@ extern void cpp_init_special_builtins (cpp_reader *); /* Set up built-ins like __FILE__. */ extern void cpp_init_builtins (cpp_reader *, int); +/* Initialize the source_date_epoch value. */ +extern void cpp_init_source_date_epoch (cpp_reader *, time_t); + /* This is called after options have been parsed, and partially processed. */ extern void cpp_post_options (cpp_reader *); |