[lierolibre] 02/04: Add upstream patches for building on other archs than x86 and x86_64

Martin Werner arand-guest at moszumanska.debian.org
Tue Aug 18 21:41:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

arand-guest pushed a commit to branch master
in repository lierolibre.

commit 4f296aada135d3d24f1a3e56a99028c9002f92fd
Author: Martin Erik Werner <martinerikwerner at gmail.com>
Date:   Tue Aug 18 21:25:31 2015 +0200

    Add upstream patches for building on other archs than x86 and x86_64
---
 debian/changelog                                   |  4 ++
 ...naligned-access-define-over-checking-arch.patch | 26 +++++++++++
 ...ast-try-building-for-other-archs-than-x86.patch | 52 ++++++++++++++++++++++
 .../patches/0003-Remove-unknown-arch-warning.patch | 26 +++++++++++
 debian/patches/series                              |  3 ++
 5 files changed, 111 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 9e53814..8000fc3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,10 @@ lierolibre (0.5-2) UNRELEASED; urgency=low
   * Add upstream patch to fix string conversion with new libstdc++6 cxx11 and
     libconfig++9v5
     - debian/patches/fix-conversion-of-basic-string-to-c-string.patch
+  * Add upstream patches for building on other archs than x86 and x86_64
+    - debian/patches/0001-Use-unaligned-access-define-over-checking-arch.patch
+    - debian/patches/0002-At-least-try-building-for-other-archs-than-x86.patch
+    - debian/patches/0003-Remove-unknown-arch-warning.patch
 
  -- Martin Erik Werner <martinerikwerner at gmail.com>  Mon, 17 Aug 2015 16:27:12 +0200
 
