Perl-Toolchain-Gang / ExtUtils-MakeMaker

Perl module to make Makefiles and build modules (what backs Makefile.PL)
https://metacpan.org/release/ExtUtils-MakeMaker
64 stars 76 forks source link

fix Darwin cflags override #380

Closed haarg closed 3 years ago

haarg commented 3 years ago

The cflags method is what initially populates the internal CCFLAGS option if it is not set. If we set it ourselves before calling the parent cflags method, we don't pick up any of the values it wants to set in it. This would prevent the hints from $Config{ccflags} being carried through. In core, it would prevent Time::HiRes from building because of the missing -DPERL_DARWIN option.

Follow the pattern of other OS cflags overrides and call the parent cflags first, then modify its output and the values set.

This is an alternative to #379