Marcus Holland-Moritz wrote:
> > Currently the .so produced by MakeMaker-generated makefiles come
> > with an empty rpath. This can cause some weird problems with
> > recent glibcs. So I propose the following path to MakeMaker,
> > that tests if LD_RUN_PATH is empty, and if it is, doesn't include
> > an rpath in the produced .so file.
> > 
> > It will break things for people who hack the LD_RUN_PATH in the
> > generated Makefile, but these people are evil anyway.
> > 
> I'd probably also remove the empty LD_RUN_PATH from the const_loadlibs
> section (only when it is empty, of course), or at least add a comment.

I've thus applied the following to bleadperl :

Change 23183 by [EMAIL PROTECTED] on 2004/08/02 09:16:13

        Remove empty rpath from .so files

Affected files ...

... //depot/perl/lib/ExtUtils/MM_Unix.pm#199 edit

Differences ...

==== //depot/perl/lib/ExtUtils/MM_Unix.pm#199 (text) ====

@@ -20,7 +20,7 @@
 
 use ExtUtils::MakeMaker qw($Verbose neatvalue);
 
-$VERSION = '1.45_01';
+$VERSION = '1.45_02';
 
 require ExtUtils::MM_Any;
 @ISA = qw(ExtUtils::MM_Any);
@@ -414,11 +414,18 @@
 };
     my($tmp);
     for $tmp (qw/
-        EXTRALIBS LDLOADLIBS BSLOADLIBS LD_RUN_PATH
+        EXTRALIBS LDLOADLIBS BSLOADLIBS
         /) {
        next unless defined $self->{$tmp};
        push @m, "$tmp = $self->{$tmp}\n";
     }
+    # don't set LD_RUN_PATH if empty
+    for $tmp (qw/
+        LD_RUN_PATH
+        /) {
+       next unless $self->{$tmp};
+       push @m, "$tmp = $self->{$tmp}\n";
+    }
     return join "", @m;
 }
 
@@ -1156,8 +1163,12 @@
         }
     }
 
+    my $ld_run_path_shell = "";
+    if ($self->{LD_RUN_PATH} ne "") {
+       $ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" ';
+    }
     push(@m,
-'      LD_RUN_PATH="$(LD_RUN_PATH)" $(LD) '.$ldrun.' $(LDDLFLAGS) '.$ldfrom.
+'      '.$ld_run_path_shell.'$(LD) '.$ldrun.' $(LDDLFLAGS) '.$ldfrom.
 ' $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) $(PERL_ARCHIVE) '.$libs.' $(PERL_ARCHIVE_AFTER) 
$(EXPORT_LIST) $(INST_DYNAMIC_FIX)');
     push @m, '
        $(CHMOD) $(PERM_RWX) $@

Reply via email to