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

Conversation

@bmwiedemann
Copy link

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

This comment has been minimized.

Copy link

commented Jul 11, 2019

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

@bmwiedemann

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

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

q3rcc: Allow to override build date
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 bmwiedemann force-pushed the bmwiedemann:date branch from d1e17e5 to ceca60c Jul 11, 2019

@bmwiedemann

This comment has been minimized.

Copy link
Author

commented Jul 11, 2019

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

@timangus timangus merged commit a96f32e into ioquake:master Jul 11, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bmwiedemann bmwiedemann deleted the bmwiedemann:date branch Jul 11, 2019

@ensiform

This comment has been minimized.

Copy link

commented Jul 12, 2019

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
Projects
None yet
3 participants
You can’t perform that action at this time.