qt: replace conflicts('%gcc@11:', when='@5.9:5.14') with -include limits (#27241)
Noting that missing numeric_limits was the cause of the compile issues with gcc-11, I tested adding -include limits fixing @5.9:5.14%gcc@11. Therefore, we can replace the conflicts('%gcc@11:', when='@5.9:5.14'). Co-authored-by: Bernhard Kaindl <bernhard.kaindl@ait.ac.at>
This commit is contained in:
parent
549bd70449
commit
d9d1319442
@ -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 @@ def conf(name):
|
||||
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/);
|
||||
|
Loading…
Reference in New Issue
Block a user