Add -pie for parse_flags #1936

This commit is contained in:
Thomas Nagy 2017-04-01 09:29:00 +02:00
parent e503375cb0
commit bffa757bae
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
1 changed files with 3 additions and 1 deletions

View File

@ -199,7 +199,7 @@ def parse_flags(self, line, uselib_store, env=None, force_static=False, posix=No
static = True
elif x == '-Wl,-Bdynamic' or x == '-Bdynamic':
static = False
elif x.startswith('-Wl') or x == '-rdynamic':
elif x.startswith('-Wl') or x in ('-rdynamic', '-pie'):
app('LINKFLAGS', x)
elif x.startswith(('-m', '-f', '-dynamic', '-O')):
app('CFLAGS', x)
@ -216,6 +216,8 @@ 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
else:
self.to_log('Unhandled flag %r' % x)
@conf
def validate_cfg(self, kw):