[Toybox] [PATCH] Fix macOS build.

enh enh at google.com
Thu Sep 30 19:22:21 PDT 2021


yeah, there's no --gc-sections option in the mac linker. NeXT forked from
gnu ld in the 1980s, and they never joined back up (and aren't likely to
post-GPL3!). i've attached a patch that's the nearest equivalent though.

On Tue, Sep 28, 2021 at 6:00 PM Rob Landley <rob at landley.net> wrote:

> On 9/28/21 7:42 PM, enh via Toybox wrote:
> >
> > ---
> >
> >  lib/portability.h | 2 +-
>
> A better solution than the one I already committed before I saw this. :)
>
> Why are we not feeding --gc-sections to the mac linker? (I'm guessing it's
> a
> mach-o limitation?)
>
> Rob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210930/a63a7f9d/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-dead_strip-for-gc-sections-on-macOS.patch
Type: application/octet-stream
Size: 1294 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210930/a63a7f9d/attachment-0003.obj>


More information about the Toybox mailing list