This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move ExtUtils::CBuilder from ext/ to cpan/
[perl5.git] / cpan / ExtUtils-CBuilder / lib / ExtUtils / CBuilder / Platform / darwin.pm
diff --git a/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm b/cpan/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm
new file mode 100644 (file)
index 0000000..45c03a8
--- /dev/null
@@ -0,0 +1,22 @@
+package ExtUtils::CBuilder::Platform::darwin;
+
+use strict;
+use ExtUtils::CBuilder::Platform::Unix;
+
+use vars qw($VERSION @ISA);
+$VERSION = '0.2602';
+@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
+
+sub compile {
+  my $self = shift;
+  my $cf = $self->{config};
+
+  # -flat_namespace isn't a compile flag, it's a linker flag.  But
+  # it's mistakenly in Config.pm as both.  Make the correction here.
+  local $cf->{ccflags} = $cf->{ccflags};
+  $cf->{ccflags} =~ s/-flat_namespace//;
+  $self->SUPER::compile(@_);
+}
+
+
+1;