Skip to content

Fix ar usage in Makefile for macOS compatibility

samuela requested to merge samuela/relibc:samuela-master-patch-09777 into master

I believe this partially supersedes redox!1202. This change was created by @alfredoyang in redox#1278 (comment 19264).

Currently the build for redox fails on macOS:

$ make all
...
ar -M < ""target/x86_64-unknown-redox"/release/libc.a.mri"
usage:  ar -d [-TLsv] archive file ...
        ar -m [-TLsv] archive file ...
        ar -m [-abiTLsv] position archive file ...
        ar -p [-TLsv] archive [file ...]
        ar -q [-cTLsv] archive file ...
        ar -r [-cuTLsv] archive file ...
        ar -r [-abciuTLsv] position archive file ...
        ar -t [-TLsv] archive [file ...]
        ar -x [-ouTLsv] archive [file ...]
make[1]: *** ["target/x86_64-unknown-redox"/release/libc.a] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [prefix/x86_64-unknown-redox/relibc-freestanding-install] Error 2

This MR pushes fixes the issue and pushes us closer to building on macOS.

Merge request reports