diff options
author | David Tardon <dtardon@redhat.com> | 2011-10-24 13:52:57 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-10-24 13:57:09 +0200 |
commit | f17c10545fabefd027b278798840706f2dbf4a04 (patch) | |
tree | dd30485fd02495c77fe960795a7a09387394bb44 /solenv | |
parent | I give up on --enable-dbgutil with MSVC (diff) | |
download | core-f17c10545fabefd027b278798840706f2dbf4a04.tar.gz core-f17c10545fabefd027b278798840706f2dbf4a04.zip |
create links to gdb autoloaders in the right dir
Diffstat (limited to 'solenv')
-rwxr-xr-x | solenv/bin/linkoo | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/solenv/bin/linkoo b/solenv/bin/linkoo index 1c22cb083a60..c39237f6dcfb 100755 --- a/solenv/bin/linkoo +++ b/solenv/bin/linkoo @@ -341,11 +341,34 @@ sub evilness($) } } +sub do_link_gdb_py($$$) +{ + my $srcdir = shift; + my $libdir = shift; + my $loader = shift; + + my $lib = $loader =~ s/-gdb.py$//r; + my $destdir = $libdir; + # Autoloader for a library is looked for in the same directory the library + # is (the library, not a symlink to it). Therefore it does not help to link + # it from solver into install, because there is only a symlink in install + # anyway. Instead, we must follow the link. + if (-l "$libdir/$lib") { + $destdir = readlink ("$libdir/$lib"); + $destdir =~ s@/[^/]*$@@; + } + + if ($destdir ne $srcdir) { + do_link ($srcdir, $destdir, $loader, $loader, 1); + } +} + sub link_gdb_py() { return if ($TARGET eq 'wntgcci.pro'); print "Special gdb.py helpers case: "; + my $dirh; my @basis; my @ure; @@ -365,10 +388,10 @@ sub link_gdb_py() print STDERR "Warning: missing helpful python debug helpers\n"; } else { for my $c (@basis) { - do_link ($src, "$OOO_INSTALL/program", $c, $c, 1); + do_link_gdb_py ($src, "$OOO_INSTALL/program", $c); } for my $c (@ure) { - do_link ($src, "$OOO_INSTALL/ure/lib", $c, $c, 1); + do_link_gdb_py ($src, "$OOO_INSTALL/ure/lib", $c); } } print "\n"; |