Skip to content
Permalink
Browse files

Allow setting --no-relocatable different than moar with respect to rp…

…ath.
  • Loading branch information...
patzim committed Feb 12, 2019
1 parent 9e63da4 commit a542ec941370b20ee066b11e687843b0f59decde
Showing with 8 additions and 5 deletions.
  1. +5 −1 Configure.pl
  2. +3 −4 tools/build/Makefile-Moar.in
@@ -310,7 +310,11 @@

$errors{moar}{'no gen-nqp'} = @errors && !defined $options{'gen-nqp'};

$config{ldrpath} = $options{'no-relocatable'} ? $nqp_config{'moar::ldrpath'} : $nqp_config{'moar::ldrpath_relocatable'};
# Strip rpath from ldflags so we can set it differently ourself.
$config{ldflags} = join(' ', $nqp_config{'moar::ldflags'}, $nqp_config{'moar::ldmiscflags'}, $nqp_config{'moar::ldoptiflags'}, $nqp_config{'moar::ldlibs'});
$config{ldflags} =~ s/\Q$nqp_config{'moar::ldrpath'}\E ?//;
$config{ldflags} =~ s/\Q$nqp_config{'moar::ldrpath_relocatable'}\E ?//;
$config{ldflags} .= ' ' . ($options{'no-relocatable'} ? $nqp_config{'moar::ldrpath'} : $nqp_config{'moar::ldrpath_relocatable'});

if ($win) {
if ($prefix . $slash . 'bin' ne $nqp_config{'moar::libdir'}) {
@@ -1,8 +1,7 @@
M_CC = @moar::cc@
M_LD = @moar::ld@
M_CFLAGS = @moar::cflags@ @moar::ccmiscflags@ @moar::ccoptiflags@ @moar::ccwarnflags@
M_LDFLAGS = @moar::ldflags@ @moar::ldmiscflags@ @moar::ldoptiflags@ @moar::ldlibs@
M_LDRPATH = @ldrpath@
M_LDFLAGS = @ldflags@
M_C_RUNNER_LIBS = @c_runner_libs@
M_MINGW_UNICODE = @mingw_unicode@

@@ -229,14 +228,14 @@ $(M_C_RUNNER): src/vm/moar/runner/main.c
# Using only the pkgconfig moar includes does not work, because moar.h assumes all the specific includes below.
$(M_CC) @moar::ccshared@ @static_nqp_home_define@ @static_perl6_home_define@ $(M_CFLAGS) $(M_LDFLAGS) -I$(M_INCPATH) -I$(M_INCPATH)/moar \
-I$(M_INCPATH)/libatomic_ops -I$(M_INCPATH)/dyncall -I$(M_INCPATH)/sha1 -I$(M_INCPATH)/tinymt -I$(M_INCPATH)/libtommath -I$(M_INCPATH)/libuv \
-L@moar::libdir@ $(M_LDRPATH) $(M_MINGW_UNICODE) @moar::ccout@$@ src/vm/moar/runner/main.c -lmoar $(M_C_RUNNER_LIBS)
-L@moar::libdir@ $(M_MINGW_UNICODE) @moar::ccout@$@ src/vm/moar/runner/main.c -lmoar $(M_C_RUNNER_LIBS)

$(M_C_DEBUG_RUNNER): src/vm/moar/runner/main.c
$(RM_F) $(M_C_DEBUG_RUNNER)
# Using only the pkgconfig moar includes does not work, because moar.h assumes all the specific includes below.
$(M_CC) @moar::ccshared@ @static_nqp_home_define@ @static_perl6_home_define@ -DMOAR_PERL6_RUNNER_DEBUG $(M_CFLAGS) $(M_LDFLAGS) -I$(M_INCPATH) -I$(M_INCPATH)/moar \
-I$(M_INCPATH)/libatomic_ops -I$(M_INCPATH)/dyncall -I$(M_INCPATH)/moar -I$(M_INCPATH)/sha1 -I$(M_INCPATH)/tinymt -I$(M_INCPATH)/libtommath -I$(M_INCPATH)/libuv \
-L@moar::libdir@ $(M_LDRPATH) $(M_MINGW_UNICODE) @moar::ccout@$@ src/vm/moar/runner/main.c -lmoar $(M_C_RUNNER_LIBS)
-L@moar::libdir@ $(M_MINGW_UNICODE) @moar::ccout@$@ src/vm/moar/runner/main.c -lmoar $(M_C_RUNNER_LIBS)


## testing targets

0 comments on commit a542ec9

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