Skip to content

Derive GCC version flag from resolved toolchain version - #154

Open
nradakovic wants to merge 1 commit into
mainfrom
nira_bug_fix_152
Open

nradakovic wants to merge 1 commit into
mainfrom
nira_bug_fix_152

Conversation

@nradakovic

Copy link
Copy Markdown
Member

The -V<version>,gcc_nto<cpu> flag passed to qcc for QNX toolchains was hardcoded to 12.2.0 in a static, repo-wide cc_feature, so it never reflected a toolchain instance's actual version/gcc_version attribute or version-matrix entry.

  • Convert gcc_version_flags into a per-instance generated feature (features/custom/qnx/gcc_version_flags/feature.bzl), mirroring the existing sdp_env pattern, driven by the resolved gcc_version and normalized target CPU.
  • Wire it into rules/gcc.bzl's get_custom_cc_features_qnx() and reference the per-instance label in make_cc_features.bzl instead of the shared static target.
  • Add QNX_SDP_TO_GCC_VERSION in rules/common.bzl to default gcc_version from sdp_version's major release, and fail the build if an explicit version conflicts with what the SDP ships.

The `-V<version>,gcc_nto<cpu>` flag passed to qcc for QNX toolchains
was hardcoded to `12.2.0` in a static, repo-wide `cc_feature`, so it
never reflected a toolchain instance's actual `version`/`gcc_version`
attribute or version-matrix entry.

- Convert `gcc_version_flags` into a per-instance generated feature
  (features/custom/qnx/gcc_version_flags/feature.bzl), mirroring the
  existing `sdp_env` pattern, driven by the resolved `gcc_version`
  and normalized target CPU.
- Wire it into rules/gcc.bzl's get_custom_cc_features_qnx() and
  reference the per-instance label in make_cc_features.bzl instead
  of the shared static target.
- Add QNX_SDP_TO_GCC_VERSION in rules/common.bzl to default
  gcc_version from sdp_version's major release, and fail the build
  if an explicit version conflicts with what the SDP ships.
@nradakovic nradakovic self-assigned this Sep 29, 2026
@nradakovic nradakovic added bug Something isn't working feature New feature request labels Sep 29, 2026
@nradakovic nradakovic added the p3 Medium/Low - handle it within normal process label Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature New feature request p3 Medium/Low - handle it within normal process

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant