Set -fcommon in the build.

This commit is contained in:
bentley 2021-01-31 07:37:18 +00:00
parent 5d26fbe2d4
commit 1728dd8fbf
2 changed files with 18 additions and 3 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.10 2019/07/12 20:46:18 sthen Exp $
# $OpenBSD: Makefile,v 1.11 2021/01/31 07:37:18 bentley Exp $
COMMENT = vertical shoot-em-up with nontraditional elements
DISTNAME = garden-1.0.9
REVISION = 2
REVISION = 3
CATEGORIES = games
@ -26,6 +26,6 @@ LIB_DEPENDS = games/allegro
CONFIGURE_STYLE = gnu
CONFIGURE_ENV = CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include"
CFLAGS += -fgnu89-inline
CFLAGS += -fgnu89-inline -fcommon
.include <bsd.port.mk>

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-src_main_c,v 1.1 2021/01/31 07:37:18 bentley Exp $
Fix build with -fno-common. From FreeBSD.
Index: src/main.c
--- src/main.c.orig
+++ src/main.c
@@ -55,7 +55,7 @@ struct enemystruct enemy [NO_ENEMIES];
struct ebulletstruct ebullet [NO_EBULLETS];
struct pbulletstruct pbullet [NO_PBULLETS];
struct arenastruct arena;
-struct eclassstruct eclass [NO_ENEMY_TYPES];
+extern struct eclassstruct eclass [NO_ENEMY_TYPES];
struct cloudstruct cloud [NO_CLOUDS];
struct bossstruct boss;