Skip to content

Commit 1134c68

Browse files
committed
lib/ExtUtils/MM_Darwin.pm: Unbreak Perl build
On modern macOS the compiler defaults to '-Werror,-Wimplicit-function-declaration' This breaks the build on code which calls a function without a prototype (invalid in C99). Turning the check off with '-Wno-error=implicit-function-declaration' breaks the build of Perl itself on legacy versions of Darwin with compilers which do not recognise the flags. Removing it allows Perl to once again build on Mac OS X as old as 10.4 with GCC 4.0.1.
1 parent 694b7c7 commit 1134c68

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

lib/ExtUtils/MM_Darwin.pm

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,4 @@ sub init_dist {
4646
$self->SUPER::init_dist(@_);
4747
}
4848

49-
=head3 cflags
50-
51-
Over-ride Apple's automatic setting of -Werror
52-
53-
=cut
54-
55-
sub cflags {
56-
my($self,$libperl)=@_;
57-
return $self->{CFLAGS} if $self->{CFLAGS};
58-
return '' unless $self->needs_linking();
59-
60-
my $base = $self->SUPER::cflags($libperl);
61-
62-
foreach (split /\n/, $base) {
63-
/^(\S*)\s*=\s*(\S*)$/ and $self->{$1} = $2;
64-
};
65-
$self->{CCFLAGS} .= " -Wno-error=implicit-function-declaration";
66-
67-
return $self->{CFLAGS} = qq{
68-
CCFLAGS = $self->{CCFLAGS}
69-
OPTIMIZE = $self->{OPTIMIZE}
70-
PERLTYPE = $self->{PERLTYPE}
71-
};
72-
}
73-
7449
1;

0 commit comments

Comments
 (0)