Skip to content
Permalink
Browse files

Don't special case OpenBSD in relocatability handling

Relocatability is disabled entirely on OpenBSD, because of technical
difficulties. So no need to put hacks in to make it work in relocatable
mode.
Also simplify logic a bit more. Should still do the same as before.
  • Loading branch information...
patzim committed Apr 24, 2019
1 parent 1db7e4b commit 0c8f269f8127d80005ff1db8753dab4a5fb74c1e
Showing with 7 additions and 33 deletions.
  1. +3 −16 src/main.nqp
  2. +4 −17 src/perl6-debug.nqp
@@ -23,26 +23,13 @@ my $config := nqp::backendconfig();
my $sep := $config<osname> eq 'MSWin32' ?? '\\' !! '/';
#?if jvm
my $execname := nqp::atkey(nqp::jvmgetproperties,'perl6.execname');
my $install-dir := $execname ne ''
?? nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1))
!! $comp.config<prefix>;
#?endif
#?if moar
#?if !jvm
my $execname := nqp::execname();
my $install-dir := $config<osname> eq 'openbsd'
?? $comp.config<prefix>
!! $execname ne ''
?? nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1))
!! $comp.config<prefix>;
#?endif
#?if js
my $execname := nqp::execname();
my $install-dir := $config<osname> eq 'openbsd'
my $install-dir := $execname eq ''
?? $comp.config<prefix>
!! $execname ne ''
?? nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1))
!! $comp.config<prefix>;
#?endif
!! nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1));

my $perl6-home := $comp.config<static_perl6_home>
// nqp::getenvhash()<PERL6_HOME>
@@ -471,26 +471,13 @@ sub MAIN(*@ARGS) {
my $sep := $config<osname> eq 'MSWin32' ?? '\\' !! '/';
#?if jvm
my $execname := nqp::atkey(nqp::jvmgetproperties,'perl6.execname');
my $install-dir := $execname ne ''
?? nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1))
!! $comp.config<prefix>;
#?endif
#?if moar
#?if !jvm
my $execname := nqp::execname();
my $install-dir := $config<osname> eq 'openbsd'
?? $config<prefix> ~ '/bin/perl6-m'
!! $execname ne ''
?? nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1))
!! $comp.config<prefix>;
#?endif
#?if js
my $execname := nqp::execname();
my $install-dir := $config<osname> eq 'openbsd'
?? $config<prefix> ~ '/bin/perl6-js'
!! $execname ne ''
?? nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1))
!! $comp.config<prefix>;
#?endif
my $install-dir := $execname eq ''
?? $comp.config<prefix>
!! nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1));

my $perl6-home := $comp.config<static_perl6_home>
// nqp::getenvhash()<PERL6_HOME>

0 comments on commit 0c8f269

Please sign in to comment.
You can’t perform that action at this time.