summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2013-06-06 21:27:07 +0200
committerRobin Gareus <robin@gareus.org>2013-06-06 21:27:07 +0200
commit53c6c714cd139df9debadad9008e1e49badf3479 (patch)
tree699b4b59305bb0dcf11a992ddd434a66e097826a /wscript
parentff2273aaa85e4d50421273e4a34a3815ef776c79 (diff)
disable symbol export -- fix LinuxVST issue
-rdynamic: Pass the flag -export-dynamic to the ELF linker, on targets that support it. This instructs the linker to add all symbols, not only used ones, to the dynamic symbol table. This option is needed for some uses of dlopen or to allow obtaining backtraces from within a program. Some LinuxVST pluging cause ardour3 to crash -- if ardour is linked with -rdynamic (see #ardour log from 2013-jun-6). This is likely compiler specific and not a problem on las' build-machine (gcc 4.5.5) which is why the linux-packaging script enables it by default. The issue can be reproduced reliably with gcc 4.7.2 and 4.6.3. Although it is yet unclear if it is caused by g++/ld or related to other factors of the build-system...
Diffstat (limited to 'wscript')
-rw-r--r--wscript9
1 files changed, 7 insertions, 2 deletions
diff --git a/wscript b/wscript
index 93f2912edb..dc0279be8c 100644
--- a/wscript
+++ b/wscript
@@ -106,12 +106,14 @@ def set_compiler_flags (conf,opt):
platform = u[0].lower()
version = u[2]
+ # waf adds -O0 -g itself. thanks waf!
is_clang = conf.env['CXX'][0].endswith('clang++')
if opt.gprofile:
debug_flags = [ '-pg' ]
- else:
+
+ if opt.backtrace:
if platform != 'darwin' and not is_clang:
- debug_flags = [ '-rdynamic' ] # waf adds -O0 -g itself. thanks waf!
+ debug_flags = [ '-rdynamic' ]
# Autodetect
if opt.dist_target == 'auto':
@@ -377,6 +379,8 @@ def options(opt):
help='The user-visible name of the program being built')
opt.add_option('--arch', type='string', action='store', dest='arch',
help='Architecture-specific compiler flags')
+ opt.add_option('--backtrace', action='store_true', default=False, dest='backtrace',
+ help='Compile with -rdynamic -- allow obtaining backtraces from within Ardour')
opt.add_option('--no-carbon', action='store_true', default=False, dest='nocarbon',
help='Compile without support for AU Plugins with only CARBON UI (needed for 64bit)')
opt.add_option('--boost-sp-debug', action='store_true', default=False, dest='boost_sp_debug',
@@ -668,6 +672,7 @@ const char* const ardour_config_info = "\\n\\
write_config_text('Build documentation', conf.env['DOCS'])
write_config_text('Debuggable build', conf.env['DEBUG'])
+ write_config_text('Export all symbols (backtrace)', opts.backtrace)
write_config_text('Install prefix', conf.env['PREFIX'])
write_config_text('Strict compiler flags', conf.env['STRICT'])
write_config_text('Internal Shared Libraries', conf.is_defined('INTERNAL_SHARED_LIBS'))