summaryrefslogtreecommitdiff
path: root/solenv/bin
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-05-04 01:55:36 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2011-05-23 15:14:59 +0200
commitd977dace19c84931f1653cab67ef066c7f6cd8a4 (patch)
tree02332ffa457ff8b2e358d18cac93a7b3d7bc78dc /solenv/bin
parentdd22b2f2c6f8ca7211e9f4eff9d148dfb83eea24 (diff)
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
Diffstat (limited to 'solenv/bin')
-rwxr-xr-xsolenv/bin/gccinstlib.pl16
1 files changed, 10 insertions, 6 deletions
diff --git a/solenv/bin/gccinstlib.pl b/solenv/bin/gccinstlib.pl
index 90c8f02a3e06..654c95b7290a 100755
--- a/solenv/bin/gccinstlib.pl
+++ b/solenv/bin/gccinstlib.pl
@@ -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: $!";
}