diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2020-01-25 14:38:51 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2020-01-25 14:38:51 +0000 |
commit | 3ca358e5529ee52f69c7d9293706958afb81ff7c (patch) | |
tree | 979ad592087408ba482f218c3d03096d7bb5af93 /games | |
parent | 95a00917b8ed00555d0ca7bcba9930ec540c8f71 (diff) | |
download | pkgsrc-3ca358e5529ee52f69c7d9293706958afb81ff7c.tar.gz |
Use __builtin_alloca instead of alloca. Fixes build w/ gcc8.
Diffstat (limited to 'games')
-rw-r--r-- | games/dhewm3/distinfo | 4 | ||||
-rw-r--r-- | games/dhewm3/patches/patch-neo_renderer_Image__init.cpp | 15 | ||||
-rw-r--r-- | games/dhewm3/patches/patch-neo_sys_platform.h | 17 |
3 files changed, 35 insertions, 1 deletions
diff --git a/games/dhewm3/distinfo b/games/dhewm3/distinfo index 979a1f8337a..e208d60861a 100644 --- a/games/dhewm3/distinfo +++ b/games/dhewm3/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.1 2019/12/14 19:16:39 nia Exp $ +$NetBSD: distinfo,v 1.2 2020/01/25 14:38:51 jmcneill Exp $ SHA1 (dhewm3-1.5.0-src.tar.xz) = 4dd50a0d046565f17ca7737c922f9510f3cf0e21 RMD160 (dhewm3-1.5.0-src.tar.xz) = c9b376d22381e8cfd5657c079ba26eb07c9f1217 SHA512 (dhewm3-1.5.0-src.tar.xz) = 0a52744818205f842bf5d32d27310acb890999555258a94b589d8369f3804c0d4888fb594261791abff193e8d6b853b5d818205e66ef3928a2d1d361135e9a5d Size (dhewm3-1.5.0-src.tar.xz) = 3815488 bytes +SHA1 (patch-neo_renderer_Image__init.cpp) = 1c84e961325650dda89af8942781aa9282a55d69 +SHA1 (patch-neo_sys_platform.h) = 111981dd6176600ad6851193402486c9e427d3d7 diff --git a/games/dhewm3/patches/patch-neo_renderer_Image__init.cpp b/games/dhewm3/patches/patch-neo_renderer_Image__init.cpp new file mode 100644 index 00000000000..29510ccaa1b --- /dev/null +++ b/games/dhewm3/patches/patch-neo_renderer_Image__init.cpp @@ -0,0 +1,15 @@ +$NetBSD: patch-neo_renderer_Image__init.cpp,v 1.1 2020/01/25 14:38:51 jmcneill Exp $ + +Use the _alloca define from neo/sys/platform.h + +--- neo/renderer/Image_init.cpp.orig 2018-12-15 04:49:59.000000000 +0000 ++++ neo/renderer/Image_init.cpp +@@ -1197,7 +1197,7 @@ void R_ListImages_f( const idCmdArgs &ar + + totalSize = 0; + +- sortedImage_t *sortedArray = (sortedImage_t *)alloca( sizeof( sortedImage_t ) * globalImages->images.Num() ); ++ sortedImage_t *sortedArray = (sortedImage_t *)_alloca( sizeof( sortedImage_t ) * globalImages->images.Num() ); + + for ( i = 0 ; i < globalImages->images.Num() ; i++ ) { + image = globalImages->images[ i ]; diff --git a/games/dhewm3/patches/patch-neo_sys_platform.h b/games/dhewm3/patches/patch-neo_sys_platform.h new file mode 100644 index 00000000000..24c54200b0a --- /dev/null +++ b/games/dhewm3/patches/patch-neo_sys_platform.h @@ -0,0 +1,17 @@ +$NetBSD: patch-neo_sys_platform.h,v 1.1 2020/01/25 14:38:51 jmcneill Exp $ + +Use __builtin_allocate on Unix + +--- neo/sys/platform.h.orig 2018-12-15 04:49:59.000000000 +0000 ++++ neo/sys/platform.h +@@ -136,8 +136,8 @@ If you have questions concerning this li + // Unix + #ifdef __unix__ + +-#define _alloca alloca +-#define _alloca16( x ) ((void *)((((uintptr_t)alloca( (x)+15 )) + 15) & ~15)) ++#define _alloca __builtin_alloca ++#define _alloca16( x ) ((void *)((((uintptr_t)__builtin_alloca( (x)+15 )) + 15) & ~15)) + + #ifdef GAME_DLL + #define ID_GAME_API __attribute__((visibility ("default"))) |