incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1163062 - /incubator/ooo/trunk/main/solenv/bin/gccinstlib.pl
Date Tue, 30 Aug 2011 00:58:38 GMT
Author: erack
Date: Tue Aug 30 00:58:38 2011
New Revision: 1163062

URL: http://svn.apache.org/viewvc?rev=1163062&view=rev
Log:
always request an unversioned lib from gcc in gccinstlib.pl

* this otherwise breaks on ubuntu natty as there is (rightfully) no libgcc_s.so.1 file served
by gcc -print-file-name

-- Thanks to Bjoern Michaelsen <bjoern.michaelsen@canonical.com>

Modified:
    incubator/ooo/trunk/main/solenv/bin/gccinstlib.pl

Modified: incubator/ooo/trunk/main/solenv/bin/gccinstlib.pl
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/bin/gccinstlib.pl?rev=1163062&r1=1163061&r2=1163062&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/bin/gccinstlib.pl (original)
+++ incubator/ooo/trunk/main/solenv/bin/gccinstlib.pl Tue Aug 30 00:58:38 2011
@@ -38,19 +38,23 @@ if ($Dest =~ /--help/ || @ARGV < 1) {
     print "Syntax:\n  gcc-instlib <library-in-libpath ...> <destination-dir>\n";
     exit (0);
 }
+
+%SrcAndDest = ();
+
 foreach $File (@ARGV) {
     my $string;
-
-    open (GCCOut, "LANGUAGE=C LC_ALL=C $cc -print-file-name=$File|") || die "Failed to exec
$cc -print-file-name=$File $!";
+    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);
-    push (@CopySrc, $string);
+    $SrcAndDest{$string} = "$Dest/$File";
     close (GCCOut);
 }
 
-foreach $Src (@CopySrc) {
-    printf "copy $Src to $Dest\n";
-    system ("/bin/cp $Src $Dest") && die "copy failed: $!";
+while (($Src, $FullDest) = each %SrcAndDest) {
+    printf "copy $Src to $FullDest\n";
+    system ("/bin/cp $Src $FullDest") && die "copy failed: $!";
 }
 
 



Mime
View raw message