Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 706554 Details for
Bug 788616
games-fps/xonotic-0.8.2 fails to build against gcc-11 (dpsoftrast.c:239:22: error: size of array element is not a multiple of its alignment)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix build against gcc-11
darkplaces-20140513-align-structs-not-typedefs.patch (text/plain), 2.91 KB, created by
Artem Ilgamov
on 2021-05-07 21:06:19 UTC
(
hide
)
Description:
Fix build against gcc-11
Filename:
MIME Type:
Creator:
Artem Ilgamov
Created:
2021-05-07 21:06:19 UTC
Size:
2.91 KB
patch
obsolete
>--- a/source/darkplaces/dpsoftrast.c 2013-02-07 11:40:40.000000000 +0000 >+++ b/source/darkplaces/dpsoftrast.c 2021-04-30 04:45:31.276607019 +0000 >@@ -21,6 +21,7 @@ > #if defined(__APPLE__) > #include <libkern/OSAtomic.h> > #define ALIGN(var) var __attribute__((__aligned__(16))) >+ #define ALIGN_STRUCT(def) struct __attribute__((__aligned__(16))) def > #define ATOMIC(var) var __attribute__((__aligned__(4))) > #define MEMORY_BARRIER (_mm_sfence()) > #define ATOMIC_COUNTER volatile int32_t >@@ -29,6 +30,7 @@ > #define ATOMIC_ADD(counter, val) ((void)OSAtomicAdd32Barrier((val), &(counter))) > #elif defined(__GNUC__) && defined(WIN32) > #define ALIGN(var) var __attribute__((__aligned__(16))) >+ #define ALIGN_STRUCT(def) struct __attribute__((__aligned__(16))) def > #define ATOMIC(var) var __attribute__((__aligned__(4))) > #define MEMORY_BARRIER (_mm_sfence()) > //(__sync_synchronize()) >@@ -43,6 +45,7 @@ > #define ATOMIC_ADD(counter, val) ((void)InterlockedExchangeAdd((LONG *) &(counter), (val))) > #elif defined(__GNUC__) > #define ALIGN(var) var __attribute__((__aligned__(16))) >+ #define ALIGN_STRUCT(def) struct __attribute__((__aligned__(16))) def > #define ATOMIC(var) var __attribute__((__aligned__(4))) > #define MEMORY_BARRIER (_mm_sfence()) > //(__sync_synchronize()) >@@ -52,6 +55,7 @@ > #define ATOMIC_ADD(counter, val) ((void)__sync_fetch_and_add(&(counter), (val))) > #elif defined(_MSC_VER) > #define ALIGN(var) __declspec(align(16)) var >+ #define ALIGN_STRUCT(def) ALIGN(struct def) > #define ATOMIC(var) __declspec(align(4)) var > #define MEMORY_BARRIER (_mm_sfence()) > //(MemoryBarrier()) >@@ -65,6 +69,9 @@ > #ifndef ALIGN > #define ALIGN(var) var > #endif >+#ifndef ALIGN_STRUCT >+#define ALIGN_STRUCT(def) def >+#endif > #ifndef ATOMIC > #define ATOMIC(var) var > #endif >@@ -163,7 +170,7 @@ > #define DPSOFTRAST_DRAW_MAXCOMMANDPOOL 2097152 > #define DPSOFTRAST_DRAW_MAXCOMMANDSIZE 16384 > >-typedef ALIGN(struct DPSOFTRAST_State_Command_Pool_s >+typedef ALIGN_STRUCT(DPSOFTRAST_State_Command_Pool_s > { > int freecommand; > int usedcommands; >@@ -171,7 +178,7 @@ > } > DPSOFTRAST_State_Command_Pool); > >-typedef ALIGN(struct DPSOFTRAST_State_Triangle_s >+typedef ALIGN_STRUCT(DPSOFTRAST_State_Triangle_s > { > unsigned char mip[DPSOFTRAST_MAXTEXTUREUNITS]; // texcoord to screen space density values (for picking mipmap of textures) > float w[3]; >@@ -198,7 +205,7 @@ > > #define DPSOFTRAST_DRAW_MAXSUBSPAN 16 > >-typedef ALIGN(struct DPSOFTRAST_State_Span_s >+typedef ALIGN_STRUCT(DPSOFTRAST_State_Span_s > { > int triangle; // triangle this span was generated by > int x; // framebuffer x coord >@@ -236,7 +243,7 @@ > } > DPSOFTRAST_BLENDMODE; > >-typedef ALIGN(struct DPSOFTRAST_State_Thread_s >+typedef ALIGN_STRUCT(DPSOFTRAST_State_Thread_s > { > void *thread; > int index; >@@ -302,7 +309,7 @@ > } > DPSOFTRAST_State_Thread); > >-typedef ALIGN(struct DPSOFTRAST_State_s >+typedef ALIGN_STRUCT(DPSOFTRAST_State_s > { > int fb_width; > int fb_height;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 788616
:
706386
| 706554