compiler.h: don't define inb/outb and friends on mips
The definition relies on IOPortBase, which is only ever set in hw/xfree86/os-support/bsd/arm_video.c This caused build failures on linux/mips with GCC 10, due to this change (from https://gcc.gnu.org/gcc-10/changes.html#c): "GCC now defaults to -fno-common. As a result, global variable accesses are more efficient on various targets. In C, global variables with multiple tentative definitions now result in linker errors. With -fcommon such definitions are silently merged during linking." As a result anything including compiler.h would get its own definition of IOPortBase and the linker would error out.
This commit is contained in:
parent
f08ab719df
commit
0148a15da1
|
@ -518,14 +518,10 @@ xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset,
|
||||||
barrier();
|
barrier();
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__))
|
#elif defined(__arm32__) && !defined(__linux__)
|
||||||
#if defined(__arm32__) || defined(__mips64)
|
|
||||||
#define PORT_SIZE long
|
#define PORT_SIZE long
|
||||||
#else
|
|
||||||
#define PORT_SIZE short
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
|
extern _X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
|
||||||
|
|
||||||
static __inline__ void
|
static __inline__ void
|
||||||
outb(unsigned PORT_SIZE port, unsigned char val)
|
outb(unsigned PORT_SIZE port, unsigned char val)
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
#include "xf86Priv.h"
|
#include "xf86Priv.h"
|
||||||
#include "xf86_OSlib.h"
|
#include "xf86_OSlib.h"
|
||||||
#include "xf86OSpriv.h"
|
#include "xf86OSpriv.h"
|
||||||
|
#include "compiler.h"
|
||||||
|
|
||||||
#if defined(__NetBSD__) && !defined(MAP_FILE)
|
#if defined(__NetBSD__) && !defined(MAP_FILE)
|
||||||
#define MAP_FLAGS MAP_SHARED
|
#define MAP_FLAGS MAP_SHARED
|
||||||
|
@ -162,6 +163,8 @@ xf86DisableIO()
|
||||||
|
|
||||||
#if defined(USE_ARC_MMAP) || defined(__arm32__)
|
#if defined(USE_ARC_MMAP) || defined(__arm32__)
|
||||||
|
|
||||||
|
unsigned int IOPortBase;
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
xf86EnableIO()
|
xf86EnableIO()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue