You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by er...@apache.org on 2011/08/30 02:58:38 UTC
svn commit: r1163062 - /incubator/ooo/trunk/main/solenv/bin/gccinstlib.pl
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 <bj...@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: $!";
}