Make sure to save compiler optimization flags from foo-config scripts (#1887)

python-config on openSUSE needs -O2 to match -D_FORTIFY_SOURCE

Fixes #1886
This commit is contained in:
Matt Selsky 2016-12-28 10:21:09 +00:00 committed by ita1024
parent b97681c110
commit dcc0a6a917
1 changed files with 3 additions and 0 deletions

View File

@ -216,6 +216,9 @@ def parse_flags(self, line, uselib_store, env=None, force_static=False, posix=No
app('LINKFLAGS', tmp)
elif x.endswith(('.a', '.so', '.dylib', '.lib')):
appu('LINKFLAGS', x) # not cool, #762
elif x.startswith('-O'):
app('CFLAGS', x)
app('CXXFLAGS', x)
@conf
def validate_cfg(self, kw):