Skip to content

Commit ccee14a

Browse files
committed
Make builds deterministic
- Remove use of __DATE__ and __TIME__, it was dead code anyway - Set ar to deterministic mode This allows consecutive rebuilds to produce identical binaries.
1 parent 1caaceb commit ccee14a

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ export LIBOGC_MINOR := 1
2626
export LIBOGC_PATCH := 0
2727

2828
include $(DEVKITPPC)/base_rules
29+
export AR := $(AR) -D
2930

3031
BUILD := build
3132

32-
DATESTRING := $(shell date +%Y%m%d)
3333
VERSTRING := $(LIBOGC_MAJOR).$(LIBOGC_MINOR).$(LIBOGC_PATCH)
3434

3535
#---------------------------------------------------------------------------------
@@ -226,9 +226,6 @@ gc/ogc/libversion.h : $(CURFILE)
226226
@echo "#define _V_MINOR_ $(LIBOGC_MINOR)" >> $@
227227
@echo "#define _V_PATCH_ $(LIBOGC_PATCH)" >> $@
228228
@echo >> $@
229-
@echo "#define _V_DATE_ __DATE__" >> $@
230-
@echo "#define _V_TIME_ __TIME__" >> $@
231-
@echo >> $@
232229
@echo '#define _V_STRING "libOGC Release '$(LIBOGC_MAJOR).$(LIBOGC_MINOR).$(LIBOGC_PATCH)'"' >> $@
233230
@echo >> $@
234231
@echo "#endif // __OGC_LIBVERSION_H__" >> $@

libogc/system.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ static sys_resetinfo mem_resetinfo = {
237237
127
238238
};
239239

240-
static const char *__sys_versiondate;
241240
static const char *__sys_versionbuild;
242241

243242
static __inline__ alarm_st* __lwp_syswd_open(syswd_t wd)
@@ -1034,7 +1033,7 @@ void* __SYS_GetIPCBufferHi(void)
10341033
#endif
10351034

10361035
void _V_EXPORTNAME(void)
1037-
{ __sys_versionbuild = _V_STRING; __sys_versiondate = _V_DATE_; }
1036+
{ __sys_versionbuild = _V_STRING; }
10381037

10391038
#if defined(HW_RVL)
10401039
void __SYS_DoPowerCB(void)

0 commit comments

Comments
 (0)