diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2012-07-12 19:21:01 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2012-07-12 19:21:01 +0000 |
commit | 79a8825ce8d1d5aefcbde645718cf83f90f0119c (patch) | |
tree | f15f0454e2093ac99bcea2e033f1f610e6f76bd5 /usr.bin/libtool/LT/LaFile.pm | |
parent | e703878bcb4dd3f9a073c667dedce5c76550ae84 (diff) |
common code for deducing libraries.
Still fucks up order somehow...
Diffstat (limited to 'usr.bin/libtool/LT/LaFile.pm')
-rw-r--r-- | usr.bin/libtool/LT/LaFile.pm | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/usr.bin/libtool/LT/LaFile.pm b/usr.bin/libtool/LT/LaFile.pm index a2a1aa93358..df80e4bdf8b 100644 --- a/usr.bin/libtool/LT/LaFile.pm +++ b/usr.bin/libtool/LT/LaFile.pm @@ -1,4 +1,4 @@ -# $OpenBSD: LaFile.pm,v 1.15 2012/07/12 11:43:46 espie Exp $ +# $OpenBSD: LaFile.pm,v 1.16 2012/07/12 19:21:00 espie Exp $ # Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org> # Copyright (c) 2012 Marc Espie <espie@openbsd.org> @@ -319,14 +319,7 @@ sub link } else { push @libflags, '-Wl,-no-whole-archive' if $prev_was_archive; $prev_was_archive = 0; - my $lib = basename($a); - if ($lib =~ m/^lib(.*)\.so(\.\d+){2}/) { - $lib = $1; - } else { - say "warning: cannot derive -l flag from library filename $a, assuming hash key -l$k"; - $lib = $k; - } - push @libflags, "-l$lib"; + push @libflags, $linker->infer_libparameter($a, $k); } $libcounter++; } |