Skip to content

[QNX] Use a single shared QNX SDP package for all target architectures #176

Open

Description

@nradakovic

Background

The QNX SDP installation archive is architecture-agnostic on the package level: one SDP download (e.g., SDP 8.0.0 / 8.0.4) contains the host tools, headers, and libraries for all supported target architectures (x86_64 and aarch64).

Despite this, the current repository layout and VERSION_MATRIX treat the SDP as a per-target-architecture package:

  • packages/qnx/aarch64/sdp/8.0.0/sdp.BUILD
  • packages/qnx/x86_64/sdp/8.0.0/sdp.BUILD

Both VERSION_MATRIX entries (aarch64-qnx-sdp_* and x86_64-qnx-sdp_*) point to the same URL and sha256, and the two sdp.BUILD files are nearly identical — they only differ in the target-triple-prefixed tool names (ar, strip, gcov) and the compiler builtin include directory.

This has two drawbacks:

  1. Duplicate downloads/extractions — the same multi-GB SDP archive is fetched and extracted once per target architecture, wasting bandwidth, disk space, and cache.
  2. Duplicate maintenance — every SDP version bump requires updating two near-identical BUILD files and two matrix entries that must stay in sync.

Since the SDP holds multiple architectures, we decided not to have one QNX SDP per target platform. Instead, a single SDP package will be shared by all QNX target platforms.

Requirements

  1. Consolidate the per-architecture sdp.BUILD files into a single sdp.BUILD that exposes targets for both x86_64 and aarch64, e.g. architecture-suffixed filegroups:
    • ar_aarch64 / ar_x86_64
    • strip_aarch64 / strip_x86_64
    • gcov_aarch64 / gcov_x86_64
    • cxx_builtin_include_directories_aarch64 / cxx_builtin_include_directories_x86_64
    • Architecture-independent targets (cc, cxx, mkifs, host_dir, target_dir, sysroot_dir, all_files, …) remain single, shared targets.
  2. Restructure the package path to be architecture-independent (e.g., packages/qnx/sdp/<version>/sdp.BUILD instead of packages/qnx/{aarch64,x86_64}/sdp/<version>/sdp.BUILD).
  3. Collapse the duplicated VERSION_MATRIX entries so that a given SDP version is described by one entry (one URL/sha256/build_file), regardless of target architecture.
  4. Update the gcc module extension / repository rules (extensions/gcc.bzl, rules/gcc.bzl) so that:
    • the SDP repository is created once per SDP version and linked by all QNX toolchains (both architectures),
    • the generated toolchain config selects the correct architecture-specific targets from the shared SDP package.
  5. Keep the existing SDP version remapping behavior (e.g., 8.0.4 → 8.0.0 build-file reuse) working.
  6. Update the documentation (docs/qnx_integration.md, docs/repository_layout.md, docs/maintenance.md) to reflect the new single-package layout.
  7. The change must be transparent for consumers: existing QNX toolchain registration via the module extension must keep working without user-side changes (or, if a breaking change is unavoidable, document the migration in docs/migration_guide.md).

Acceptance Criteria

  • A single sdp.BUILD per SDP version exists under an architecture-independent path and contains targets for both x86_64 and aarch64.
  • The per-architecture directories packages/qnx/aarch64/sdp/ and packages/qnx/x86_64/sdp/ are removed.
  • VERSION_MATRIX contains one entry per QNX SDP version (no per-architecture duplication of URL/sha256).
  • Building QNX toolchains for both aarch64 and x86_64 in the same workspace triggers only one download/extraction of the SDP archive per version.
  • Both QNX toolchains (aarch64 + x86_64) resolve their tools (qcc, q++, ar, strip, gcov, mkifs) and sysroot from the shared package and compile/link successfully.
  • sysroot_dir continues to expose the extracted package directory (srcs = ["."]).
  • Existing test suites under tests/ (feature verification, QNX DDK, guardrails) pass for both QNX target architectures.
  • Documentation is updated to describe the shared SDP package layout.

Activity

  1. self-assigned this
    on Oct 30, 2026
  2. added
    featureNew feature request
    p3Medium/Low - handle it within normal process
    on Oct 30, 2026
  3. added theissue type on Oct 30, 2026
  4. changed the title [-]QNX SDP merge[/-] [+][QNX] Use a single shared QNX SDP package for all target architectures[/+] on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureNew feature requestp3Medium/Low - handle it within normal processrefinement neededThe issue or PR needs refinement

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions