From 777438f7fc620861e011917cbbff150c65d46425 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Fri, 18 May 2007 11:27:20 +0100 Subject: [PATCH 1/2] WAF: the correct form of the rpath option should be -rpath, not --rpath; fixed. --- src/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wscript b/src/wscript index 45d10365f..0c01fc06f 100644 --- a/src/wscript +++ b/src/wscript @@ -42,7 +42,7 @@ def build(bld): if sys.platform == 'win32': os.environ["PATH"] = ';'.join([os.environ["PATH"], node.abspath(env)]) else: - env.append_value('RPATH', '-Wl,--rpath=%s' % (node.abspath(env),)) + env.append_value('RPATH', '-Wl,-rpath=%s' % (node.abspath(env),)) bld.add_subdirs(all_modules) From 8d9a65d2262511d1fb9f757b121bf45deb7189c4 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Fri, 18 May 2007 16:09:13 +0100 Subject: [PATCH 2/2] WAF: enable -rpath by default only on linux2, with configure options to override this default choice --- src/wscript | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/wscript b/src/wscript index 0c01fc06f..362a7c003 100644 --- a/src/wscript +++ b/src/wscript @@ -17,17 +17,20 @@ all_modules = [ def set_options(opt): opt.sub_options('simulator') + opt.add_option('--enable-rpath', + help=("Link programs with rpath"), + action="store_true", dest='enable_rpath', + default=(sys.platform != 'linux2')) opt.add_option('--disable-rpath', help=("Don't link programs with rpath"), - action="store_true", default=False, - dest='disable_rpath') - + action="store_false", dest='enable_rpath', + default=(sys.platform != 'linux2')) def configure(conf): conf.sub_config('core') conf.sub_config('simulator') - conf.env['DISABLE_RPATH'] = Params.g_options.disable_rpath + conf.env['ENABLE_RPATH'] = Params.g_options.enable_rpath def build(bld): @@ -36,7 +39,7 @@ def build(bld): ## Note: this is slightly evil; we get away because our programs ## and libs are not supposed to be installed system wide. env = bld.env_of_name('default') - if not env['DISABLE_RPATH']: + if not env['ENABLE_RPATH']: for module in all_modules: node = bld.m_curdirnode.find_dir(module) if sys.platform == 'win32':