{"id":47795051,"url":"https://github.com/eclipse-score/toolchains_gcc","last_synced_at":"2026-04-03T16:13:56.382Z","repository":{"id":283468851,"uuid":"947235256","full_name":"eclipse-score/toolchains_gcc","owner":"eclipse-score","description":"Bazel toolchains for GNU GCC","archived":false,"fork":false,"pushed_at":"2026-03-10T16:09:49.000Z","size":47,"stargazers_count":4,"open_issues_count":6,"forks_count":13,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-03-10T22:23:10.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://eclipse-score.github.io/toolchains_gcc","language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-score.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-12T11:16:14.000Z","updated_at":"2026-02-22T06:48:26.000Z","dependencies_parsed_at":"2025-03-20T12:38:57.260Z","dependency_job_id":"b1e74e5a-892a-420a-9dab-9b200d535fd8","html_url":"https://github.com/eclipse-score/toolchains_gcc","commit_stats":null,"previous_names":["eclipse-score/toolchains_gcc"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/eclipse-score/toolchains_gcc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Ftoolchains_gcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Ftoolchains_gcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Ftoolchains_gcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Ftoolchains_gcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-score","download_url":"https://codeload.github.com/eclipse-score/toolchains_gcc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Ftoolchains_gcc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31362716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T15:19:21.178Z","status":"ssl_error","status_checked_at":"2026-04-03T15:19:20.670Z","response_time":107,"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":[],"created_at":"2026-04-03T16:13:55.318Z","updated_at":"2026-04-03T16:13:56.366Z","avatar_url":"https://github.com/eclipse-score.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!WARNING]\n\u003e **Deprecated:** This repository should not be used anymore.\n\u003e Starting with `v0.6`, use `https://github.com/eclipse-score/bazel_cpp_toolchains` instead.\n\n# Using the S-CORE Host GCC C++ Toolchains\n\nThis guide explains how to use the GCC C++ Toolchain provided in S-CORE GCC Toolchain repository. The toolchain supports Linux-based GCC cross-compilation and is designed to integrate easily into Bazel-based C++ projects. \n\n\u003e NOTE: The support for WORKSPACE file servers only as backup for projects/modules that are currently migrating to bzlmod and such should not be used in newly established projects.\n\n## Declaring the Toolchain as a Dependency (via bzlmod)\n\nTo include the toolchain in any project (module), a project needs to declare dependency to the toolchain. This is done by updating projects MODULE.bazel file:\n```python\n# MODULE.bazel\n\nbazel_dep(name = \"score_toolchains_gcc\", version = \"X.Y\") # where the X and Y are version numbers.\n```\n\n## Declaring the Toolchain as a Dependency (via WORKSPACE)\nTo include the toolchain in any project, a project WORKSPACE file needs to collect all dependency which toolchain has:\n```python\n# WORKSPACE\n\nload(\"@bazel_tools//tools/build_defs/repo:http.bzl\", \"http_archive\")\nhttp_archive(name = \"score_toolchains_gcc\", . . .)\n\nload(\"@score_toolchains_gcc//:deps.bzl\", \"toolchain_gcc_dependencies\")\ntoolchain_gcc_dependencies()\n``` \n\n## Configuring the toolchain to a project needs\nThe `score_toolchains_gcc` module currently supports only GNU GCC version **12.2.0**. Support for multiple GCC versions is planned, with future versions expected to be selectable via an extended toolchain interface. As of now, version 12.2.0 is the sole supported target.\n\nThe module exposes an API that allows consumers to enable or disable specific toolchain behaviors related to compilation diagnostics.\nBy default, the toolchain activates the following features using predefined compiler flags:\n\n1. Minimal warning flags — Enables a basic set of compiler warnings (e.g., `-Wall`) which cannot be disabled by consumers.\n2. Strict warning flags — Enables a more aggressive set of warnings (e.g., `-Wextra`, `-Wpedantic`) which may be disabled by consumers if desired. \n3. A `treat warnings as errors` flags — Promotes all warnings to errors using -Werror and exceptions like -Wno-error=deprecated-declarations.\n\nConsumers can modify features by adding or removing them in the module configuration.\nTo disable a feature, prefix its name with a dash (e.g., `-strict_warnings`).\nHowever, the following features are protected and cannot be disabled:\n- `minimal_warnings`\n- `treat_warnings_as_errors`\n\nWhen a feature is disabled, neither the default nor any user-defined flags associated with it will be applied.\n\nConsumers can provide custom compiler warning flags through the additional_warnings feature.\nThis feature accepts a list of flags following any of these patterns: `-W\u003cwarning-name\u003e`, `-Wno-\u003cwarning-name\u003e`, and `-Wno-error=\u003cwarning-name\u003e`.\n\nImportant restrictions:\n- Warnings enabled by minimal_warnings cannot be disabled.\n- Warnings enabled by -Wall cannot be disabled or converted back to non-errors.\n- Attempts to use `-Wno-error` for any protected warning will fail.\n\nTo set wanted flags, the following API needs to be used:\n```python\ngcc = use_extension(\"@score_toolchains_gcc//extentions:gcc.bzl\", \"gcc\")\ngcc.extra_features(\n    features = [\n        \"-strict_warnings\",\n        \"additional_warnings\"\n    ],\n)\ngcc.warning_flags(\n    additional_warnings = [\"-Wno-bool-compare\"],\n)\nuse_repo(gcc, \"gcc_toolchain\", \"gcc_toolchain_gcc\")\n```\n* `extra_features` - Enables or disables features listed by the consumer.\n* `warning_flags` - Sets additional compiler flags for the feature `additional_warnings` when it is enabled.\n\n### Using WORKSPACE file\nThe same approuch needs to be done when configuring toolchain over WORKSPACE file:\n```python\nload(\"@score_toolchains_gcc//rules:gcc.bzl\", \"gcc_toolchain\")\ngcc_toolchain(\n    name = \"gcc_toolchain\",\n    gcc_repo = \"gcc_toolchain_gcc\",\n    extra_features = [\n        \"-strict_warnings\",\n        \"additional_warnings\",\n    ],\n    warning_flags = {\n        \"additional_warnings\": [\"-Wno-bool-compare\"],\n    },\n)\n```\n\n## Toolchain Registration\nToolchain registration can be performed either directly in a MODULE.bazel file or globally through .bazelrc.\nWhen registering in MODULE.bazel:\n```python\nregister_toolchains(\"@gcc_toolchain//:host_gcc_12\")\n```\nOr when registering globally:\n```bash\nbuild --extra_toolchains=@gcc_toolchain//:host_gcc_12\n```\n\n## Example Usage\nA minimal Bazel project demonstrating use of the toolchain can be found in the [test/](https://github.com/eclipse-score/toolchains_gcc/tree/main/bazel/test) directory of this module.\n\n##  Compatibility\n✅ Bazel version 6.x or newer (with Bzlmod enabled)\n\n✅ Linux hosts\n\n⚠️ Native support for macOS and Windows is currently not provided\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-score%2Ftoolchains_gcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-score%2Ftoolchains_gcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-score%2Ftoolchains_gcc/lists"}