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