Replace alloca patches with USE_LANGUAGES=gnu++11, suggested by joerg

This commit is contained in:
jmcneill 2020-01-26 00:21:16 +00:00
parent 5095061e13
commit de683cfd5e
4 changed files with 3 additions and 37 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 2020/01/18 21:49:23 jperkin Exp $
# $NetBSD: Makefile,v 1.4 2020/01/26 00:21:16 jmcneill Exp $
DISTNAME= dhewm3-1.5.0-src
PKGNAME= ${DISTNAME:S/-src//1}
@ -17,7 +17,7 @@ LICENSE= gnu-gpl-v3
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
USE_CMAKE= yes
USE_TOOLS+= pkg-config
USE_LANGUAGES= c c++11
USE_LANGUAGES= c gnu++11
# C++11
GCC_REQD+= 4.7

View file

@ -1,8 +1,6 @@
$NetBSD: distinfo,v 1.2 2020/01/25 14:38:51 jmcneill Exp $
$NetBSD: distinfo,v 1.3 2020/01/26 00:21:16 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

View file

@ -1,15 +0,0 @@
$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 ];

View file

@ -1,17 +0,0 @@
$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")))