qt: Add support for compiling @5.15.14 with Intel oneAPI compilers (icx, icpx) (#45195)
This commit is contained in:
parent
67cb19614e
commit
e2b6eca420
@ -253,6 +253,11 @@ class Qt(Package):
|
||||
# https://doc.qt.io/qt-5.14/supported-platforms.html
|
||||
conflicts("%gcc@:4", when="@5.14:")
|
||||
|
||||
# Compiling with oneAPI compilers icx, icpx requires patching
|
||||
# This has only been tested for 5.15.14 so far
|
||||
conflicts("%oneapi", when="@:5.15.13")
|
||||
patch("qt51514-oneapi.patch", when="@5.15.14: %oneapi")
|
||||
|
||||
# Non-macOS dependencies and special macOS constraints
|
||||
if MACOS_VERSION is None:
|
||||
with when("+gui"):
|
||||
@ -282,6 +287,10 @@ class Qt(Package):
|
||||
# Mapping for compilers/systems in the QT 'mkspecs'
|
||||
compiler_mapping = {
|
||||
"intel": ("icc",),
|
||||
# This only works because we apply patch "qt51514-oneapi.patch"
|
||||
# above that replaces calls to "icc" with calls to "icx" in
|
||||
# qtbase/mkspecs/*
|
||||
"oneapi": ("icc",),
|
||||
"apple-clang": ("clang-libc++", "clang"),
|
||||
"clang": ("clang-libc++", "clang"),
|
||||
"aocc": ("clang-libc++", "clang"),
|
||||
|
31
var/spack/repos/builtin/packages/qt/qt51514-oneapi.patch
Normal file
31
var/spack/repos/builtin/packages/qt/qt51514-oneapi.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- a/qtbase/mkspecs/common/icc-base-unix.conf 2024-05-07 23:17:16.000000000 -0600
|
||||
+++ b/qtbase/mkspecs/common/icc-base-unix.conf 2024-07-10 21:32:47.808327220 -0600
|
||||
@@ -16,7 +16,7 @@
|
||||
QMAKE_CFLAGS_OPTIMIZE = -O2
|
||||
QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os
|
||||
|
||||
-QMAKE_CC = icc
|
||||
+QMAKE_CC = icx
|
||||
QMAKE_LEX = flex
|
||||
QMAKE_LEXFLAGS =
|
||||
QMAKE_YACC = yacc
|
||||
@@ -61,7 +61,7 @@
|
||||
QMAKE_CFLAGS_SHANI += -msha
|
||||
QMAKE_CFLAGS_VAES += -mvaes
|
||||
|
||||
-QMAKE_CXX = icpc
|
||||
+QMAKE_CXX = icpx
|
||||
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
|
||||
QMAKE_CXXFLAGS_APP = $$QMAKE_CFLAGS_APP
|
||||
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
|
||||
@@ -92,8 +92,8 @@
|
||||
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
|
||||
QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
|
||||
|
||||
-QMAKE_LINK = icpc
|
||||
-QMAKE_LINK_SHLIB = icpc
|
||||
+QMAKE_LINK = icpx
|
||||
+QMAKE_LINK_SHLIB = icpx
|
||||
QMAKE_LFLAGS =
|
||||
QMAKE_LFLAGS_RELEASE =
|
||||
QMAKE_LFLAGS_DEBUG =
|
Loading…
Reference in New Issue
Block a user