diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2011-11-17 11:37:17 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2011-11-17 11:37:17 +0000 |
commit | 2bca9c0801e62fddbc2a5e667583465bbe1a8cf5 (patch) | |
tree | d1245503613a7b30592c677b620caf52fc7478e7 /usr.bin/pkg-config | |
parent | 7fb9b4282365003632c03fc464867f4d668e0a95 (diff) |
- Fix parts of xenocara on static arches such as vax.
reported by todd@ and sebastia@
tested by sebastia@ with xdm on vax.
Diffstat (limited to 'usr.bin/pkg-config')
-rw-r--r-- | usr.bin/pkg-config/pkg-config | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/usr.bin/pkg-config/pkg-config b/usr.bin/pkg-config/pkg-config index 02d10c8844e..21802a8da88 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.69 2011/07/08 18:57:41 jasper Exp $ +# $OpenBSD: pkg-config,v 1.70 2011/11/17 11:37:16 jasper Exp $ # $CSK: pkgconfig.pl,v 1.39 2006/11/27 16:26:20 ckuethe Exp $ # Copyright (c) 2006 Chris Kuethe <ckuethe@openbsd.org> @@ -19,6 +19,7 @@ use strict; use warnings; +use Config; use Getopt::Long; use File::Basename; use File::stat; @@ -104,6 +105,17 @@ GetOptions( 'debug' => \$mode{debug}, 'define-variable=s' => $variables, ); +# Unconditionally switch to static mode on static arches as --static +# may not have been passed explicitly, but we don't want to re-order +# and simplify the libs like we do for shared architectures. +{ + my @static_archs = qw(m88k vax); + my $machine_arch = $Config{'ARCH'}; + if (grep { $_ eq $machine_arch } @static_archs){ + $mode{static} = 1; + } +} + # Initial value of printerr depends on the options... if (!defined $mode{printerr}) { if (defined $mode{libs} @@ -208,7 +220,11 @@ if ($mode{variable}) { } } -my $dep_cfg_list = simplify_and_reverse($cfg_full_list); +my $dep_cfg_list = $cfg_full_list; + +if (!$mode{static}){ + $dep_cfg_list = simplify_and_reverse($cfg_full_list); +} if ($mode{cflags} || $mode{libs} || $mode{variable}) { push @vlist, do_cflags($dep_cfg_list) if $mode{cflags}; |