Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

q3rcc: Allow to override build date #414

Merged
merged 1 commit into from Jul 11, 2019
Merged

Conversation

bmwiedemann
Copy link

@bmwiedemann bmwiedemann commented Jul 11, 2019

Allow to override __DATE__ and __TIME__ with SOURCE_DATE_EPOCH
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

This behavior is what gcc already does.

Without this patch, qagame.qvm would differ between builds.

This PR was done while working on reproducible builds for openSUSE.

@ensiform
Copy link

strtoll is c99 required. I believe lcc is intended as ANSI only?

@bmwiedemann
Copy link
Author

strtol would also work (except after 2038 on 32bit OSes). Is that ANSI C?

Allow to override __DATE__ and __TIME__ with SOURCE_DATE_EPOCH
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

This behavior is what gcc already does.
@bmwiedemann
Copy link
Author

Updated it to use strtol (already in use in other parts of lcc)

@timangus timangus merged commit a96f32e into ioquake:master Jul 11, 2019
@bmwiedemann bmwiedemann deleted the date branch July 11, 2019 15:30
@ensiform
Copy link

Almost all Q3 mods will have problems with date/time after 2038 as it is. Because it only allows 32-bit time in the VM interface. (trap_GetTime qtime_t)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants