diff options
author | 2011-06-20 12:10:17 +0000 | |
---|---|---|
committer | 2011-06-20 12:10:17 +0000 | |
commit | a2325a293eac4366d982314b91b923fe15485b59 (patch) | |
tree | f57785baad3ffd602b30b8919704f51402e93155 | |
parent | document -Ddonttie, even though I only put it in for performance testing (diff) | |
download | wireguard-openbsd-a2325a293eac4366d982314b91b923fe15485b59.tar.xz wireguard-openbsd-a2325a293eac4366d982314b91b923fe15485b59.zip |
- implement --static, and preserve dependency order,
instead of search order when printing the libraries required for linking.
this now passes our --static regress tests and matches fd.o
-rw-r--r-- | usr.bin/pkg-config/pkg-config | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/pkg-config/pkg-config b/usr.bin/pkg-config/pkg-config index ba674af599a..70c9cf2820d 100644 --- a/usr.bin/pkg-config/pkg-config +++ b/usr.bin/pkg-config/pkg-config @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $OpenBSD: pkg-config,v 1.66 2011/06/16 08:38:30 jasper Exp $ +# $OpenBSD: pkg-config,v 1.67 2011/06/20 12:10:17 jasper Exp $ # $CSK: pkgconfig.pl,v 1.39 2006/11/27 16:26:20 ckuethe Exp $ # Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org> @@ -456,9 +456,15 @@ sub do_libs my $libs = []; + # In static mode, we have to make sure we print the libs in dependency + # order, not in search order. Ordering matters for static linking. foreach my $pkg (@$list) { my $l = $configs{$pkg}->get_property('Libs', $variables); push(@$libs, @$l) if defined $l; + if ($mode{static}) { + my $lp = $configs{$pkg}->get_property('Libs.private', $variables); + push(@$libs, @$lp) if defined $lp; + } } # Get the linker path directives (-L). |