The goal of reproducible builds is that a rebuild of the same source
code with the same compiler, libraries, etc. should result in the same
binaries. SOURCE_DATE_EPOCH provides a standard way for build systems
to fill in the date of the latest source change, typically from a git
commit or from metadata like the debian/changelog in Debian packages.
This does not change anything if SOURCE_DATE_EPOCH is not defined;
the intention is that a larger build system like a Debian package
will define it.
Please see https://reproducible-builds.org/ for more information about
reproducible builds.
Originally sent to ioquake3 as commit
9c76b546e3
(which also touched engine files not present here).
Signed-off-by: Simon McVittie <smcv@debian.org>
GNU platforms (Linux, kFreeBSD, Hurd) have endian.h to determine
endianness, so all architectures except x86_64 are in fact treated
identically, except that their ARCH_STRING is different.
The ARCH_STRING must always be identical to the ARCH from the Makefile,
otherwise the engine will not find its cgame, game and ui plugins
under their expected names and startup will fail. If we pass it in
from the Makefile, then an identical value is guaranteed, and we can
get rid of an increasingly long list of defined(__some_cpu__) tests.
The game-code does not actually use ARCH_STRING, but I've kept it
in order to be consistent with the ioquake3 engine.
On non-Linux platforms we only support a few architectures anyway,
so keeping the list up to date is less of a burden; *BSD porters
could probably use the same technique to get support for lots of
architectures with little effort, but I have not done that here,
because I cannot test it.
Windows must continue to support preprocessor-based architecture tests
in any case, so that the MSVC solutions (which do not use the Makefile)
can continue to work. However, Windows only runs on a few CPU families,
so this shouldn't be a significant burden in practice.
When cross-compiling, the tools are compiled for the build architecture
(COMPILE_PLATFORM, COMPILE_ARCH) rather than the host architecture
(PLATFORM, ARCH), so define ARCH_STRING to COMPILE_ARCH on a GNU
COMPILE_PLATFORM.
Originally sent to ioquake3 as commit
2a71948f21.
Signed-off-by: Simon McVittie <smcv@debian.org>
As with GNU/kFreeBSD, it's treated as "Linux": all three use the GNU libc
and runtime linker, which is mostly what matters for ioquake3.
From Debian, via ioquake3 commit
540e4225cc.
Bug-Debian: http://bugs.debian.org/679330
Reviewed-by: Simon McVittie <smcv@debian.org>
Signed-off-by: Simon McVittie <smcv@debian.org>
GNU/Linux and GNU/kFreeBSD both use the GNU libc and runtime linker,
which is the layer that this engine interacts with directly. The specific
kernel used is below the level that this engine is dealing with.
From Debian, via ioquake3 commit
d2f8b9f4bb.
Commit message added by Simon McVittie.
Bug-Debian: https://bugs.debian.org/413617
Reviewed-by: Simon McVittie <smcv@debian.org>
Signed-off-by: Simon McVittie <smcv@debian.org>
While the !strcmp is common it is too easy for humans to misread it. I have fixed several bugs caused by people that after a long day no longer read "if the two strings do not compare then they must be equal". Q_strequal is a macro so there are no performance progrem, just easier to read code.
Compiling on Mac OS X with x86_64 architecture fails with preprocessing error from code/qcommon/q_platform.h: "Architecture not supported". This change fixes that.
the following changes has been copied (revision numbers from ioquake3):
1939: Fix player queueing for tournament play (#4939)
1972: Fix spawnflag behaviour for trigger_hurt, patch by DevHC
1973: Fix one byte overflow
1981: ensure that ent->classname is always non-null (for entity numbers up to level.num_entities-1, and ENTITYNUM_WORLD and ENTITYNUM_NONE), for player entities and #ENTITYNUM_NONE in particular, patch by DevHC
1983/1984: Make bg_lib.c strchr ANSI-C conformant
1987: strrchr instead of Q_strrchr
2010: Calls to trap_CM_PointContents don't update their origins based on moving entities (water). Patch by Ensiform
2015: Automatically selecting player model in q3_ui does not work if skin is not specified, patch by Zack Middleton
2016: Grappling hook does not load trail shader, patch by Zack Middleton
2036: Clear game logfile handle after closing file.
2047: TA UI forces overstrike mode on when focusing an edit box, by Ensiform (I have not yet verified this in missionpack)
2048: strchr in video
2051
2056
2063
git-svn-id: http://oax.googlecode.com/svn/trunk@257 48ef5666-4144-11de-b6cc-f32266f7ba4a