summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index 3ae30033dc..2b96ddde3d 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -143,8 +143,7 @@ class Qt(Package):
working_dir='qtwebsockets',
when='@5.14: %gcc@11:')
conflicts('%gcc@10:', when='@5.9:5.12.6 +opengl')
- # Error: 'numeric_limits' is not a class template
- conflicts('%gcc@11:', when='@5.8:5.14')
+ conflicts('%gcc@11:', when='@5.8')
# Build-only dependencies
depends_on("pkgconfig", type='build')
@@ -418,6 +417,11 @@ class Qt(Package):
filter_file('^QMAKE_LFLAGS_NOUNDEF .*', 'QMAKE_LFLAGS_NOUNDEF = ',
conf('g++-unix'))
+ # https://gcc.gnu.org/gcc-11/porting_to.html: add -include limits
+ if self.spec.satisfies('@5.9:5.14%gcc@11:'):
+ with open(conf('gcc-base'), 'a') as f:
+ f.write("QMAKE_CXXFLAGS += -include limits\n")
+
if self.spec.satisfies('@4'):
# The gnu98 flag is necessary to build with GCC 6 and other modern
# compilers (see http://stackoverflow.com/questions/10354371/);