| 1 |
diff -up perl-5.10.0/lib/ExtUtils/MM_Unix.pm.Fedora perl-5.10.0/lib/ExtUtils/MM_Unix.pm
|
| 2 |
--- perl-5.10.0/lib/ExtUtils/MM_Unix.pm.Fedora 2007-12-21 11:03:28.000000000 -0500
|
| 3 |
+++ perl-5.10.0/lib/ExtUtils/MM_Unix.pm 2007-12-21 11:04:27.000000000 -0500
|
| 4 |
@@ -945,7 +945,7 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $
|
| 5 |
}
|
| 6 |
|
| 7 |
my $ld_run_path_shell = "";
|
| 8 |
- if ($self->{LD_RUN_PATH} ne "") {
|
| 9 |
+ if (($self->{LD_RUN_PATH} ne "") && ($self->{USE_MM_LD_RUN_PATH})) {
|
| 10 |
$ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" ';
|
| 11 |
}
|
| 12 |
|
| 13 |
diff -up perl-5.10.0/lib/ExtUtils/Liblist.pm.Fedora perl-5.10.0/lib/ExtUtils/Liblist.pm
|
| 14 |
--- perl-5.10.0/lib/ExtUtils/Liblist.pm.Fedora 2007-12-21 11:04:36.000000000 -0500
|
| 15 |
+++ perl-5.10.0/lib/ExtUtils/Liblist.pm 2007-12-21 11:05:15.000000000 -0500
|
| 16 |
@@ -89,6 +89,11 @@ libraries. LD_RUN_PATH is a colon separ
|
| 17 |
in LDLOADLIBS. It is passed as an environment variable to the process
|
| 18 |
that links the shared library.
|
| 19 |
|
| 20 |
+Fedora extension: This generation of LD_RUN_PATH is disabled by default.
|
| 21 |
+To use the generated LD_RUN_PATH for all links, set the USE_MM_LD_RUN_PATH
|
| 22 |
+MakeMaker object attribute / argument, (or set the $USE_MM_LD_RUN_PATH
|
| 23 |
+environment variable).
|
| 24 |
+
|
| 25 |
=head2 BSLOADLIBS
|
| 26 |
|
| 27 |
List of those libraries that are needed but can be linked in
|
| 28 |
diff -up perl-5.10.0/lib/ExtUtils/MakeMaker.pm.Fedora perl-5.10.0/lib/ExtUtils/MakeMaker.pm
|
| 29 |
--- perl-5.10.0/lib/ExtUtils/MakeMaker.pm.Fedora 2007-12-21 10:59:52.000000000 -0500
|
| 30 |
+++ perl-5.10.0/lib/ExtUtils/MakeMaker.pm 2007-12-21 11:03:16.000000000 -0500
|
| 31 |
@@ -245,7 +245,7 @@ sub full_setup {
|
| 32 |
PERL_SRC PERM_RW PERM_RWX
|
| 33 |
PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE PPM_INSTALL_EXEC
|
| 34 |
PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
|
| 35 |
- SIGN SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
|
| 36 |
+ SKIP TYPEMAPS USE_MM_LD_RUN_PATH VERSION VERSION_FROM XS XSOPT XSPROTOARG
|
| 37 |
XS_VERSION clean depend dist dynamic_lib linkext macro realclean
|
| 38 |
tool_autosplit
|
| 39 |
|
| 40 |
@@ -384,7 +384,28 @@ sub new {
|
| 41 |
print join(" ", map { "perl($_)>=$self->{PREREQ_PM}->{$_} " }
|
| 42 |
sort keys %{$self->{PREREQ_PM}}), "\n";
|
| 43 |
exit 0;
|
| 44 |
- }
|
| 45 |
+ }
|
| 46 |
+
|
| 47 |
+ # USE_MM_LD_RUN_PATH - another RedHatism to disable automatic RPATH generation
|
| 48 |
+ if ( ( ! $self->{USE_MM_LD_RUN_PATH} )
|
| 49 |
+ &&( ("@ARGV" =~ /\bUSE_MM_LD_RUN_PATH(=([01]))?\b/)
|
| 50 |
+ ||( exists( $ENV{USE_MM_LD_RUN_PATH} )
|
| 51 |
+ &&( $ENV{USE_MM_LD_RUN_PATH} =~ /([01])?$/ )
|
| 52 |
+ )
|
| 53 |
+ )
|
| 54 |
+ )
|
| 55 |
+ {
|
| 56 |
+ my $v = $1;
|
| 57 |
+ if( $v )
|
| 58 |
+ {
|
| 59 |
+ $v = ($v=~/=([01])$/)[0];
|
| 60 |
+ }else
|
| 61 |
+ {
|
| 62 |
+ $v = 1;
|
| 63 |
+ };
|
| 64 |
+ $self->{USE_MM_LD_RUN_PATH}=$v;
|
| 65 |
+ };
|
| 66 |
+
|
| 67 |
|
| 68 |
print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose;
|
| 69 |
if (-f "MANIFEST" && ! -f "Makefile"){
|
| 70 |
@@ -2159,6 +2180,40 @@ precedence. A typemap in the current di
|
| 71 |
precedence, even if it isn't listed in TYPEMAPS. The default system
|
| 72 |
typemap has lowest precedence.
|
| 73 |
|
| 74 |
+=item USE_MM_LD_RUN_PATH
|
| 75 |
+
|
| 76 |
+boolean
|
| 77 |
+The Fedora perl MakeMaker distribution differs from the standard
|
| 78 |
+upstream release in that it disables use of the MakeMaker generated
|
| 79 |
+LD_RUN_PATH by default, UNLESS this attribute is specified , or the
|
| 80 |
+USE_MM_LD_RUN_PATH environment variable is set during the MakeMaker run.
|
| 81 |
+
|
| 82 |
+The upstream MakeMaker will set the ld(1) environment variable LD_RUN_PATH
|
| 83 |
+to the concatenation of every -L ld(1) option directory in which a -l ld(1)
|
| 84 |
+option library is found, which is used as the ld(1) -rpath option if none
|
| 85 |
+is specified. This means that, if your application builds shared libraries
|
| 86 |
+and your MakeMaker application links to them, that the absolute paths of the
|
| 87 |
+libraries in the build tree will be inserted into the RPATH header of all
|
| 88 |
+MakeMaker generated binaries, and that such binaries will be unable to link
|
| 89 |
+to these libraries if they do not still reside in the build tree directories
|
| 90 |
+(unlikely) or in the system library directories (/lib or /usr/lib), regardless
|
| 91 |
+of any LD_LIBRARY_PATH setting. So if you specified -L../mylib -lmylib , and
|
| 92 |
+ your 'libmylib.so' gets installed into /some_directory_other_than_usr_lib,
|
| 93 |
+ your MakeMaker application will be unable to link to it, even if LD_LIBRARY_PATH
|
| 94 |
+is set to include /some_directory_other_than_usr_lib, because RPATH overrides
|
| 95 |
+LD_LIBRARY_PATH.
|
| 96 |
+
|
| 97 |
+So for Fedora MakeMaker builds LD_RUN_PATH is NOT generated by default for
|
| 98 |
+every link. You can still use explicit -rpath ld options or the LD_RUN_PATH
|
| 99 |
+environment variable during the build to generate an RPATH for the binaries.
|
| 100 |
+
|
| 101 |
+You can set the USE_MM_LD_RUN_PATH attribute to 1 on the MakeMaker command
|
| 102 |
+line or in the WriteMakefile arguments to enable generation of LD_RUN_PATH
|
| 103 |
+for every link command.
|
| 104 |
+
|
| 105 |
+USE_MM_LD_RUN_PATH will default to 1 (LD_RUN_PATH will be used) IF the
|
| 106 |
+$USE_MM_LD_RUN_PATH environment variable is set during a MakeMaker run.
|
| 107 |
+
|
| 108 |
=item VENDORPREFIX
|
| 109 |
|
| 110 |
Like PERLPREFIX, but only for the vendor install locations.
|