Skip to content

Commit 633c6c2

Browse files
committed
Unbreak Perl build on legacy Darwin systems
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. Bump version and document. This requires a similar change to cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm which will be handled separately.
1 parent 2cc10db commit 633c6c2

File tree

15 files changed

+26
-17
lines changed

15 files changed

+26
-17
lines changed

dist/ExtUtils-CBuilder/Changes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
Revision history for Perl extension ExtUtils::CBuilder.
22

3+
0.280239 - 2023-04-15
4+
5+
Fix:
6+
- Unbreak Perl build on legacy Darwin systems.
7+
On modern macOS the compiler defaults to
8+
'-Werror,-Wimplicit-function-declaration'. This breaks the build on code
9+
which calls a function without a prototype (invalid in C99).
10+
Turning the check off with '-Wno-error=implicit-function-declaration' breaks
11+
the build of Perl itself on legacy versions of Darwin with compilers which do
12+
not recognise the flags.
13+
https://github.com/Perl/perl5/issues/18902
14+
315
0.280238
416

517
Fix:

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use Perl::OSType qw/os_type/;
77

88
use warnings;
99
use strict;
10-
our $VERSION = '0.280238'; # VERSION
10+
our $VERSION = '0.280239'; # VERSION
1111
our @ISA;
1212

1313
# We only use this once - don't waste a symbol table entry on it.

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use Text::ParseWords;
99
use IPC::Cmd qw(can_run);
1010
use File::Temp qw(tempfile);
1111

12-
our $VERSION = '0.280238'; # VERSION
12+
our $VERSION = '0.280239'; # VERSION
1313

1414
# More details about C/C++ compilers:
1515
# http://developers.sun.com/sunstudio/documentation/product/compiler.jsp

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use warnings;
44
use strict;
55
use ExtUtils::CBuilder::Base;
66

7-
our $VERSION = '0.280238'; # VERSION
7+
our $VERSION = '0.280239'; # VERSION
88
our @ISA = qw(ExtUtils::CBuilder::Base);
99

1010
sub link_executable {

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use warnings;
44
use strict;
55
use ExtUtils::CBuilder::Base;
66

7-
our $VERSION = '0.280238'; # VERSION
7+
our $VERSION = '0.280239'; # VERSION
88
our @ISA = qw(ExtUtils::CBuilder::Base);
99

1010
use File::Spec::Functions qw(catfile catdir);

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use File::Spec;
88
use ExtUtils::CBuilder::Base;
99
use IO::File;
1010

11-
our $VERSION = '0.280238'; # VERSION
11+
our $VERSION = '0.280239'; # VERSION
1212
our @ISA = qw(ExtUtils::CBuilder::Base);
1313

1414
=begin comment

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package ExtUtils::CBuilder::Platform::Windows::BCC;
22

3-
our $VERSION = '0.280238'; # VERSION
3+
our $VERSION = '0.280239'; # VERSION
44

55
use strict;
66
use warnings;

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package ExtUtils::CBuilder::Platform::Windows::GCC;
22

3-
our $VERSION = '0.280238'; # VERSION
3+
our $VERSION = '0.280239'; # VERSION
44

55
use warnings;
66
use strict;

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package ExtUtils::CBuilder::Platform::Windows::MSVC;
22

3-
our $VERSION = '0.280238'; # VERSION
3+
our $VERSION = '0.280239'; # VERSION
44

55
use warnings;
66
use strict;

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/aix.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use strict;
55
use ExtUtils::CBuilder::Platform::Unix;
66
use File::Spec;
77

8-
our $VERSION = '0.280238'; # VERSION
8+
our $VERSION = '0.280239'; # VERSION
99
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
1010

1111
sub need_prelink { 1 }

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use File::Spec;
66
use ExtUtils::CBuilder::Platform::Unix;
77
use Config;
88

9-
our $VERSION = '0.280238'; # VERSION
9+
our $VERSION = '0.280239'; # VERSION
1010
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
1111

1212
# The Android linker will not recognize symbols from

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use strict;
55
use File::Spec;
66
use ExtUtils::CBuilder::Platform::Unix;
77

8-
our $VERSION = '0.280238'; # VERSION
8+
our $VERSION = '0.280239'; # VERSION
99
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
1010

1111
# TODO: If a specific exe_file name is requested, if the exe created

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use strict;
55
use ExtUtils::CBuilder::Platform::Unix;
66
use Config;
77

8-
our $VERSION = '0.280238'; # VERSION
8+
our $VERSION = '0.280239'; # VERSION
99
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
1010

1111
my ($osver) = split /\./, $Config{osvers};
@@ -20,9 +20,6 @@ sub compile {
2020
local $cf->{ccflags} = $cf->{ccflags};
2121
$cf->{ccflags} =~ s/-flat_namespace//;
2222

23-
# XCode 12 makes this fatal, breaking tons of XS modules
24-
$cf->{ccflags} .= ($cf->{ccflags} ? ' ' : '').'-Wno-error=implicit-function-declaration';
25-
2623
$self->SUPER::compile(@_);
2724
}
2825

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use strict;
55
use ExtUtils::CBuilder::Platform::Unix;
66
use File::Spec;
77

8-
our $VERSION = '0.280238'; # VERSION
8+
our $VERSION = '0.280239'; # VERSION
99
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
1010

1111
sub link_executable {

dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use warnings;
44
use strict;
55
use ExtUtils::CBuilder::Platform::Unix;
66

7-
our $VERSION = '0.280238'; # VERSION
7+
our $VERSION = '0.280239'; # VERSION
88
our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
99

1010
sub need_prelink { 1 }

0 commit comments

Comments
 (0)