bsp: eliminate Makefile.pup preprocessing#12
Merged
Conversation
Libraries with darwin-specific configs (binutils, gcc, libcpp) get a defaults-darwin.config alongside their defaults.config. The Tupfile selects via ifeq (@(HOST_OS),darwin). No more Makefile preprocessing.
MPN source resolution (generic C vs arch-specific asm) is now driven by @(MPN_CPU) in the platform config, read by Tupfile rules during putup configure. No more Makefile preprocessing step.
The canonical build command is now: putup configure --config configs/x86_64-linux.config -C . -S ../src -B ../build putup -C . -S ../src -B ../build -j$(nproc)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
80eb52c to
472a54b
Compare
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.
Summary
setup-host-configs: Libraries with darwin-specific configs (binutils, gcc, libcpp) getdefaults-darwin.configalongsidedefaults.config, selected viaifeq (@(HOST_OS),darwin)in the Tupfileresolve-mpnTupfile-driven:@(MPN_CPU)in the platform config drives config-generating rules ingcc/gmp/Tupfileandgcc/gmp/mpn/Tupfileduringputup configureMakefile.pup: Download logic extracted toscripts/download-source.sh; the canonical build is nowputup configure && putupbuild-gcc-bspjob uses direct putup commandsNet: -414 lines (498 deleted, 84 added). The config tree is now immutable — no preprocessing step writes into it.
Test plan
build-gcc-bspjob passes (downloads source, configures, builds, smoke-tests cc1)🤖 Generated with Claude Code