diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-04-27 17:56:34 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-07-30 11:31:29 +0200 |
commit | dfef7e5043ea07d18f882547566d0a06b7b68ea8 (patch) | |
tree | 2327c8bc29483e381294a2195943d8a648379167 /Makefile.SH | |
parent | 669d990be35a6a02b9d7ab8487aaba1d37bad180 (diff) | |
download | perl-dfef7e5043ea07d18f882547566d0a06b7b68ea8.tar.gz |
No need to prefix $(LDLIBPTH) when running $(CC) to link perl and miniperl.
When perl is build with a shared perl library, $(LDLIBPTH) is used to prefix
the appropriate LD_LIBRARY_PATH=... before commands in the Makefile so that
the uninstalled ./perl will be able to find it.
Commit c4f23d77f4b3486a (in May 1998) added the code for LDLIBPTH, but also
added it to the default command line used to invoke $(CC) to link perl and
miniperl. These commands don't need to run ./perl, hence the use of
$(LDLIBPTH) is superfluous here. Removing it makes the code simpler.
$(LDLIBPTH) was first removed in commit d182087b9c1b8811 (April 2003), but
that change was reverted by commit f913803b6e67ae4c (in Aug 2003) as part of
an attempt to fix problems reported by a perl smoker on a platform where the
C compiler is actually a Perl wrapper script. However, from subsequent
discussion it seems that the reversion didn't actually fix the problem, and
both the documentation of LD_LIBRARY_PATH and attempting to replicate the
smoker's setup suggest that this particular change is independent of the
problem. I can't replicate the smoker's reported problems building a shared
library perl with (or without) this commit on a current Power Linux machine
using a Perl script to wrap the C compiler, where the #! line on that Perl
script is an install of perl 5.8.0 also using a shared perl library. Hence
I'm confident that this change is independent of the true cause of the
smoker's problems. See the discussion in RT #23212 for more details.
Diffstat (limited to 'Makefile.SH')
-rwxr-xr-x | Makefile.SH | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.SH b/Makefile.SH index 15b32fd964..9d44c2c96d 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -900,7 +900,7 @@ lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl $spitshell >>$Makefile <<'!NO!SUBS!' lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl -@rm -f miniperl.xok - $(LDLIBPTH) $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \ + $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \ $(mini_obj) $(libs) $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' $(MINIPERL) -f write_buildcustomize.pl @@ -912,7 +912,7 @@ lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl $(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) write_buildcustomize.pl -@rm -f miniperl.xok - $(SHRPENV) $(LDLIBPTH) $(CC) -o perl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) + $(SHRPENV) $(CC) -o perl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) # Microperl. This is just a convenience thing if one happens to # build also the full Perl and therefore the real big Makefile: |