Repository navigation
embar: Mach-O archives as Apple's ar writes them (fixes the 0.1.0 macOS release build) - #200
Merged
Merged
Conversation
The release dry run for 0.1.0 failed on both macOS runners: Xcode 16's ld refused EmbCC's Darwin runtime, "archive member invalid control bits in .../librt.a". Our members had odd sizes, so most headers -- which the __.SYMDEF offsets name -- were not on multiples of eight. The ld on this Mac (27106) accepts that, so linking here proved nothing. embar now writes what Apple's ar writes: each member padded with newlines to a multiple of eight, the name field sized as Apple sizes it, and the table named "__.SYMDEF SORTED", mode 100644, its entries in the order of their names. Against `ZERO_AR_DATE=1 ar rcs` it is byte for byte the same, for the runtime and for embcc objects of every size modulo eight on both Darwin targets. darwin-rt checks the alignment on any host and, on a Mac, the byte comparison with Apple's ar; against the old embar it fails, naming the header at offset 1946.
Member
Author
|
Release dry run on this branch: run 42546258244. All four builds pass, including both macOS runners' smoke test, which links a program against the new runtime archive with Xcode 16's |
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.
The release dry run for 0.1.0 (run) failed on both macOS runners, in the staged compiler's smoke test:
The Darwin runtime is new since 0.0.1-beta, so this is the first release that ships it.
embarwrote members of odd sizes, so most member headers, which the__.SYMDEFoffsets point at, were not on multiples of eight. Xcode 16'sldrefuses that. The newerldon a current Mac accepts it, which is why nothing failed locally.embarnow writes exactly what Apple'sarwrites:__.SYMDEF SORTED, with mode100644and its entries sorted by name.Checked:
ZERO_AR_DATE=1 ar rcsfor the runtime, and for embcc objects whose sizes fall in four different residues mod 8, on both Darwin targets.darwin-rt: a new check that every header and every table offset is a multiple of eight (any host), plus the byte comparison on a Mac. Against the oldembarit fails, naming the header at offset 1946.embar,darwin-rt,darwin-abi,darwin-host,darwin-libsystemandmachopass. The rebuilt runtime links and runs a program.ld(linked in a comment below).After this merges, tag
v0.1.0.