ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1
RFC PATCH 1/1 ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1
OpenBSD display various warnings about the use of an undefined __HAIKU__:
CC ui/egl-context.o
In file included from /usr/X11R6/include/epoxy/egl_generated.h:10:0,
from /usr/X11R6/include/epoxy/egl.h:46,
from include/ui/egl-helpers.h:5,
from include/ui/egl-context.h:5,
from ui/egl-context.c:3:
/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
#elif __HAIKU__
^ CC ui/egl-helpers.o/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
CC ui/egl-headless.o/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
This is due to a old <epoxy/egl_generated.h>:
70 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
...
108 #elif defined(__unix__) || defined(__APPLE__)
128 #elif __HAIKU__
134 #else
135 #error "Platform not recognized"
136 #endifKludge this by adding a check to ./configure: if this warning occurs, define __HAIKU__ from the CFLAGS.
---
This is ugly, hopefully someone can come with a clever idea :)
configure | 11 +++++++++++ 1 file changed, 11 insertions(+)
configure +11 -0
@@ -4036,6 +4036,17 @@ EOF if compile_prog "" "" ; then opengl_dmabuf=yes fi + cat > $TMPC << EOF +#include <epoxy/egl.h> +int main(void) { return 0; } +EOF + if test "$targetos" = "OpenBSD" ; then + if ! compile_prog "-Wundef -Werror" "" ; then + if compile_prog "-Wundef -Werror -D__HAIKU__=0" "" ; then + QEMU_CFLAGS="$QEMU_CFLAGS -D__HAIKU__=0" + fi + fi + fi fi ##########################################
Signature · 1 line
2.20.1
Quoted 2 lines · Philippe Mathieu-Daudé
OpenBSD display various warnings about the use of an undefined
__HAIKU__:
Please report it to OpenBSD and/or 3rd party libs. It's just a warning in public headers, not an issue on the qemu side.
Quoted 57 lines
CC
ui/egl-context.o
In file included from/usr/X11R6/include/epoxy/egl_generated.h:10:0,from /usr/X11R6/include/epoxy/egl.h:46, from include/ui/egl-helpers.h:5, from include/ui/egl-context.h:5, from ui/egl-context.c:3: /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef] #elif __HAIKU__ ^CC
ui/egl-helpers.o/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
CCui/egl-headless.o/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]This is due to a old <
epoxy/egl_generated.h>:70 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ ... 108 #elif defined(__unix__) || defined(__APPLE__) 128 #elif __HAIKU__ 134 #else 135 #error "Platform not recognized" 136 #endifKludge this by adding a check to ./configure: if this warning occurs, define
__HAIKU__from the CFLAGS.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
This is ugly, hopefully someone can come with a clever idea :)configure | 11 +++++++++++ 1 file changed, 11 insertions(+)configure +11
-0@@ -4036,6 +4036,17 @@ EOF if compile_prog "" "" ; then opengl_dmabuf=yes fi + cat > $TMPC << EOF +#include <epoxy/egl.h> +int main(void) { return 0; } +EOF + if test "$targetos" = "OpenBSD" ; then + if ! compile_prog "-Wundef -Werror" "" ; then + if compile_prog "-Wundef -Werror -D__HAIKU__=0" "" ; then + QEMU_CFLAGS="$QEMU_CFLAGS -D__HAIKU__=0" + fi + fi + fi fi ##########################################
Quoted 6 lines · Kamil Rytarowski
Quoted 2 lines · Philippe Mathieu-Daudé
OpenBSD display various warnings about the use of an undefined
__HAIKU__:Please report it to OpenBSD and/or 3rd party libs. It's just a warning in public headers, not an issue on the qemu side.
Brad said it should be fixed in OpenBSD 6.5:
Quoted 60 lines
Quoted 58 lines
CC
ui/egl-context.o
In file included from/usr/X11R6/include/epoxy/egl_generated.h:10:0,from /usr/X11R6/include/epoxy/egl.h:46, from include/ui/egl-helpers.h:5, from include/ui/egl-context.h:5, from ui/egl-context.c:3: /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef] #elif __HAIKU__ ^CC
ui/egl-helpers.o/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
CCui/egl-headless.o/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]This is due to a old <
epoxy/egl_generated.h>:70 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ ... 108 #elif defined(__unix__) || defined(__APPLE__) 128 #elif __HAIKU__ 134 #else 135 #error "Platform not recognized" 136 #endifKludge this by adding a check to ./configure: if this warning occurs, define
__HAIKU__from the CFLAGS.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
This is ugly, hopefully someone can come with a clever idea :)configure | 11 +++++++++++ 1 file changed, 11 insertions(+)configure +11
-0@@ -4036,6 +4036,17 @@ EOF if compile_prog "" "" ; then opengl_dmabuf=yes fi + cat > $TMPC << EOF +#include <epoxy/egl.h> +int main(void) { return 0; } +EOF + if test "$targetos" = "OpenBSD" ; then + if ! compile_prog "-Wundef -Werror" "" ; then + if compile_prog "-Wundef -Werror -D__HAIKU__=0" "" ; then + QEMU_CFLAGS="$QEMU_CFLAGS -D__HAIKU__=0" + fi + fi + fi fi ##########################################
Unfortunately that issue has only been fixed very recently.
There is a possibility of us updating from Mesa 17.3.9 to 18.3.x which would bring in this header fix, but I don't know how long that will be and it's currently held up on us switching i386 from bfd ld to lld.
So this header exists as is from 6.0 to the latest, most likely next release (6.5) too.
Honestly I think it would be better to just ignore this particular issue. It's an issue with a header outside of QEMU and it will go away in time when Mesa is eventually updated.
Quoted 58 lines · Philippe Mathieu-Daudé
OpenBSD display various warnings about the use of an undefined
__HAIKU__:CC
ui/egl-context.o
In file included from/usr/X11R6/include/epoxy/egl_generated.h:10:0,from /usr/X11R6/include/epoxy/egl.h:46, from include/ui/egl-helpers.h:5, from include/ui/egl-context.h:5, from ui/egl-context.c:3: /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef] #elif __HAIKU__ ^ CC ui/egl-helpers.o
/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
CCui/egl-headless.o/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]This is due to a old <
epoxy/egl_generated.h>:70 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ ... 108 #elif defined(__unix__) || defined(__APPLE__) 128 #elif __HAIKU__ 134 #else 135 #error "Platform not recognized" 136 #endifKludge this by adding a check to ./configure: if this warning occurs, define
__HAIKU__from the CFLAGS.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
This is ugly, hopefully someone can come with a clever idea :)configure | 11 +++++++++++ 1 file changed, 11 insertions(+)configure +11
-0@@ -4036,6 +4036,17 @@ EOF if compile_prog "" "" ; then opengl_dmabuf=yes fi + cat > $TMPC << EOF +#include <epoxy/egl.h> +int main(void) { return 0; } +EOF + if test "$targetos" = "OpenBSD" ; then + if ! compile_prog "-Wundef -Werror" "" ; then + if compile_prog "-Wundef -Werror -D__HAIKU__=0" "" ; then + QEMU_CFLAGS="$QEMU_CFLAGS -D__HAIKU__=0" + fi + fi + fi fi ##########################################
Quoted 9 lines · Brad Smith
Unfortunately that issue has only been fixed very recently.
There is a possibility of us updating from Mesa 17.3.9 to 18.3.x which would bring in this header fix, but I don't know how long that will be and it's currently held up on us switching i386 from bfd ld to lld.
Quoted 7 lines
So this header exists as is from 6.0 to the latest, most likely next release (6.5) too.
Honestly I think it would be better to just ignore this particular issue. It's
an issue with a header outside of QEMU and it will go away in time when Mesa is eventually updated.
Yes; I have been ignoring this warning for a while now in my scripts that handle looking for warnings in build logs:
thanks
-- PMM
Quoted 10 lines · Peter Maydell
Quoted 9 lines · Brad Smith
Unfortunately that issue has only been fixed very recently.
There is a possibility of us updating from Mesa 17.3.9 to 18.3.x which would bring in this header fix, but I don't know how long that will be and it's currently held up on us switching i386 from bfd ld to lld.
Quoted 7 lines
Quoted 7 lines
So this header exists as is from 6.0 to the latest, most likely next release (6.5) too.
Honestly I think it would be better to just ignore this particular issue. It's
an issue with a header outside of QEMU and it will go away in time when Mesa is eventually updated.
Yeah, fine by me.
Quoted 5 lines
Yes; I have been ignoring this warning for a while now in my scripts that handle looking for warnings in build logs:
Thanks, useful tip.
I liked:
+ grep -v 'is almost always misused' | \ + grep -v 'is often misused' | \ + grep -v 'is dangerous; do not use it' | \
:)
Quoted 4 lines
thanks
-- PMM