Skip to content

Commit

Permalink
Merge pull request #2906 from vrurg/build-revamp
Browse files Browse the repository at this point in the history
Fix for `--no-relocatable` and OpenBSD build. 

Support for the latest changes in nqp-configure
  • Loading branch information
vrurg committed May 20, 2019
2 parents d41f162 + bf24af8 commit 6a7ac56
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 36 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/nqp-configure
2 changes: 1 addition & 1 deletion Configure.pl
Expand Up @@ -56,7 +56,7 @@ BEGIN
'prefix=s', 'libdir=s',
'sysroot=s', 'sdkroot=s',
'no-relocatable', 'backends=s',
'no-clean!', 'with-nqp=s',
'no-clean', 'with-nqp=s',
'gen-nqp:s', 'gen-moar:s',
'moar-option=s@', 'git-protocol=s',
'ignore-errors', 'make-install!',
Expand Down
6 changes: 2 additions & 4 deletions src/core/Process.pm6
Expand Up @@ -16,10 +16,8 @@ Rakudo::Internals.REGISTER-DYNAMIC: '$*EXECUTABLE', {
// $*VM.properties<perl6.prefix> ~ '/bin/perl6-j'
#?endif
#?if moar
# OpenBSD's security features prevent us from getting the path to our
# executable just given our PID by default.
(nqp::execname() unless $*VM.osname eq 'openbsd')
// ($*VM.config<prefix> ~ '/bin/'
nqp::execname()
|| ($*VM.config<prefix> ~ '/bin/'
~ ($*VM.config<osname> eq 'MSWin32' ?? 'perl6-m.bat' !! 'perl6-m'))
#?endif
#?if js
Expand Down
39 changes: 11 additions & 28 deletions tools/lib/NQP/Config/Rakudo.pm
Expand Up @@ -201,7 +201,7 @@ sub configure_moar_backend {
$config->{ldflags} =~ s/\Q$nqp_config->{'moar::ldrpath_relocatable'}\E ?//;
$config->{ldflags} .= ' '
. (
$config->{no_relocatable}
$self->{no_relocatable}
? $nqp_config->{'moar::ldrpath'}
: $nqp_config->{'moar::ldrpath_relocatable'}
);
Expand Down Expand Up @@ -312,27 +312,6 @@ sub configure_js_backend {
);
}

# Command line options not to be included into configure_opts config variable.
sub ignorable_opt {
my $self = shift;
my $opt = shift;
return $opt =~ /^
(?:
gen-
| (?:
help
| no-clean
| ignore-errors
| make-install
| expand
| out
| backends
)
$
)
/x;
}

# Returns all active language specification entries except for .c
sub perl6_specs {
my $self = shift;
Expand Down Expand Up @@ -437,14 +416,18 @@ sub gen_nqp {

return unless defined($gen_nqp) || defined($gen_moar);

my $backends = join ",", $self->active_backends;
my @cmd = (
$^X, 'Configure.pl', qq{--prefix=$prefix}, "--backends=$backends",
"--make-install", "--git-protocol=$git_protocol",
my @cmd = (
$^X, 'Configure.pl', qq{--prefix=$prefix}, "--make-install",
"--git-protocol=$git_protocol",
);

for my $opt (qw<git-depth git-reference github-user nqp-repo moar-repo>) {
push @cmd, qq{--$opt=$options->{$opt}} if $options->{$opt};
for my $opt (
qw<git-depth git-reference github-user nqp-repo moar-repo
no-relocatable ignore-errors>
)
{
my $opt_str = $self->make_option( $opt, no_quote => 1 );
push @cmd, $opt_str if $opt_str;
}

if ( defined $gen_moar ) {
Expand Down
4 changes: 2 additions & 2 deletions tools/templates/moar/Makefile.in
Expand Up @@ -333,12 +333,12 @@ m-install: m-all @@script(install-core-dist.p6)@@ $(SETTING_MOAR)
$(CP) $(PERL6_MOAR) $(PERL6_DEBUG_MOAR) @nfpq($(DESTDIR)$(PERL6_HOME)/runtime)@
$(MKPATH) @nfpq($(DESTDIR)$(PERL6_HOME)/runtime/dynext)@
$(CP) $(M_PERL6_OPS_DLL) @nfpq($(DESTDIR)$(PERL6_HOME)/runtime/dynext)@
$(CP) $(M_C_RUNNER) @nfpq($(DESTDIR)$(PREFIX)/bin/$(M_RUNNER))@
$(CP) $(M_C_DEBUG_RUNNER) @nfpq($(DESTDIR)$(PREFIX)/bin/$(M_DEBUG_RUNNER))@
@nfpq($(BASE_DIR)/$(M_BAT_RUNNER))@ @shquot(@script(upgrade-repository.p6)@)@ @q($(DESTDIR)$(PERL6_HOME))@
@nfpq($(BASE_DIR)/$(M_BAT_RUNNER))@ @shquot(@script(upgrade-repository.p6)@)@ @nfpq($(DESTDIR)$(PERL6_HOME)/vendor)@
@nfpq($(BASE_DIR)/$(M_BAT_RUNNER))@ @shquot(@script(upgrade-repository.p6)@)@ @nfpq($(DESTDIR)$(PERL6_HOME)/site)@
@nfpq($(BASE_DIR)/$(M_BAT_RUNNER))@ @shquot(@script(install-core-dist.p6)@)@ @q($(DESTDIR)$(PERL6_HOME))@
$(CP) $(M_C_RUNNER) @nfpq($(DESTDIR)$(PREFIX)/bin/$(M_RUNNER))@
$(CP) $(M_C_DEBUG_RUNNER) @nfpq($(DESTDIR)$(PREFIX)/bin/$(M_DEBUG_RUNNER))@
@expand(@m_install@)@

m-runner-default-install: m-install
Expand Down

0 comments on commit 6a7ac56

Please sign in to comment.