libelf: fix build with GCC 14 (#45226)

This commit is contained in:
Michael Kuhn 2024-07-15 10:18:36 +02:00 committed by GitHub
parent 3bf1a03760
commit 0752d94bbf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,7 +55,7 @@ def install(self, spec, prefix):
def flag_handler(self, name, flags): def flag_handler(self, name, flags):
if name == "cflags": if name == "cflags":
if self.spec.satisfies("%clang@16:"): if self.spec.satisfies("%clang@16:") or self.spec.satisfies("%gcc@14:"):
flags.append("-Wno-error=implicit-int") flags.append("-Wno-error=implicit-int")
flags.append("-Wno-error=implicit-function-declaration") flags.append("-Wno-error=implicit-function-declaration")
return (flags, None, None) return (flags, None, None)