Hi, > This isn't sufficient to fix the compile failure on OpenBSD, > because there are still files which #include <epoxy/gl.h> but > which aren't being compiled with OPENGL_CFLAGS: > > hw/lm32/milkymist.c (via milkymist-hw.h) > ui/sdl2-gl.c > ui/egl-context.c (via ui/egl-context.h and ui/egl-helpers.h) > ui/gtk.c (via ui/gtk.h and ui/egl-helpers.h) > > just to take the first few I found via grep. (The OpenBSD > build fails on egl-context.o.) > > Rather than trying to figure out exactly which .c files need > to have the OPENGL_CFLAGS applied to them, I think it would > be better if we just put them into the standard QEMU_CFLAGS > that we use for building all objects, the same way we do > for other library CFLAGS requirements. Or is there a reason > we can't do that with OpenGL?
I don't want do this for OPENGL_LIBS, so if we modularize UIs some day only the ui modules with opengl support depend on opengl libs, and I somehow dislike the asymmetry between OPENGL_LIBS and QEMU_CFLAGS. But other than that there are no reasons I'm aware of why this shouldn't work. Patch follows in a moment. cheers, Gerd