https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797
--- Comment #55 from Jens-S. Vöckler <jens4303 at me dot com> --- Would it be worthwhile to limit it to "darwin" *and* "apfs" on objdir? I am thinking of something along the lines of diskutil info $(stat -f '%Sd' /path/to/objdir) | \ perl -lane 'print $F[$#F] if /^\s+type/i' Once the build system determined "darwin", "diskutil" and "stat" should be readily available. The expression above returns "apfs" if you need to enact the patch, and "hfs" if you do not.