Page MenuHomePhabricator

Disable calls to *_finite and other glibc-only functions on Musl.

Authored by efriedma on Aug 26 2018, 11:40 PM.

Diff Detail


Event Timeline

raj.khem created this revision.Aug 26 2018, 11:40 PM
dalias added a subscriber: dalias.Aug 27 2018, 6:39 AM

I'm reasonably happy as long as this is fixed, but I would really rather see the logic reversed: rather than special casing each !glibc, all of these nonstandard functions should be enabled only if(T.isGlibc) to begin with.

You can also possibly remove the exception for musl in the logic for marking the *64() functions unavailable. In musl these are just compat symbols and generating references to them is purely-worse behavior. When _LARGEFILE_SOURCE is defined musl's headers redirect them all at the preprocessor level anyway.

It looks like this is still an issue on trunk. Was there any other discussion of this?

efriedma commandeered this revision.Nov 5 2018, 6:35 PM
efriedma updated this revision to Diff 172702.
efriedma added a reviewer: raj.khem.
efriedma edited the summary of this revision. (Show Details)

Address review comments, add test.

spatel accepted this revision.Nov 6 2018, 7:12 AM


416–417 ↗(On Diff #172702)

Change this comment to better match the code?

// The following functions are only available on GNU/Linux.
// Linux variants without glibc (eg: bionic, musl) may have some subset.
This revision is now accepted and ready to land.Nov 6 2018, 7:12 AM
This revision was automatically updated to reflect the committed changes.