Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/ExtUtils/MM_Darwin.pm: Unbreak Perl build #444

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sevan
Copy link
Contributor

@sevan sevan commented Apr 15, 2023

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.

@Leont
Copy link
Member

Leont commented Apr 15, 2023

Given that the entire cflags method didn't exist in MM_Darwin until a07d951, I'm wondering if we shouldn't remove it entirely. @haarg?

@haarg
Copy link
Member

haarg commented Apr 17, 2023

Yeah, it looks like the method should just be removed.

@sevan
Copy link
Contributor Author

sevan commented Apr 17, 2023

Ah ok, propagating CFLAGS is no longer a requirement?
8537a20

@haarg
Copy link
Member

haarg commented Apr 17, 2023

They will be handled properly by the parent method. The extra work was only needed because they were being modified, which is being removed.

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.
@sevan
Copy link
Contributor Author

sevan commented Apr 17, 2023

Method removed.

@haarg
Copy link
Member

haarg commented Apr 18, 2023

This is the other half of Perl/perl5#21023.

As I commented on that ticket, I think this is generally a good change, but it will break a number of XS modules. The original ticket that added this has some commentary: https://rt.cpan.org/Ticket/Display.html?id=133493. With the upcoming perl 5.38 release, I'm not sure when the best time to make these changes is.

@sevan
Copy link
Contributor Author

sevan commented Apr 18, 2023

The fixes for the affected modules is a trivial one line fix to prototype each defined function. Is there a list of the modules which break?

@haarg
Copy link
Member

haarg commented Apr 18, 2023

There is not - we should probably look into doing some smoke runs to find out. While a fix may be trivial, getting releases done for all of the modules likely won't be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants