wget: fixing compilation issue with gcc11+ on rhel7 (#30858)
This commit is contained in:
parent
a05e729e1b
commit
37426e41cb
@ -53,6 +53,16 @@ class Wget(AutotoolsPackage, GNUMirrorPackage):
|
|||||||
|
|
||||||
build_directory = 'spack-build'
|
build_directory = 'spack-build'
|
||||||
|
|
||||||
|
def flag_handler(self, name, flags):
|
||||||
|
# gcc11 defaults to c17, which breaks compilation with older
|
||||||
|
# glibc versions as shipped with rhel7 and likely other OS
|
||||||
|
# versions too, feel free to add as necessary
|
||||||
|
older_glibc = self.spec.satisfies('os=rhel7') or \
|
||||||
|
self.spec.satisfies('os=centos7')
|
||||||
|
if self.spec.satisfies('%gcc@11:') and older_glibc and name.lower() == 'cflags':
|
||||||
|
flags.append(self.compiler.c11_flag)
|
||||||
|
return (None, None, flags)
|
||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user