{"id":41619863,"url":"https://github.com/strombetta/bugleos-toolchain","last_synced_at":"2026-02-03T10:16:42.016Z","repository":{"id":327935622,"uuid":"1112269121","full_name":"strombetta/bugleos-toolchain","owner":"strombetta","description":"Build system for generating the BugleOS cross-toolchain for multiple architectures.","archived":false,"fork":false,"pushed_at":"2026-02-03T08:33:18.000Z","size":263,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-03T09:36:06.921Z","etag":null,"topics":["bugleos","cross-compiler","cross-compiling","cross-toolchain","linux"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/strombetta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":"MAINTAINERS.md","copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"strombetta"}},"created_at":"2025-12-08T11:45:16.000Z","updated_at":"2026-02-02T19:21:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/strombetta/bugleos-toolchain","commit_stats":null,"previous_names":["strombetta/bugleos-make-toolchain","strombetta/bugleos-toolchain"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/strombetta/bugleos-toolchain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strombetta%2Fbugleos-toolchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strombetta%2Fbugleos-toolchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strombetta%2Fbugleos-toolchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strombetta%2Fbugleos-toolchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strombetta","download_url":"https://codeload.github.com/strombetta/bugleos-toolchain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strombetta%2Fbugleos-toolchain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29041057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bugleos","cross-compiler","cross-compiling","cross-toolchain","linux"],"created_at":"2026-01-24T13:30:42.697Z","updated_at":"2026-02-03T10:16:42.011Z","avatar_url":"https://github.com/strombetta.png","language":"Makefile","funding_links":["https://github.com/sponsors/strombetta"],"categories":[],"sub_categories":[],"readme":"# BugleOS Cross Toolchain\n[![Release](https://github.com/strombetta/bugleos-make-toolchain/actions/workflows/release.yml/badge.svg)](https://github.com/strombetta/bugleos-make-toolchain/actions/workflows/release.yml)\n\n## The Repository\nBugleOS Cross Toolchain builds deterministic cross-compilers and system headers for BugleOS across multiple architectures. The repository automates fetching sources, verifying checksums, and orchestrating staged builds of binutils, GCC, and musl.\n\n## Repository layout\n\n- `Makefile`: entry point orchestrating staged builds per architecture.\n- `config/`: path definitions and per-architecture target triples.\n- `make/`: stage-specific makefiles for binutils, GCC, and musl.\n- `scripts/`: helper utilities for fetching sources, verifying checksums, loading the environment, and emitting metadata files.\n- `patches/`: placeholder for local patches to upstream sources.\n- `downloads/`, `builds/`, `out/`: storage for source archives, build trees, and installed toolchain/sysroot outputs.\n\n## Prerequisites\n\n- Standard POSIX build utilities (bash, tar, make)\n- wget or curl for fetching sources\n- gpg for signature verification\n- A C/C++ build environment (C compiler, g++, binutils)\n\n## Usage\n\nFetch sources along with signatures and verify both checksums and PGP signatures (recommended before building):\n\n```\nscripts/fetch-sources.sh\nscripts/verify-checksums.sh\n```\n\nBuild a toolchain for a specific architecture by overriding `TARGET` on the command line. The umbrella target `toolchain` builds the current `TARGET` from `config/paths.mk` or an override passed on the command line. By default, `TARGET` matches the host architecture when it is supported:\n\n```\nmake TARGET=aarch64-bugleos-linux-musl toolchain\n```\n\nTo list optional variables for a specific target, pass the target name via `TARGET`:\n\n```\nmake help TARGET=toolchain\n```\n\nTo install Linux UAPI headers into the sysroot, set `WITH_LINUX_HEADERS=1` and update `LINUX_VERSION`/`LINUX_SHA256` in `make/linux-headers.mk`:\n\n```\nmake WITH_LINUX_HEADERS=1 TARGET=x86_64-bugleos-linux-musl toolchain\n```\n\nYou can override build parallelism and the toolchain output root:\n\n```\nmake JOBS=8 TOOLCHAIN_ROOT=/opt/bugleos/toolchain TARGET=x86_64-bugleos-linux-musl toolchain\n```\n\n## Using the toolchain environment\n\nAfter a successful build, load the environment helpers generated in `out/toolchain/\u003ctriple\u003e` (where `TOOLCHAIN_ROOT` defaults to `out/toolchain`):\n\n```\nsource out/toolchain/x86_64-bugleos-linux-musl/bugleos-toolchain.env\n```\n\nBootstrap tools (binutils-stage1 and gcc-stage1) install into `out/toolchain-stage1/\u003ctriple\u003e`, keeping temporary artifacts separate from the final cross-toolchain under `out/toolchain/\u003ctriple\u003e`. Only the latter is required to build BugleOS userspace or kernels.\n\nStage1 sysroot contents live under `out/toolchain-stage1/sysroot`, while the final sysroot is located at `out/toolchain/\u003ctriple\u003e/sysroot`. Headers are exposed under `out/toolchain/\u003ctriple\u003e/sysroot/usr/include` for predictable `--print-sysroot` checks.\n\nAlternatively, enter the environment manually:\n\n```\nTARGET=x86_64-bugleos-linux-musl . scripts/enter-env.sh\n```\n\nTo validate an existing build and ensure the compiler never falls back to host headers, run:\n\n```\nmake TARGET=aarch64-bugleos-linux-musl verify-toolchain\n```\n\n## Validation: make check\n\nRun the toolchain validation target to assert that the installed binaries, sysroot, musl loader/libc, and kernel headers are present and match the requested target triplet and architecture:\n\n```\nmake TARGET=aarch64-bugleos-linux-musl check\n```\n\n## Cleaning / Resetting\n\nThe Makefile provides a safe, explicit cleaning interface focused on per-package build artifacts and toolchain outputs. Use `TRIPLET=\u003ctriple\u003e` (or `TARGET=\u003ctriple\u003e`) to scope to a specific architecture. Destructive targets require `FORCE=1`.\n\nPer-package build cleans (they also remove downstream toolchain stages that depend on the selected package, following the `toolchain` build order):\n  - `make clean-binutils` removes binutils build trees, logs, sources, archives/stamps, and installed toolchain outputs.\n  - `make clean-gcc` removes GCC build trees, logs, sources, archives/stamps, and installed toolchain outputs.\n  - `make clean-musl` removes musl build trees, logs, sources, archives/stamps, and musl-installed sysroot headers/libs (preserving Linux UAPI headers).\n  - `make clean-kheaders` removes Linux UAPI header builds, logs, sources, archives/stamps, and the installed Linux headers under the sysroot.\n\nDestructive targets (require `FORCE=1`):\n\n- `make clean-toolchain FORCE=1` removes toolchain outputs (`out/toolchain/\u003ctriple\u003e` and `out/toolchain-stage1`).\n\n## Continuous Integration\n\n## Feedback\n## Related Projects\n## Code of Conduct\n## License\nCopyright (C) Sebastiano Trombetta. All rights reserved.\nThis project is licensed under the MIT License. For the full text of the license, see the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrombetta%2Fbugleos-toolchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrombetta%2Fbugleos-toolchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrombetta%2Fbugleos-toolchain/lists"}