gnu: Add lierolibre.
[jackhill/guix/guix.git] / gnu / packages / patches / lierolibre-try-building-other-arch.patch
1 Copied from Debian:
2
3 https://anonscm.debian.org/cgit/pkg-games/lierolibre.git/tree/debian/patches/0001-Use-unaligned-access-define-over-checking-arch.patch?id=82910748906855f6e6bfe30b3f077e8c793ae424
4
5 From a70691fb003cae1a33f06d682269285f9baa2dd9 Mon Sep 17 00:00:00 2001
6 From: Martin Erik Werner <martinerikwerner@gmail.com>
7 Date: Sun, 28 Jun 2015 19:00:23 +0200
8 Subject: [PATCH 2/3] At least try building for other archs than x86*
9
10 Allow attempting to build for other architectures than x86 and x86_64,
11 whether or not the build will succeed or produce sane output is another
12 question... It emits plenty of warnings about it now though...
13
14 Configuration of the FPU controller is disabled on all but x86*, and the
15 uninformed hope and prayer is that defaults will be fine without messing
16 with them.
17 ---
18 math/ieee.cpp | 2 ++
19 support/platform.h | 4 ++--
20 2 files changed, 4 insertions(+), 2 deletions(-)
21
22 diff --git a/src/gvl/math/ieee.cpp b/src/gvl/math/ieee.cpp
23 index 8b740d4..e0803d2 100644
24 --- a/src/gvl/math/ieee.cpp
25 +++ b/src/gvl/math/ieee.cpp
26 @@ -54,6 +54,8 @@ void gvl_init_ieee()
27 {
28 #if GVL_MSVCPP
29 // Nothing needs to be done, TODO: we should however check that the x87 state is right
30 +#elif !GVL_X86 && !GVL_X86_64
31 +// No idea what to do, but run with defaults and pray it doesn't mess things up
32 #elif GVL_GCC && GVL_WIN32
33 unsigned int const flags = _RC_NEAR | _PC_53 | _EM_INVALID | _EM_DENORMAL | _EM_ZERODIVIDE | _EM_OVERFLOW | _EM_UNDERFLOW | _EM_INEXACT;
34 _control87(flags, _MCW_EM | _MCW_PC | _MCW_RC);
35 diff --git a/src/gvl/support/platform.h b/src/gvl/support/platform.h
36 index 86dcaa6..1857b7c 100644
37 --- a/src/gvl/support/platform.h
38 +++ b/src/gvl/support/platform.h
39 @@ -88,12 +88,12 @@
40 # elif defined(__i386__) || defined(_M_IX86) || defined(i386) || defined(i486) || defined(intel) || defined(x86) || defined(i86pc)
41 # define GVL_X86 1
42 # else
43 -# error "Unknown architecture, please add it"
44 +# warning "Unknown architecture, please add it"
45 # endif
46 #endif
47
48 #if !GVL_LITTLE_ENDIAN && !GVL_BIG_ENDIAN
49 -# if GVL_X86 || GVL_X86_64
50 +# if GVL_X86 || GVL_X86_64 || __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN
51 # define GVL_LITTLE_ENDIAN 1
52 # else
53 # define GVL_BIG_ENDIAN 1
54 --
55 2.4.6
56