[svn:parrot] r37823 - in trunk: . config/inter lib/Parrot/Configure/Options lib/Parrot/Configure/Options/Conf
allison at svn.parrot.org
allison at svn.parrot.org
Tue Mar 31 01:11:42 UTC 2009
Author: allison
Date: Tue Mar 31 01:11:41 2009
New Revision: 37823
URL: https://trac.parrot.org/parrot/changeset/37823
Log:
[build] Add a --disable-rpath option to allow Linux packagers to build
Parrot binaries and libraries without -rpath in the linking flags.
Resolves TT #476.
Modified:
trunk/Configure.pl
trunk/config/inter/libparrot.pm
trunk/lib/Parrot/Configure/Options/Conf.pm
trunk/lib/Parrot/Configure/Options/Conf/Shared.pm
Modified: trunk/Configure.pl
==============================================================================
--- trunk/Configure.pl Mon Mar 30 23:03:24 2009 (r37822)
+++ trunk/Configure.pl Tue Mar 31 01:11:41 2009 (r37823)
@@ -1,6 +1,6 @@
#! perl
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2009, Parrot Foundation.
# $Id$
use 5.008;
@@ -274,6 +274,14 @@
Use the given loader flags for shared libraries
+=item C<--disable-rpath>
+
+Specify that rpath should not be included in linking flags. With this
+configuration option, you must append the library build directory
+(usually blib/lib) to the LD_LIBRARY_PATH environment variable (or your
+platform equivalent). This option is primarily used for building Linux
+packages.
+
=item C<--lex=(lexer)>
Specify which lexer to use.
Modified: trunk/config/inter/libparrot.pm
==============================================================================
--- trunk/config/inter/libparrot.pm Mon Mar 30 23:03:24 2009 (r37822)
+++ trunk/config/inter/libparrot.pm Tue Mar 31 01:11:41 2009 (r37823)
@@ -34,6 +34,7 @@
sub runstep {
my ( $self, $conf ) = @_;
my $parrot_is_shared = $conf->options->get('parrot_is_shared');
+ my $disable_rpath = $conf->options->get('disable-rpath');
$parrot_is_shared = integrate(
$conf->data->get('parrot_is_shared'),
@@ -97,8 +98,9 @@
# Set -rpath (or equivalent) for executables to find the
# shared libparrot in the build directory.
- $conf->data->set(
- rpath_blib => ( $parrot_is_shared && $conf->data->get('rpath') )
+ $conf->data->set( rpath_blib => ( ! $disable_rpath
+ && $parrot_is_shared
+ && $conf->data->get('rpath') )
? $conf->data->get('rpath')
. $conf->data->get('build_dir')
. $conf->data->get('slash')
@@ -108,8 +110,9 @@
# Set -rpath (or equivalent) for the installed executables to find the
# installed shared libparrot.
- $conf->data->set(
- rpath_lib => ( $parrot_is_shared && $conf->data->get('rpath') )
+ $conf->data->set( rpath_lib => ( ! $disable_rpath
+ && $parrot_is_shared
+ && $conf->data->get('rpath') )
? $conf->data->get('rpath')
. $conf->data->get('libdir')
: ''
Modified: trunk/lib/Parrot/Configure/Options/Conf.pm
==============================================================================
--- trunk/lib/Parrot/Configure/Options/Conf.pm Mon Mar 30 23:03:24 2009 (r37822)
+++ trunk/lib/Parrot/Configure/Options/Conf.pm Tue Mar 31 01:11:41 2009 (r37823)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2008, Parrot Foundation.
+# Copyright (C) 2007-2009, Parrot Foundation.
# $Id$
package Parrot::Configure::Options::Conf;
@@ -62,6 +62,7 @@
--optimize Optimized compile
--optimize=flags Add given optimizer flags
--parrot_is_shared Link parrot dynamically
+ --disable-rpath Link without rpath (user must set LD_LIBRARY_PATH)
--m=32 Build 32bit executable on 64-bit architecture.
--profile Turn on profiled compile (gcc only for now)
--cage [CAGE] compile includes many additional warnings
Modified: trunk/lib/Parrot/Configure/Options/Conf/Shared.pm
==============================================================================
--- trunk/lib/Parrot/Configure/Options/Conf/Shared.pm Mon Mar 30 23:03:24 2009 (r37822)
+++ trunk/lib/Parrot/Configure/Options/Conf/Shared.pm Tue Mar 31 01:11:41 2009 (r37823)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2008, Parrot Foundation.
+# Copyright (C) 2007-2009, Parrot Foundation.
# $Id$
package Parrot::Configure::Options::Conf::Shared;
@@ -21,6 +21,7 @@
datadir
debugging
define
+ disable-rpath
exec-prefix
execcapable
fatal
More information about the parrot-commits
mailing list