--target-arch: introduce aliases for some archs
Metadata
Current evaluation
Architecture aliases were added by decoupling target architectures from Debian names in canonical/snapcraft#1204, merged as commit a8d462cf3.
Resolution: closed resolved
Reason: canonical/snapcraft#1204 was merged into master and introduced a separate target architecture field with aliases. The issue records the resolution as commit a8d462cf3.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Instead of forcing the outside world to think of architectures as the 'deb world' expect it, introduce a new field called 'target' in the _ARCH_TRANSLATIONS data struct, and moves _find_machine() to use that field - that let me introduce aliases for some arches and simplify some scripts used to build kernels using snapcraft.
With this patch i'm able to trim down that much shell code that was in place just to mimic a deb arch (instead of just passing down the arch the kernel was building for):
-set_snaparch() {
- # Attempt to find the correct architecture
- case "$UTS_MACHINE" in
- i386|ia64|alpha)
- snaparch="$UTS_MACHINE" ;;
- x86_64)
- snaparch=amd64 ;;
- sparc*)
- snaparch=sparc ;;
- s390*)
- snaparch=s390$(grep -q CONFIG_64BIT=y $KCONFIG_CONFIG && echo x || true) ;;
- ppc*)
- snaparch=$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo ppc64el || echo powerpc) ;;
- parisc*)
- snaparch=hppa ;;
- mips*)
- snaparch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
- aarch64)
- snaparch=arm64 ;;
- arm*)
- if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
- if grep -q CONFIG_VFP=y $KCONFIG_CONFIG; then
- snaparch=armhf
- else
- snaparch=armel
- fi
- else
- snaparch=arm
- fi
- ;;
- *)
- snaparch=$(dpkg --print-architecture)
- echo "" >&2
- echo "** ** ** WARNING ** ** **" >&2
- echo "" >&2
- echo "Your architecture doesn't have it's equivalent" >&2
- echo "Debian userspace architecture defined!" >&2
- echo "Falling back to using your current userspace instead!" >&2
- echo "Please add support for $UTS_MACHINE to ${0} ..." >&2
- echo "" >&2
- esac
- forcearch="--target-arch=$snaparch"
-}
-
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Architecture aliases were added by decoupling target architectures from Debian names in canonical/snapcraft#1204, merged as commit a8d462cf3. | |
| stealth/space-bunny-alpha | — | closed resolved | Implemented architecture aliases and decoupled target architectures from Debian names in merged PR #1204 (commit a8d462cf3). | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1204 decoupled target architectures from Debian mappings and added architecture aliases for improved target matching. | |
| qwen/qwen3.6-35b-a3b | — | — | Proposal to add architecture aliases for --target-arch was closed without merging. The patch aimed to simplify snapcraft kernel builds by mapping kernel architectures to Debian equivalents, but received no further action. | |
| qwen/qwen3.6-35b-a3b | — | — | The proposal to add architecture aliases via a new target field was closed without discussion or implementation. No merge occurred, indicating the feature request was abandoned or rejected. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged the architecture alias feature, adding a target field to _ARCH_TRANSLATIONS to simplify kernel build scripts and eliminate complex shell translation logic. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. The proposed patch to add architecture aliases via a new target field was not merged, likely abandoned due to inactivity. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#1204
(confidence 100%)
Merged implementation decoupling target architecture names from Debian architecture names.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1204 target-arch: decouple target arch from deb, and use a separate field … | snapcraft | merged | Merged #1204 into master, decoupling target architecture from Debian architecture and adding a separate target field with architecture aliases for matching. |