From 4a296214dd14e36df7614e6e8eb27fffa22cd400 Mon Sep 17 00:00:00 2001 From: Karim Pinter Date: Mon, 17 Mar 2025 16:35:44 +0200 Subject: [PATCH] Add support for using static EGL libraries on VxWorks On VxWorks there is dlopen, but the feature can be turned off for static builds, so Qt can use EGL even when dlopen is not present. In qeglplatformcontext.cpp dlsym needs dlopen feature. There is no dlopen on windows neither on Integrity. Task-number: QTBUG-134671 Pick-to: 6.8 Change-Id: I7ced5f53ca21a8b0ceb25732ed4b1dc6c0bb1300 Reviewed-by: Janne Roine Reviewed-by: Laszlo Agocs Reviewed-by: Kimmo Ollila Reviewed-by: Alexey Edelev (cherry picked from commit 3c919b6d0df486b7319faf8e4f366ab457e9f852) Reviewed-by: Qt Cherry-pick Bot --- src/gui/configure.cmake | 2 +- src/gui/opengl/platform/egl/qeglplatformcontext.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake index 26434f82044..7449739db27 100644 --- a/src/gui/configure.cmake +++ b/src/gui/configure.cmake @@ -908,7 +908,7 @@ qt_feature("openvg" PUBLIC ) qt_feature("egl" PUBLIC LABEL "EGL" - CONDITION ( QT_FEATURE_opengl OR QT_FEATURE_openvg ) AND EGL_FOUND AND ( QT_FEATURE_dlopen OR NOT UNIX OR INTEGRITY ) + CONDITION ( QT_FEATURE_opengl OR QT_FEATURE_openvg ) AND EGL_FOUND AND ( QT_FEATURE_dlopen OR NOT UNIX OR INTEGRITY OR VXWORKS) ) qt_feature_definition("egl" "QT_NO_EGL" NEGATE VALUE "1") qt_feature("egl_x11" PRIVATE diff --git a/src/gui/opengl/platform/egl/qeglplatformcontext.cpp b/src/gui/opengl/platform/egl/qeglplatformcontext.cpp index af7cb0c9983..5eb61386f45 100644 --- a/src/gui/opengl/platform/egl/qeglplatformcontext.cpp +++ b/src/gui/opengl/platform/egl/qeglplatformcontext.cpp @@ -431,7 +431,7 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName) { eglBindAPI(m_api); QFunctionPointer proc = (QFunctionPointer) eglGetProcAddress(procName); -#if !defined(Q_OS_WIN) && !defined(Q_OS_INTEGRITY) +#if QT_CONFIG(dlopen) if (!proc) proc = (QFunctionPointer) dlsym(RTLD_DEFAULT, procName); #elif !defined(QT_OPENGL_DYNAMIC)