Skip to content

compiler.h: don't define inb/outb and friends on mips

Julien Cristau requested to merge jcristau/xserver:mips-gcc10-build-fix into master

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.

Merge request reports