File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -500,12 +500,14 @@ def init_env(
500
500
env_cflags = shlex .split (os .environ .get ('CFLAGS' , '' ))
501
501
env_cppflags = shlex .split (os .environ .get ('CPPFLAGS' , '' ))
502
502
env_ldflags = shlex .split (os .environ .get ('LDFLAGS' , '' ))
503
+ # Newer clang does not use -fno-plt leading to an error
504
+ no_plt = '-fno-plt' if test_compile (cc , '-fno-plt' , '-Werror' ) else ''
503
505
504
506
cflags_ = os .environ .get (
505
507
'OVERRIDE_CFLAGS' , (
506
508
f'-Wextra { float_conversion } -Wno-missing-field-initializers -Wall -Wstrict-prototypes { std } '
507
509
f' { werror } { optimize } { sanitize_flag } -fwrapv { stack_protector } { missing_braces } '
508
- f' -pipe -fvisibility=hidden -fno-plt '
510
+ f' -pipe -fvisibility=hidden { no_plt } '
509
511
)
510
512
)
511
513
cflags = shlex .split (cflags_ ) + shlex .split (
You can’t perform that action at this time.
0 commit comments