diff --git a/debian/patches/0001-Use-unaligned-access-define-over-checking-arch.patch b/debian/patches/0001-Use-unaligned-access-define-over-checking-arch.patch
new file mode 100644
index 0000000..899b736
--- /dev/null
+++ b/debian/patches/0001-Use-unaligned-access-define-over-checking-arch.patch
@@ -0,0 +1,26 @@
+From 396f19b6b7743d394307f70f0c0108419824437b Mon Sep 17 00:00:00 2001
+From: Martin Erik Werner <martinerikwerner at gmail.com>
+Date: Sun, 28 Jun 2015 16:31:34 +0200
+Subject: [PATCH 1/3] Use unaligned access define over checking arch
+
+This todo item seems like it done, and just needed implementing...
+---
+ io/encoding.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gvl/io/encoding.hpp b/src/gvl/io/encoding.hpp
+index c491677..89bb612 100644
+--- a/src/gvl/io/encoding.hpp
++++ b/src/gvl/io/encoding.hpp
+@@ -374,7 +374,7 @@ struct octet_stream_writer
+ 		// inlining of the common case
+ 		if(std::size_t(end_ - cur_) >= len)
+ 		{
+-#if GVL_X86 || GVL_X86_64 // TODO: A define that says whether unaligned access is allowed
++#if GVL_UNALIGNED_ACCESS
+ 			if(len < 64) // TODO: Tweak this limit
+ 			{
+ 				while(len > 4)
+-- 
+2.4.6
+
diff --git a/debian/patches/0002-At-least-try-building-for-other-archs-than-x86.patch b/debian/patches/0002-At-least-try-building-for-other-archs-than-x86.patch
new file mode 100644
index 0000000..a6364da
--- /dev/null
+++ b/debian/patches/0002-At-least-try-building-for-other-archs-than-x86.patch
@@ -0,0 +1,52 @@
+From a70691fb003cae1a33f06d682269285f9baa2dd9 Mon Sep 17 00:00:00 2001
+From: Martin Erik Werner <martinerikwerner at gmail.com>
+Date: Sun, 28 Jun 2015 19:00:23 +0200
+Subject: [PATCH 2/3] At least try building for other archs than x86*
+
+Allow attempting to build for other architectures than x86 and x86_64,
+whether or not the build will succeed or produce sane output is another
+question... It emits plenty of warnings about it now though...
+
+Configuration of the FPU controller is disabled on all but x86*, and the
+uninformed hope and prayer is that defaults will be fine without messing
+with them.
+---
+ math/ieee.cpp      | 2 ++
+ support/platform.h | 4 ++--
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/gvl/math/ieee.cpp b/src/gvl/math/ieee.cpp
+index 8b740d4..e0803d2 100644
+--- a/src/gvl/math/ieee.cpp
++++ b/src/gvl/math/ieee.cpp
+@@ -54,6 +54,8 @@ void gvl_init_ieee()
+ {
+ #if GVL_MSVCPP
+ // Nothing needs to be done, TODO: we should however check that the x87 state is right
++#elif !GVL_X86 && !GVL_X86_64
++// No idea what to do, but run with defaults and pray it doesn't mess things up
+ #elif GVL_GCC && GVL_WIN32
+     unsigned int const flags = _RC_NEAR | _PC_53 | _EM_INVALID | _EM_DENORMAL | _EM_ZERODIVIDE | _EM_OVERFLOW | _EM_UNDERFLOW | _EM_INEXACT;
+     _control87(flags, _MCW_EM | _MCW_PC | _MCW_RC);
+diff --git a/src/gvl/support/platform.h b/src/gvl/support/platform.h
+index 86dcaa6..1857b7c 100644
+--- a/src/gvl/support/platform.h
++++ b/src/gvl/support/platform.h
+@@ -88,12 +88,12 @@
+ # elif defined(__i386__) || defined(_M_IX86) || defined(i386) || defined(i486) || defined(intel) || defined(x86) || defined(i86pc)
+ #  define GVL_X86 1
+ # else
+-#  error "Unknown architecture, please add it"
++#  warning "Unknown architecture, please add it"
+ # endif
+ #endif
+ 
+ #if !GVL_LITTLE_ENDIAN && !GVL_BIG_ENDIAN
+-# if GVL_X86 || GVL_X86_64
++# if GVL_X86 || GVL_X86_64 || __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN
+ #  define GVL_LITTLE_ENDIAN 1
+ # else
+ #  define GVL_BIG_ENDIAN 1
+-- 
+2.4.6
+
diff --git a/debian/patches/0003-Remove-unknown-arch-warning.patch b/debian/patches/0003-Remove-unknown-arch-warning.patch
new file mode 100644
index 0000000..3d425bb
--- /dev/null
+++ b/debian/patches/0003-Remove-unknown-arch-warning.patch
@@ -0,0 +1,26 @@
+From a9592533eeabed075b13d11c64f63f503dc13343 Mon Sep 17 00:00:00 2001
+From: Martin Erik Werner <martinerikwerner at gmail.com>
+Date: Sun, 28 Jun 2015 19:31:30 +0200
+Subject: [PATCH 3/3] Remove unknown arch warning
+
+The warning was just excessivley spammy, remove it.
+---
+ support/platform.h | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/gvl/support/platform.h b/src/gvl/support/platform.h
+index 1857b7c..ff6a7d2 100644
+--- a/src/gvl/support/platform.h
++++ b/src/gvl/support/platform.h
+@@ -87,8 +87,6 @@
+ #  define GVL_X86_64 1
+ # elif defined(__i386__) || defined(_M_IX86) || defined(i386) || defined(i486) || defined(intel) || defined(x86) || defined(i86pc)
+ #  define GVL_X86 1
+-# else
+-#  warning "Unknown architecture, please add it"
+ # endif
+ #endif
+ 
+-- 
+2.4.6
+
diff --git a/debian/patches/series b/debian/patches/series
index 7d86c47..66ec740 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,5 @@
 kfreebsd.patch
 fix-conversion-of-basic-string-to-c-string.patch
+0001-Use-unaligned-access-define-over-checking-arch.patch
+0002-At-least-try-building-for-other-archs-than-x86.patch
+0003-Remove-unknown-arch-warning.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/lierolibre.git



More information about the Pkg-games-commits mailing list