[packages/qt6] add patch to fix linking when building with avx and gcc14
atler
atler at pld-linux.org
Sat Sep 28 18:32:24 CEST 2024
commit 37f296ea1e10cef6573564d1a4792a9bc28b2ee5
Author: Jan Palus <atler at pld-linux.org>
Date: Sat Sep 28 18:30:55 2024 +0200
add patch to fix linking when building with avx and gcc14
from gentoo
qt6.spec | 2 ++
qtquick3d-6.6.2-gcc14.patch | 23 +++++++++++++++++++++++
2 files changed, 25 insertions(+)
---
diff --git a/qt6.spec b/qt6.spec
index c404ab3..1a91ba8 100644
--- a/qt6.spec
+++ b/qt6.spec
@@ -115,6 +115,7 @@ Patch2: %{name}-gn.patch
Patch3: no-implicit-sse2.patch
Patch4: x32.patch
Patch5: qtwebengine-cmake-build-type.patch
+Patch6: qtquick3d-6.6.2-gcc14.patch
URL: https://www.qt.io/
%{?with_directfb:BuildRequires: DirectFB-devel}
BuildRequires: EGL-devel
@@ -3671,6 +3672,7 @@ narzędzia.
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1 -d qtquick3d
%{__sed} -i -e 's,usr/X11R6/,usr/,g' qtbase/mkspecs/linux-g++-64/qmake.conf
diff --git a/qtquick3d-6.6.2-gcc14.patch b/qtquick3d-6.6.2-gcc14.patch
new file mode 100644
index 0000000..f636264
--- /dev/null
+++ b/qtquick3d-6.6.2-gcc14.patch
@@ -0,0 +1,23 @@
+Qt undefs __AVX__ and others[1] to prevent bundled embree from using
+AVX/SSE4.2 code paths and result in linking errors, but this appears
+insufficient with gcc14[2].
+
+Until Qt improves this, for simplicity pass -mno-* to bundled embree
+as a workaround which lets the compiler disable these instead and
+that includes other features which depend on these.
+
+(note that embree is only used on amd64 and aarch64)
+
+Ideal would be to unbundle this and let system embree use the full
+feature set, but there is no machinery to easily allow it.
+
+[1] https://github.com/qt/qtquick3d/commit/7980cfd0
+[2] https://bugs.gentoo.org/917407
+--- a/src/3rdparty/embree/CMakeLists.txt
++++ b/src/3rdparty/embree/CMakeLists.txt
+@@ -64,2 +64,5 @@
+ # Use SSE2 only, ignore AVX/SSE4.2 for now
++if (TEST_architecture_arch STREQUAL x86_64)
++ qt_internal_extend_target(BundledEmbree COMPILE_OPTIONS -mno-avx -mno-sse4.2)
++endif()
+ qt_internal_extend_target(BundledEmbree DEFINES
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/qt6.git/commitdiff/37f296ea1e10cef6573564d1a4792a9bc28b2ee5
More information about the pld-cvs-commit
mailing list