Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[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.


git-svn-id: https://svn.parrot.org/parrot/trunk@37823 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
commit 110c52f2784536d6e019b87a80087816ba0d19e6 1 parent 970ab79
@allisonrandal allisonrandal authored
View
10 Configure.pl
@@ -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 @@ =head2 Compile Options
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.
View
11 config/inter/libparrot.pm
@@ -34,6 +34,7 @@ sub _init {
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 @@ sub runstep {
# 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 @@ sub runstep {
# 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')
: ''
View
3  lib/Parrot/Configure/Options/Conf.pm
@@ -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 @@ Compile Options:
--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
View
3  lib/Parrot/Configure/Options/Conf/Shared.pm
@@ -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 @@ our @shared_valid_options = qw{
datadir
debugging
define
+ disable-rpath
exec-prefix
execcapable
fatal
Please sign in to comment.
Something went wrong with that request. Please try again.