[Libreoffice-commits] .: solenv/bin

Caolán McNamara caolan at kemper.freedesktop.org
Mon Jul 4 04:16:42 PDT 2011


 solenv/bin/gccinstlib.pl |   23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

New commits:
commit f0a3667b99d83f9d6f45e85c7d3ae8a381be4ee8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 4 12:09:30 2011 +0100

    Try and copy from versioned libgcc if possible, fallback to unversioned if not
    
    On Fedora 13 multilib ppc, the unversioned libgcc.so is a ld script
    to point to the "real" one, so its unsuitable for inclusion in the
    install set.

diff --git a/solenv/bin/gccinstlib.pl b/solenv/bin/gccinstlib.pl
index d8eda1c..4d81021 100755
--- a/solenv/bin/gccinstlib.pl
+++ b/solenv/bin/gccinstlib.pl
@@ -43,13 +43,22 @@ if ($Dest =~ /--help/ || @ARGV < 1) {
 
 foreach $File (@ARGV) {
     my $string;
-    my $normalized_file = $File;
-    $normalized_file =~ s/\.so\.\d+/.so/;
-    open (GCCOut, "LANGUAGE=C LC_ALL=C $cc -print-file-name=$normalized_file|") || die "Failed to exec $cc -print-file-name=$normalized_file $!";
-    $string=<GCCOut>;
-    chomp ($string);
-    $SrcAndDest{$string} = "$Dest/$File";
-    close (GCCOut);
+
+    my $NormFile = $File;
+    $NormFile =~ s/\.so\.\d+/.so/;
+    @search = ($File, $NormFile);
+
+    foreach $entry (@search) {
+        open (GCCOut, "LANGUAGE=C LC_ALL=C $cc -print-file-name=$entry|") ||
+            next;
+        $string=<GCCOut>;
+        chomp ($string);
+        close (GCCOut);
+        if (-e $string) {
+            $SrcAndDest{$string} = "$Dest/$File";
+            last;
+        }
+    }
 }
 
 while (($Src, $FullDest) = each %SrcAndDest) {


More information about the Libreoffice-commits mailing list