Print a warning if a lib isn't found in %libs so we don't try to use

an uninitialized variable.

steven agrees
This commit is contained in:
bernd 2008-10-28 11:31:48 +00:00
parent 5817ed2550
commit f2d591ad64

View File

@ -1,5 +1,5 @@
#!/usr/bin/perl
# $OpenBSD: libtool,v 1.31 2008/10/28 11:16:27 bernd Exp $
# $OpenBSD: libtool,v 1.32 2008/10/28 11:31:48 bernd Exp $
# Copyright (c) 2007-2008 Steven Mestdagh <steven@openbsd.org>
#
@ -1052,6 +1052,10 @@ sub linkcmds
$cmd = "ar cru $dst";
$cmd .= " @$objs" if (@$objs);
foreach my $k (@finalorderedlibs) {
unless (defined $libs{$k}) {
print "library $k not found in \%libs\n" if $D;
next;
}
my $a = $libs{$k};
if ($a =~ m/\.a$/ && $a !~ m/_pic\.a/) {
# extract objects from archive