diff options
author | Jack Lloyd <[email protected]> | 2021-04-16 20:13:38 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2021-04-16 20:13:38 -0400 |
commit | 4db392ef15c6566c1d991b3d321e3421c74d3ae4 (patch) | |
tree | 8f1bd4022f8f8be352c52dd1c67ac2272cb3d055 /configure.py | |
parent | 04fc4b81f0ef44bcfe3a64ffd45bb61f0a92b60d (diff) |
Fix detection of linker flags (GH #2715)
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.py b/configure.py index a79f672ec..39b397927 100755 --- a/configure.py +++ b/configure.py @@ -3040,8 +3040,14 @@ def canonicalize_options(options, info_os, info_arch): options.fuzzer_lib = 'Fuzzer' if options.ldflags is not None: - libs = [m.group(1) for m in re.finditer(r'-l([a-z0-9]+)', options.ldflags)] - options.extra_libs += ','.join(libs) + extra_libs = [] + link_to_lib = re.compile('^-l(.*)') + for flag in options.ldflags.split(' '): + match = link_to_lib.match(flag) + if match: + extra_libs.append(match.group(1)) + + options.extra_libs += ','.join(extra_libs) # Checks user options for consistency # This method DOES NOT change options on behalf of the user but explains |