Set executable stack flag when linking

This is required on some modern hardneded Linux systems to allow
to dlopen executable objects (load plugins).

https://discourse.ardour.org/t/tls-1295-lea-so-linux-vers-doesnt-work/111778/20?u=x42
This commit is contained in:
Robin Gareus 2025-05-11 15:58:00 +02:00
parent 1c0882ba56
commit ec5b06e63d
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
6 changed files with 42 additions and 12 deletions

View file

@ -34,6 +34,7 @@ def build(bld):
obj.source = 'luasession.cc'
obj.target = 'luasession'
obj.includes = ['../libs']
obj.linkflags = ''
obj.use = ['liblua',
'libpbd',
'libardour',
@ -66,12 +67,13 @@ def build(bld):
if sys.platform == 'darwin':
obj.uselib += ' AUDIOUNITS OSX'
obj.use += ' libappleutility'
if bld.env['build_target'] == 'mingw':
obj.linkflags = ['-mwindows']
elif bld.env['build_target'] == 'mingw':
obj.linkflags += ' -mwindows'
else:
obj.linkflags += ' -zexecstack'
if bld.is_defined('NEED_INTL'):
obj.linkflags = ' -lintl'
obj.linkflags += ' -lintl'
if bld.env['build_target'] == 'mingw':
obj.install_path = bld.env['BINDIR']