libelf: fix build with clang16+ (#38915)
libelf fails to build with clang16+ due to Wimplicit-int and Wimplicit-function-declarations becoming errors by default. This breaks the configuration stage, so no build takes place. This patch fixes this by passing -Wno-error=implicit-int and -Wno-error=implicit-function-declarations as cflags.
This commit is contained in:
parent
eb19f59fb1
commit
8bdfaf4ae5
@ -50,3 +50,10 @@ def configure_args(self):
|
|||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
make("install", parallel=False)
|
make("install", parallel=False)
|
||||||
|
|
||||||
|
def flag_handler(self, name, flags):
|
||||||
|
if name == "cflags":
|
||||||
|
if self.spec.satisfies("%clang@16:"):
|
||||||
|
flags.append("-Wno-error=implicit-int")
|
||||||
|
flags.append("-Wno-error=implicit-function-declaration")
|
||||||
|
return (flags, None, None)
|
||||||
|
Loading…
Reference in New Issue
Block a user