Repository navigation
Claude/upgrade ape c library mm z gd - #598
Merged
Merged
Conversation
apeabi-probe compiled twice and diffed on the VM. Sixteen structs move, in two families: the network address structs (each becoming the value every other system reports -- sockaddr_in 24 -> 16) and the lock and pthread structs (pthread_mutex_t 56 -> 40, QLock 32 -> 24), plus termios. Nothing in the stdio/stat core moves at all: FILE, struct stat, DIR, jmp_buf, fd_set, tm, dirent, passwd, regex_t and sigset_t are byte for byte identical, and those are the types the flag's own warning named as the reason it has to be all-or-nothing. /env/_fdinfo was checked rather than assumed: it is text, so there is no cross-exec layout hazard there. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
pcc now passes -J on every compile. It is done in pcc rather than through CFLAGS or CC because both of those have holes: -J in sys/src/ape/config reaches 32 of 137 mkfiles, since the other 105 assign CFLAGS= rather than appending $CFLAGS, and 59 mkfiles reassign CC. All 59 still name pcc. The appends are unconditional and outside the if(!Aflag) block. That block does not run when -A or -B was given and cmd/cfront passes -B, so putting them there would have missed the one package the flag was built for. They are also outside the argument loop, which runs once per file. Native 6c is untouched and keeps the 9front rule, which is what cmd2/vts and vtwin need when they link the host's libc.a. pcc -9 is the way back, and exists for the instruments rather than for the build: structalign-test's control run and apeabi-probe's two compiles are both differences between the two rules, and with no way to ask for the old one neither could be taken again. Nothing in the tree passes -9. -J is still accepted and now does nothing. Measured before being turned on: sixteen structs move, the socket family and the lock/pthread family plus termios, with nothing in the stdio/stat core moving at all. Needs mk distclean before mk install. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
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.
No description provided.