x11-drivers/xf86-video-geode: Fix -fno-common

Fix the build of x11-drivers/xf86-video-geode when compiled with
-fno-common, which is the default with llvm 11.
While here, add license.

MFH:		2020Q3 (implicit, -fno-common fixes, ok by joenum)
This commit is contained in:
Niclas Zeising 2020-08-24 20:21:07 +00:00
parent 1b7e8f937a
commit db0023fac1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=546109
6 changed files with 81 additions and 0 deletions

View File

@ -8,6 +8,9 @@ CATEGORIES= x11-drivers
MAINTAINER= x11@FreeBSD.org
COMMENT= X.Org geode display driver
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
USES= xorg-cat:driver
ONLY_FOR_ARCHS= i386

View File

@ -0,0 +1,34 @@
--- src/geode.h.orig 2020-08-24 18:11:55 UTC
+++ src/geode.h
@@ -343,7 +343,7 @@ typedef struct _geodeRec {
/* option flags are self-explanatory */
#ifdef HAVE_LX
-enum {
+enum LX_GeodeOpts {
LX_OPTION_SW_CURSOR,
LX_OPTION_HW_CURSOR,
LX_OPTION_NOCOMPRESSION,
@@ -357,11 +357,11 @@ enum {
LX_OPTION_FBSIZE,
LX_OPTION_PANEL_MODE,
LX_OPTION_DONT_PROGRAM
-} LX_GeodeOpts;
+};
#endif
#ifdef HAVE_GX
-enum {
+enum GX_GeodeOpts {
GX_OPTION_SW_CURSOR,
GX_OPTION_HW_CURSOR,
GX_OPTION_NOCOMPRESSION,
@@ -378,7 +378,7 @@ enum {
GX_OPTION_FBSIZE,
GX_OPTION_PANEL_GEOMETRY,
GX_OPTION_DONT_PROGRAM
-} GX_GeodeOpts;
+};
#endif
/* geode_dcon.c */

View File

@ -0,0 +1,11 @@
--- src/gx_video.c.orig 2020-08-24 18:14:49 UTC
+++ src/gx_video.c
@@ -112,7 +112,7 @@ void GXSetVideoPosition(int x, int y, int width, int h
extern void GXAccelSync(ScrnInfoPtr pScrni);
-int DeltaX, DeltaY;
+extern int DeltaX, DeltaY;
unsigned long graphics_lut[256];
static int lutflag = 0;

View File

@ -0,0 +1,11 @@
--- src/lx_driver.c.orig 2020-08-24 20:15:55 UTC
+++ src/lx_driver.c
@@ -74,7 +74,7 @@
extern OptionInfoRec LX_GeodeOptions[];
-unsigned char *XpressROMPtr;
+extern unsigned char *XpressROMPtr;
static Bool
LXSaveScreen(ScreenPtr pScrn, int mode)

View File

@ -0,0 +1,11 @@
--- src/panel.c.orig 2019-09-20 16:17:28 UTC
+++ src/panel.c
@@ -51,7 +51,7 @@
#define PLATFORM_DORADO 1 /* Dorado + 9211 RevC */
#define PLATFORM_GX2BASED 1 /* Redcloud */
-unsigned char *XpressROMPtr;
+extern unsigned char *XpressROMPtr;
#include "pnl_init.c"
#include "pnl_bios.c"

View File

@ -0,0 +1,11 @@
--- src/panel/panel.c.orig 2019-09-20 16:17:28 UTC
+++ src/panel/panel.c
@@ -65,7 +65,7 @@ extern unsigned long gfx_detect_video(void);
#define PLATFORM_DORADO 1 /* Dorado + 9211 RevC */
#define PLATFORM_REDCLOUD 1 /* GX2 */
-unsigned char *XpressROMPtr;
+extern unsigned char *XpressROMPtr;
#include "pnl_init.c"
#include "pnl_bios.c"