summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
diff options
context:
space:
mode:
authorafresh1 <afresh1@openbsd.org>2019-02-13 21:15:00 +0000
committerafresh1 <afresh1@openbsd.org>2019-02-13 21:15:00 +0000
commit9f11ffb7133c203312a01e4b986886bc88c7d74b (patch)
tree6618511204c614b20256e4ef9dea39a7b311d638 /gnu/usr.bin/perl/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
parentImport perl-5.28.1 (diff)
downloadwireguard-openbsd-9f11ffb7133c203312a01e4b986886bc88c7d74b.tar.xz
wireguard-openbsd-9f11ffb7133c203312a01e4b986886bc88c7d74b.zip
Fix merge issues, remove excess files - match perl-5.28.1 dist
looking good sthen@, Great! bluhm@
Diffstat (limited to 'gnu/usr.bin/perl/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm')
-rw-r--r--gnu/usr.bin/perl/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm23
1 files changed, 17 insertions, 6 deletions
diff --git a/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm b/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
index 60b2f432dfb..9f8427f6de2 100644
--- a/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
+++ b/gnu/usr.bin/perl/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
@@ -1,5 +1,4 @@
package ExtUtils::CBuilder::Base;
-$ExtUtils::CBuilder::Base::VERSION = '0.280225';
use strict;
use warnings;
use File::Spec;
@@ -10,6 +9,8 @@ use Text::ParseWords;
use IPC::Cmd qw(can_run);
use File::Temp qw(tempfile);
+our $VERSION = '0.280230'; # VERSION
+
# More details about C/C++ compilers:
# http://developers.sun.com/sunstudio/documentation/product/compiler.jsp
# http://gcc.gnu.org/
@@ -45,16 +46,26 @@ sub new {
if defined $ENV{LDFLAGS};
unless ( exists $self->{config}{cxx} ) {
- my ($ccpath, $ccbase, $ccsfx ) = fileparse($self->{config}{cc}, qr/\.[^.]*/);
+
+ my ($ccbase, $ccpath, $ccsfx ) = fileparse($self->{config}{cc}, qr/\.[^.]*/);
+
+ ## If the path is just "cc", fileparse returns $ccpath as "./"
+ $ccpath = "" if $self->{config}{cc} =~ /^$ccbase$ccsfx$/;
+
foreach my $cxx (@{$cc2cxx{$ccbase}}) {
- if( can_run( File::Spec->catfile( $ccpath, $cxx, $ccsfx ) ) ) {
- $self->{config}{cxx} = File::Spec->catfile( $ccpath, $cxx, $ccsfx );
+ my $cxx1 = File::Spec->catfile( $ccpath, $cxx . $ccsfx);
+
+ if( can_run( $cxx1 ) ) {
+ $self->{config}{cxx} = $cxx1;
last;
}
- if( can_run( File::Spec->catfile( $cxx, $ccsfx ) ) ) {
- $self->{config}{cxx} = File::Spec->catfile( $cxx, $ccsfx );
+ my $cxx2 = $cxx . $ccsfx;
+
+ if( can_run( $cxx2 ) ) {
+ $self->{config}{cxx} = $cxx2;
last;
}
+
if( can_run( $cxx ) ) {
$self->{config}{cxx} = $cxx;
last;