Description: Use gcc to determine if an arch is 64-bit
uname -m is misleading when determining if an arch is 64-bit or not
- It indicates the _build_ machine's processor which may not be the same as the
processor the code is being built for (cross compiling).
- It fails if a 32-bit compiler is used on a 64-bit cpu (eg build i386 packages
on x86_64). This is common on the mips buildds.
Therefore ask GCC if this architecture is 64-bit. Using __LP64__ is the easiest
method, but is not portable and probably only works with GCC and Clang
Author: James Cowgill <email@example.com>
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
@@ -162,7 +162,7 @@
VERSION = $(shell cat VERSION)
-ifneq (,$(filter $(shell uname -m), aarch64 ppc64le x86_64))
+ifeq (1,$(shell echo __LP64__ | $(CC) -P -E -))
# msys will always be 32 bit so look at the cpu arch instead.