trousers: disable on ARC
[buildroot-gz.git] / package / chocolate-doom / 0001-Fix-gcc_struct-attribute-directive-ignored-warnings.patch
blobbff8e3ec1be77f9b64cbae1f0ef41fd58d30f741
1 From d9c517d9a4e168c1f7ed28ad0eb9365d69f5ceb2 Mon Sep 17 00:00:00 2001
2 From: Rodrigo Rebello <rprebello@gmail.com>
3 Date: Thu, 22 Oct 2015 11:29:55 -0200
4 Subject: [PATCH] Fix "`gcc_struct' attribute directive ignored" warnings
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Compilation for target architectures other than i386, x86_64 or PowerPC
10 (e.g. ARM) caused multiple warnings like the following to appear:
12 doomdata.h:75:1: warning: ‘gcc_struct’ attribute directive ignored
13 } PACKEDATTR mapsidedef_t;
16 This was due to 'gcc_struct' being undefined for these architectures.
17 Since that attribute was actually introduced by commit 87db726b9a9ae61ca
18 to address the fact that -mms-bitfields became the default for GCC on
19 Windows, limit it to that case.
21 Upstream-status: accepted, not yet released.
22 https://github.com/chocolate-doom/chocolate-doom/pull/629
24 Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
25 ---
26 src/doomtype.h | 6 +++---
27 1 file changed, 3 insertions(+), 3 deletions(-)
29 diff --git a/src/doomtype.h b/src/doomtype.h
30 index bf0a40e..77c026c 100644
31 --- a/src/doomtype.h
32 +++ b/src/doomtype.h
33 @@ -52,10 +52,10 @@
35 #ifdef __GNUC__
37 -#ifdef __clang__
38 -#define PACKEDATTR __attribute__((packed))
39 -#else
40 +#if defined(_WIN32) && !defined(__clang__)
41 #define PACKEDATTR __attribute__((packed,gcc_struct))
42 +#else
43 +#define PACKEDATTR __attribute__((packed))
44 #endif
46 #else
47 --
48 2.1.4