NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
toolchain/58960: Missing support for _NETBSD_REVISIONID on various ports
>Number: 58960
>Category: toolchain
>Synopsis: Missing support for _NETBSD_REVISIONID on various ports
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 04 17:45:00 +0000 2025
>Originator: Taylor R Campbell
>Release: current
>Organization:
The NetBSD Revisionid
>Environment:
>Description:
For migration to a modern revision control system which has tree-wide revision ids rather than per-file numbering, in order to avoid losing valuable ident(1) diagnostics (especially for incremental update builds), we need to record a tree-wide revision id into each object file.
Currently we bake CVS/RCS revision numbers into objects from .c files with the RCSID("$NetBSD: ...$") and __KERNEL_RCSID(0, "$NetBSD: ...$") macros. These macros should be adapted to process a _NETBSD_REVISIONID definition, which is fed in at the top level by build.sh.
Status of support by architecture:
[x] alpha
[-] amd64 (OK on gcc/gas, broken on clang)
[x] arm
[ ] hppa
[-] i386 (OK on gcc/gas, broken on clang)
[ ] ia64
[ ] m68k
[ ] mips
[ ] or1k
[ ] powerpc
[ ] riscv
[ ] sh3
[ ] sparc
[ ] vax
Note: Even when limited to gcc/gas toolchain, the assemblers may work differently on different architectures. For example, on amd64, `.asciz "$" "NetBSD: " "foo" " $"' is assembled into a single NUL-terminated string "$NetBSD: foo $". But on arm, it is assembled into a sequence of NUL-terminated strings "$", "$NetBSD: ", "foo", " $". To get the desired result, we use `.ascii "$"; .ascii "NetBSD: "; .ascii "foo"; .asciz " $"' on arm32. This may also be necessary to make it work on amd64 under clang.
Prior commits (tracked here in case we want to pull them up):
https://mail-index.netbsd.org/source-changes/2024/06/09/msg151710.html
https://mail-index.netbsd.org/source-changes/2024/06/09/msg151711.html
https://mail-index.netbsd.org/source-changes/2024/06/09/msg151712.html
https://mail-index.netbsd.org/source-changes/2024/06/09/msg151713.html
>How-To-Repeat:
Run ident(1) on trees built from hg/git with NETBSD_REVISIONID set.
>Fix:
Yes, please!
Home |
Main Index |
Thread Index |
Old Index