| 1 |
From: Simon McVittie <[email protected]> |
| 2 |
Date: Sat, 24 Jun 2017 19:08:38 +0100 |
| 3 |
Subject: build: canonicalize all ARM variants to "arm", matching q_platform.h |
| 4 |
|
| 5 |
The ARCH in the Makefile must match the ARCH_STRING in q_platform.h; |
| 6 |
otherwise, ioquake3 will install (for instance) uiARCH.so but look for |
| 7 |
uiARCH_STRING.so, which isn't going to go well (particularly for |
| 8 |
the modular renderer). |
| 9 |
|
| 10 |
Like i386, but unlike most (all?) other Linux platforms, uname -m on |
| 11 |
32-bit ARM machines can have various results starting with "arm", |
| 12 |
depending on the specific CPU version (e.g. Raspberry Pi is armv6l, |
| 13 |
RPi2 is armv7l). Again similar to the x86 family, |
| 14 |
it's appropriate for them to share an architecture suffix; |
| 15 |
q_platform.h has traditionally used "arm" so let's use that. |
| 16 |
|
| 17 |
64-bit ARM makes a clean break from this, much like 64-bit x86 does: |
| 18 |
uname -m produces a string not starting with arm (specifically |
| 19 |
"aarch64"), and gcc predefines __aarch64__ instead of __arm__. |
| 20 |
As a result, it is unaffected by this change. |
| 21 |
|
| 22 |
(cherry picked from ioquake3 commit c91fab3900345d047f085d1e467521bba1ebd28f) |
| 23 |
|
| 24 |
Forwarded: https://github.com/OpenArena/gamecode/pull/17 |
| 25 |
Applied-upstream: https://github.com/OpenArena/gamecode/commit/732d32079b6675f8595471af7d252e190c80f006 |
| 26 |
--- |
| 27 |
Makefile | 2 +- |
| 28 |
1 file changed, 1 insertion(+), 1 deletion(-) |
| 29 |
|
| 30 |
diff --git a/Makefile b/Makefile |
| 31 |
index 84b58b3..11a9efc 100644 |
| 32 |
--- a/Makefile |
| 33 |
+++ b/Makefile |
| 34 |
@@ -6,7 +6,7 @@ |
| 35 |
|
| 36 |
COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'|sed -e 's/\//_/g') |
| 37 |
|
| 38 |
-COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/i386/) |
| 39 |
+COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/i386/ | sed -e 's/^arm.*/arm/') |
| 40 |
|
| 41 |
ifeq ($(COMPILE_PLATFORM),sunos) |
| 42 |
# Solaris uname and GNU uname differ |