x86 compilation breakage since #4324 merge
As of e5339fe4, x86 compilation results in the following errors:
[940/2061] Compiling C object 'src/mesa/bbe4a73@@mesa_classic@sta/x86_rtasm_x86sse.c.o'.
FAILED: src/mesa/bbe4a73@@mesa_classic@sta/x86_rtasm_x86sse.c.o
gcc -m32 -Isrc/mesa/bbe4a73@@mesa_classic@sta -Isrc/mesa -I../mesa/src/mesa -Iinclude -I../mesa/include -Isrc -I../mesa/src -Isrc/mapi -I../mesa/src/mapi -I../mesa/src/gallium/include -Isrc/gallium/auxiliary -I../mesa/src/gallium/auxiliary -I../mesa/src/mesa/x86 -Isrc/mesa/main -I../mesa/src/mesa/main -Isrc/compiler/nir -I../mesa/src/compiler/nir -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -std=c99 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="20.1.0-devel"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/issues"' -DUSE_ELF_TLS -DHAVE_ST_VDPAU -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DHAVE_X11_PLATFORM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DHAVE_DRM_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -D_GNU_SOURCE -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DMAJOR_IN_SYSMACROS -DHAVE_SYS_SYSCTL_H -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_EXECINFO_H -DHAVE_SYS_SHM_H -DHAVE_CET_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_TIMESPEC_GET -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DLLVM_AVAILABLE '-DMESA_LLVM_VERSION_STRING="9.0.1"' -DUSE_LIBGLVND=1 -DHAVE_WAYLAND_PLATFORM -DWL_HIDE_DEPRECATED -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -DHAVE_GALLIUM_EXTRA_HUD=1 -DHAVE_LIBSENSORS=1 -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=empty-body -Werror=incompatible-pointer-types -Werror=int-conversion -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -fno-common -Werror=format -Wformat-security -march=x86-64 -mtune=generic -O2 -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -fvisibility=hidden -Werror=pointer-arith -Werror=vla -MD -MQ 'src/mesa/bbe4a73@@mesa_classic@sta/x86_rtasm_x86sse.c.o' -MF 'src/mesa/bbe4a73@@mesa_classic@sta/x86_rtasm_x86sse.c.o.d' -o 'src/mesa/bbe4a73@@mesa_classic@sta/x86_rtasm_x86sse.c.o' -c ../mesa/src/mesa/x86/rtasm/x86sse.c
In file included from ../mesa/src/mesa/x86/rtasm/x86sse.c:7:
../mesa/src/mesa/main/execmem.h:31:19: error: unknown type name ‘GLuint’; did you mean ‘uint’?
31 | _mesa_exec_malloc(GLuint size);
| ^~~~~~
| uint
../mesa/src/mesa/x86/rtasm/x86sse.c: In function ‘do_realloc’:
../mesa/src/mesa/x86/rtasm/x86sse.c:25:18: error: implicit declaration of function ‘_mesa_exec_malloc’; did you mean ‘_mesa_align_malloc’? [-Werror=implicit-function-declaration]
25 | p->store = _mesa_exec_malloc(p->size);
| ^~~~~~~~~~~~~~~~~
| _mesa_align_malloc
../mesa/src/mesa/x86/rtasm/x86sse.c:25:16: error: assignment to ‘unsigned char *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
25 | p->store = _mesa_exec_malloc(p->size);
| ^
../mesa/src/mesa/x86/rtasm/x86sse.c:32:16: error: assignment to ‘unsigned char *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
32 | p->store = _mesa_exec_malloc(p->size);
| ^
../mesa/src/mesa/x86/rtasm/x86sse.c: In function ‘x86_init_func_size’:
../mesa/src/mesa/x86/rtasm/x86sse.c:1173:13: error: assignment to ‘unsigned char *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
1173 | p->store = _mesa_exec_malloc(code_size);
| ^
cc1: some warnings being treated as errors
Reverting the aforementioned commit fixes the issue (it doesn't revert cleanly though, minimal edits are needed for that).
Edited by Etienne Juvigny