Add prerequisite support for macOS - #183
Open
shym wants to merge 8 commits into
Open
Conversation
On targets where long double is IEEE quad (aarch64), vfprintf's `union arg` held the float value as long double, so `%f` (and the fmt_fp call) round-tripped double -> long double -> double through __extenddftf2/__trunctfdf2. That pulls libgcc (or compiler-rt) soft-float into every freestanding link that uses printf, even for integer-only formats. fmt_fp already takes a double, so the long double was pure overhead. Use double for the field; %L float conversions are treated as double (never used by OCaml unikernels). aarch64 cross unikernels now link with no libgcc at all (clang already inlines the atomics).
The aarch64 wrapper linked -lgcc for printf's long-double soft-float (now gone: printf formats as double) and for GCC's default outline atomics (-moutline-atomics lowers C11 atomics to __aarch64_* helpers in libgcc, which also pull __getauxval, absent on a freestanding solo5 target). Pass -mno-outline-atomics so atomics inline (LL/SC); the link then needs no compiler runtime, so drop -lgcc and let a pure-LLVM toolchain link aarch64 unikernels.
Add a new option so that the toolchain can invoke commands with an extended `PATH`
This CI workflow illustrates how this PR plays with changes from Solo5/solo5#656 and from mirage#177 It should be amended to follow updates on those other changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proposes changes that are along the lines the ones in Solo5/solo5#656 to make adding support for macOS smoother.
At the moment this is a draft containing:
--path-prependconfigure optionARandRANLIBto build support librariesmanifest.cfor when solo5-elftool is not availableThis PR leaves to another PR discussions about the best way to package this.