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

@@ -1,5 +1,6 @@
#!/usr/bin/env python
import os
import sys
def options(opt):
pass
@@ -10,6 +11,7 @@ def configure(conf):
def build(bld):
if bld.env['build_target'] == 'mingw':
return
obj = bld (features = 'c cprogram')
obj.source = 'exec_wrapper.c'
obj.target = 'ardour-exec-wrapper'
@@ -18,3 +20,8 @@ def build(bld):
'_POSIX_SOURCE',
'_XOPEN_SOURCE=500',
]
if sys.platform == 'darwin':
pass
else:
obj.linkflags = ' -zexecstack'