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
6 changed files with 42 additions and 12 deletions

View File

@@ -21,6 +21,7 @@ def build(bld):
obj.source = hardour_sources
obj.target = 'hardour-' + bld.env['VERSION']
obj.includes = ['.']
obj.linkflags= ''
obj.use = [ 'libpbd',
'libardour',
'libardour_cp',
@@ -51,11 +52,13 @@ def build(bld):
if sys.platform == 'darwin':
obj.uselib += ' AUDIOUNITS OSX'
obj.use += ' libappleutility'
elif bld.env['build_target'] == 'mingw':
if bld.env['DEBUG'] == False:
obj.linkflags += ' -mwindows'
else:
obj.linkflags += ' -zexecstack'
obj.includes += ['../libs']
if bld.env['build_target'] == 'mingw':
if bld.env['DEBUG'] == False:
obj.linkflags = ['-mwindows']
if bld.is_defined('NEED_INTL'):
obj.linkflags = ' -lintl'
obj.linkflags += ' -lintl'