diff options
3 files changed, 35 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 44b0b35b42..f443c7800f 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -117,6 +117,10 @@ class Qt(Package): patch('qt4-gcc8.3-asm-volatile-fix.patch', when='@4') patch('qt5-gcc8.3-asm-volatile-fix.patch', when='@5.0.0:5.12.1') + # patch overflow builtins + patch('qt5_11-intel-overflow.patch', when='@5.11') + patch('qt5_12-intel-overflow.patch', when='@5.12:') + # Build-only dependencies depends_on("pkgconfig", type='build') depends_on("flex", when='+webkit', type='build') @@ -135,6 +139,7 @@ class Qt(Package): depends_on("gtkplus", when='+gtk') depends_on("openssl", when='+ssl') depends_on("sqlite", when='+sql', type=('build', 'run')) + depends_on("sqlite+column_metadata", when='+sql%intel', type=('build', 'run')) depends_on("libpng@1.2.57", when='@3') depends_on("pcre+multibyte", when='@5.0:5.8') @@ -160,7 +165,8 @@ class Qt(Package): depends_on("xcb-util-keysyms") depends_on("xcb-util-renderutil") depends_on("xcb-util-wm") - depends_on("libxext", when='@3:4.99') + depends_on("libxext") + depends_on("libxrender") conflicts('+framework', msg="QT cannot be built as a framework except on macOS.") else: @@ -342,7 +348,11 @@ class Qt(Package): config_args.append('-no-openssl') if '+sql' in self.spec: - config_args.append('-system-sqlite') + sqlite = self.spec['sqlite'] + config_args.extend([ + '-system-sqlite', + '-R', '{0}'.format(sqlite.prefix.lib), + ]) else: comps = ['db2', 'ibase', 'oci', 'tds', 'mysql', 'odbc', 'psql', 'sqlite', 'sqlite2'] @@ -504,7 +514,7 @@ class Qt(Package): '-no-directfb', '-{0}gtk{1}'.format( '' if '+gtk' in spec else 'no-', - '' if version >= Version('5.8') else 'style') + '' if version >= Version('5.7') else 'style') ]) if MACOS_VERSION: diff --git a/var/spack/repos/builtin/packages/qt/qt5_11-intel-overflow.patch b/var/spack/repos/builtin/packages/qt/qt5_11-intel-overflow.patch new file mode 100644 index 0000000000..5bb0b1e03e --- /dev/null +++ b/var/spack/repos/builtin/packages/qt/qt5_11-intel-overflow.patch @@ -0,0 +1,11 @@ +--- a/qtbase/src/corelib/global/qnumeric_p.h 2018-11-25 06:51:11.000000000 -0600 ++++ b/qtbase/src/corelib/global/qnumeric_p.h 2020-01-07 14:13:12.103818264 -0600 +@@ -168,7 +168,7 @@ + // size_t. Implementations for 8- and 16-bit types will work but may not be as + // efficient. Implementations for 64-bit may be missing on 32-bit platforms. + +-#if (defined(Q_CC_GNU) && (Q_CC_GNU >= 500) || (defined(Q_CC_INTEL) && !defined(Q_OS_WIN))) || QT_HAS_BUILTIN(__builtin_add_overflowx) ++#if (defined(Q_CC_GNU) && (Q_CC_GNU >= 500) && !defined(Q_CC_INTEL) || (defined(Q_CC_INTEL) && (Q_CC_INTEL >= 1800) && (Q_CC_GNU >= 500) && !defined(Q_OS_WIN))) || QT_HAS_BUILTIN(__builtin_add_overflowx) + // GCC 5, ICC 18, and Clang 3.8 have builtins to detect overflows + + template <typename T> inline diff --git a/var/spack/repos/builtin/packages/qt/qt5_12-intel-overflow.patch b/var/spack/repos/builtin/packages/qt/qt5_12-intel-overflow.patch new file mode 100644 index 0000000000..bfe5c8e4f3 --- /dev/null +++ b/var/spack/repos/builtin/packages/qt/qt5_12-intel-overflow.patch @@ -0,0 +1,11 @@ +--- a/qtbase/src/corelib/global/qnumeric_p.h 2019-08-31 03:29:31.000000000 -0500 ++++ b/qtbase/src/corelib/global/qnumeric_p.h 2020-01-06 14:23:40.719851927 -0600 +@@ -231,7 +231,7 @@ + // size_t. Implementations for 8- and 16-bit types will work but may not be as + // efficient. Implementations for 64-bit may be missing on 32-bit platforms. + +-#if (defined(Q_CC_GNU) && (Q_CC_GNU >= 500) || (defined(Q_CC_INTEL) && !defined(Q_OS_WIN))) || QT_HAS_BUILTIN(__builtin_add_overflow) ++#if (defined(Q_CC_GNU) && (Q_CC_GNU >= 500) && !defined(Q_CC_INTEL) || (defined(Q_CC_INTEL) && (Q_CC_INTEL >= 1800) && (Q_CC_GNU >= 500) && !defined(Q_OS_WIN))) || QT_HAS_BUILTIN(__builtin_add_overflow) + // GCC 5, ICC 18, and Clang 3.8 have builtins to detect overflows + + template <typename T> inline |