Skip to content

Commit af7fd16

Browse files
The two upstream-derived packages take upstream's version (#338)
A PACKAGE THAT VENDORS SOMEONE ELSE'S SOURCES TAKES THEIR NUMBER AS WELL AS THEIR NAMESPACE. `picolibc.picolibc` and `llvm.compiler-rt-builtins` were published with an independent version (0.1.x), on the argument that a version must move when the packaging changes and upstream's has not. The fourth segment answers that without a second numbering scheme: it orders strictly above the bare upstream number, because mcpp compares an arbitrary-length dot list with absent segments as zero, and it satisfies every requirement the bare number satisfies, because a bare requirement is a caret. A consumer therefore writes the number upstream released: picolibc.picolibc = "1.8.12" llvm.compiler-rt-builtins = "22.1.8" Both entries publish `.1` rather than the bare number, which is the scheme in use rather than an exception to it: tags named `1.8.12` and `22.1.8` had already been published carrying different bytes, and a published version must not come to mean something else. VERIFIED AGAINST UPSTREAM RATHER THAN ASSERTED. Every one of picolibc's 2109 vendored files is byte-identical to the 1.8.12 release tarball, whose `meson.build` declares that version; every one of the 347 vendored builtins is byte-identical to `compiler-rt/lib/builtins` at the tag `llvmorg-22.1.8`. picolibc's licence field was wrong and is now counted rather than guessed. The tree descends from newlib and carries five identifiers over the files actually shipped: BSD-3-Clause (902), BSD-3-Clause-Clear (31), MIT (8), BSD-2-Clause-FreeBSD (5), BSD-2-Clause (4). The entry declared BSD-3-Clause and BSD-2-Clause. `mcpp sbom` emits this field into a document a legal review reads, where one wrong identifier reads as examined and is worse than silence. `mcpplibs.cortex-m-rt` moves to 0.2.3, in which a `main` that returns terminates instead of hanging for ever: C defines returning from `main` as `exit(status)`, and the startup file called `board_main` for effect and then spun. With a C library in the graph that discarded buffered output; with none, the program ran until something killed it. The template writes an explicit `board::exit(0)`, so every test of the package took the one path that worked. The superseded versions are withdrawn from the table rather than left beside their replacements: they are hours old, nothing consumes them, and leaving them would make the same bytes installable under two identities, one of which contradicts the convention. AUDITED MECHANICALLY BEFORE SUBMISSION. Across the seven entries this batch touches — 32 versions, 64 URLs — every GLOBAL and CN URL was fetched, hashed and compared with the index, and every tarball's own `mcpp.toml` was read and checked to declare the same namespace, name and version the entry claims. No disagreement was found. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 797c1c3 commit af7fd16

3 files changed

Lines changed: 76 additions & 52 deletions

File tree

pkgs/c/cortex-m-rt.lua

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Board support for Cortex-M: startup, memory layout, a semihosting console,
22
-- and the runners that reach an emulator or a debug probe.
33
--
4-
-- ⭐⭐ ONE PACKAGE, TWO ENVIRONMENTS — AND SINCE 0.2.1, THREE FEATURES.
4+
-- ONE PACKAGE, TWO ENVIRONMENTS — AND SINCE 0.2.1, THREE FEATURES.
55
--
66
-- A board reached through an emulator and the same board reached through a
77
-- debug probe differ in the argv of their runners and in NOTHING else: the
@@ -14,20 +14,20 @@
1414
-- mcpp run --features hardware # the board, over a debug probe
1515
-- mcpp run --features libc # with a C library
1616
--
17-
-- `mcpp run` IS THE WHOLE OF THE COMMON CASE, ON EITHER. On a device,
17+
-- `mcpp run` IS THE WHOLE OF THE COMMON CASE, ON EITHER. On a device,
1818
-- running a program means writing it, resetting, attaching to its output and
1919
-- reading its exit status — ONE command, not several. So that is the DEFAULT
2020
-- runner in both environments, and the command a developer types does not
2121
-- change when the board arrives. `flash` and `serve` are named exceptions, and
2222
-- the engine knows neither name.
2323
--
24-
-- ⚠️ EACH ENVIRONMENT BRINGS ITS OWN TOOL, ON THE `run` TIER. `qemu-arm` under
24+
-- EACH ENVIRONMENT BRINGS ITS OWN TOOL, ON THE `run` TIER. `qemu-arm` under
2525
-- `[feature-xlings.emulator]`, `probe-rs` under `[feature-xlings.hardware]`,
2626
-- both `when = "run"` — so a consumer downloads exactly what the feature they
2727
-- selected needs, and a CI job that compiles firmware and never flashes it
2828
-- downloads nothing at all. Requires mcpp 2026.9.4.2.
2929
--
30-
-- ⚠️ AND THE BOARD SETS THE THREAD POINTER, which is what makes `libc` work.
30+
-- AND THE BOARD SETS THE THREAD POINTER, which is what makes `libc` work.
3131
-- picolibc reaches `stdout` through thread-local storage, and a freestanding
3232
-- image has none until the startup file sets one. Measured without it: a
3333
-- `printf` program linked cleanly, ran, printed NOTHING and hung. There is no
@@ -43,30 +43,30 @@ package = {
4343

4444
xpm = {
4545
linux = {
46-
["0.2.1"] = {
46+
["0.2.3"] = {
4747
url = {
48-
GLOBAL = "https://github.com/mcpplibs/cortex-m-rt/archive/refs/tags/0.2.1.tar.gz",
49-
CN = "https://gitcode.com/mcpp-res/cortex-m-rt/releases/download/0.2.1/cortex-m-rt-0.2.1.tar.gz",
48+
GLOBAL = "https://github.com/mcpplibs/cortex-m-rt/archive/refs/tags/0.2.3.tar.gz",
49+
CN = "https://gitcode.com/mcpp-res/cortex-m-rt/releases/download/0.2.3/cortex-m-rt-0.2.3.tar.gz",
5050
},
51-
sha256 = "d4983148c80cd5366a3374f3bc5a379f9688657c516868e459eefd31b97cfd60",
51+
sha256 = "2b926b10df89ad35d9eff7d1c318b334317d106525cb24eea00a0c623e448ce7",
5252
},
5353
},
5454
macosx = {
55-
["0.2.1"] = {
55+
["0.2.3"] = {
5656
url = {
57-
GLOBAL = "https://github.com/mcpplibs/cortex-m-rt/archive/refs/tags/0.2.1.tar.gz",
58-
CN = "https://gitcode.com/mcpp-res/cortex-m-rt/releases/download/0.2.1/cortex-m-rt-0.2.1.tar.gz",
57+
GLOBAL = "https://github.com/mcpplibs/cortex-m-rt/archive/refs/tags/0.2.3.tar.gz",
58+
CN = "https://gitcode.com/mcpp-res/cortex-m-rt/releases/download/0.2.3/cortex-m-rt-0.2.3.tar.gz",
5959
},
60-
sha256 = "d4983148c80cd5366a3374f3bc5a379f9688657c516868e459eefd31b97cfd60",
60+
sha256 = "2b926b10df89ad35d9eff7d1c318b334317d106525cb24eea00a0c623e448ce7",
6161
},
6262
},
6363
windows = {
64-
["0.2.1"] = {
64+
["0.2.3"] = {
6565
url = {
66-
GLOBAL = "https://github.com/mcpplibs/cortex-m-rt/archive/refs/tags/0.2.1.tar.gz",
67-
CN = "https://gitcode.com/mcpp-res/cortex-m-rt/releases/download/0.2.1/cortex-m-rt-0.2.1.tar.gz",
66+
GLOBAL = "https://github.com/mcpplibs/cortex-m-rt/archive/refs/tags/0.2.3.tar.gz",
67+
CN = "https://gitcode.com/mcpp-res/cortex-m-rt/releases/download/0.2.3/cortex-m-rt-0.2.3.tar.gz",
6868
},
69-
sha256 = "d4983148c80cd5366a3374f3bc5a379f9688657c516868e459eefd31b97cfd60",
69+
sha256 = "2b926b10df89ad35d9eff7d1c318b334317d106525cb24eea00a0c623e448ce7",
7070
},
7171
},
7272
},

pkgs/l/llvm.compiler-rt-builtins.lua

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,69 @@
11
-- The compiler-rt builtins as a SOURCE package.
22
--
3-
-- TWO PACKAGES RATHER THAN ONE, AND THE EDGE IS THE REASON. picolibc's
3+
-- TWO PACKAGES RATHER THAN ONE, AND THE EDGE IS THE REASON. picolibc's
44
-- `printf` formats floats through ryu, which calls routines no C library
55
-- defines — and on rv64 a 128-bit shift the instruction set has none for. A C
66
-- library carrying its own copy would be wrong for anyone supplying their own
77
-- builtins; the dependency edge says the same thing and can be overridden.
88
--
9-
-- ⚠️ AND compiler-rt DOES NOT RECOGNISE A `thumb*` TRIPLE. Configuring its own
9+
-- AND compiler-rt DOES NOT RECOGNISE A `thumb*` TRIPLE. Configuring its own
1010
-- CMake with `thumbv6m-none-eabi` produces a build tree with NO builtins target
1111
-- at all: cmake succeeds, ninja reports "no work to do", and the failure
1212
-- surfaces later as a missing file. A source package has no archive to name and
1313
-- no triple to translate.
1414
--
15-
-- ⚠️ THE NAMESPACE IS UPSTREAM'S, NOT `mcpplibs`. This package vendors someone
15+
-- THE NAMESPACE IS UPSTREAM'S, NOT `mcpplibs`. This package vendors someone
1616
-- else's sources and adds a manifest; the code is theirs and the identity says
1717
-- so. `mcpplibs` is for packages whose CONTENT this organisation wrote.
1818
--
19-
-- The wrapper REPOSITORY can still live under mcpplibs — `ocornut.imgui` is
19+
-- The wrapper REPOSITORY can still live under mcpplibs — `ocornut.imgui` is
2020
-- published from `mcpplibs/imgui-m` for exactly this reason. Where the manifest
2121
-- lives and whose code it describes are different questions.
22+
-- THE VERSION IS UPSTREAM'S, AND THE FOURTH SEGMENT IS THE PACKAGING REVISION.
23+
--
24+
-- `22.1.8` is the LLVM release every one of the 347 vendored files was compared
25+
-- against, byte for byte, at the tag `llvmorg-22.1.8`. The number carries
26+
-- information no independent one could: these routines are an ABI contract with
27+
-- a COMPILER, and "the builtins that ship with the clang in this toolchain" is
28+
-- the question a consumer is asking. A change to the PACKAGING moves the fourth
29+
-- segment, which orders above the bare number and satisfies the same
30+
-- requirements.
31+
--
2232
package = {
2333
spec = "1",
2434
namespace = "llvm",
2535
name = "compiler-rt-builtins",
26-
description = "The compiler-rt 22.1.8 builtins as a source package: the routines a compiler emits calls to, compiled with the consuming program's own flags",
36+
description = "The compiler-rt builtins as a source package: LLVM's replacement for libgcc — the routines a compiler emits calls to compiled with the consuming program's own flags",
2737
licenses = {"Apache-2.0 WITH LLVM-exception"},
2838
repo = "https://github.com/mcpplibs/compiler-rt-builtins",
2939
type = "package",
3040

3141
xpm = {
3242
linux = {
33-
["0.1.1"] = {
43+
["22.1.8.1"] = {
3444
url = {
35-
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/0.1.1.tar.gz",
36-
CN = "https://gitcode.com/mcpp-res/compiler-rt-builtins/releases/download/0.1.1/compiler-rt-builtins-0.1.1.tar.gz",
45+
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.1.tar.gz",
46+
CN = "https://gitcode.com/mcpp-res/compiler-rt-builtins/releases/download/22.1.8.1/compiler-rt-builtins-22.1.8.1.tar.gz",
3747
},
38-
sha256 = "443673d32137ae64896e341cce52f76a2e8c183cad86d5772a457c4cf4daf513",
48+
sha256 = "799797e79e927d28b949e8723d9642e2b8a9d8e997b8c56ecc84ee8220228da3",
3949
},
4050
},
4151
macosx = {
42-
["0.1.1"] = {
52+
["22.1.8.1"] = {
4353
url = {
44-
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/0.1.1.tar.gz",
45-
CN = "https://gitcode.com/mcpp-res/compiler-rt-builtins/releases/download/0.1.1/compiler-rt-builtins-0.1.1.tar.gz",
54+
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.1.tar.gz",
55+
CN = "https://gitcode.com/mcpp-res/compiler-rt-builtins/releases/download/22.1.8.1/compiler-rt-builtins-22.1.8.1.tar.gz",
4656
},
47-
sha256 = "443673d32137ae64896e341cce52f76a2e8c183cad86d5772a457c4cf4daf513",
57+
sha256 = "799797e79e927d28b949e8723d9642e2b8a9d8e997b8c56ecc84ee8220228da3",
4858
},
4959
},
5060
windows = {
51-
["0.1.1"] = {
61+
["22.1.8.1"] = {
5262
url = {
53-
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/0.1.1.tar.gz",
54-
CN = "https://gitcode.com/mcpp-res/compiler-rt-builtins/releases/download/0.1.1/compiler-rt-builtins-0.1.1.tar.gz",
63+
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.1.tar.gz",
64+
CN = "https://gitcode.com/mcpp-res/compiler-rt-builtins/releases/download/22.1.8.1/compiler-rt-builtins-22.1.8.1.tar.gz",
5565
},
56-
sha256 = "443673d32137ae64896e341cce52f76a2e8c183cad86d5772a457c4cf4daf513",
66+
sha256 = "799797e79e927d28b949e8723d9642e2b8a9d8e997b8c56ecc84ee8220228da3",
5767
},
5868
},
5969
},

pkgs/p/picolibc.picolibc.lua

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- picolibc as a SOURCE package: compiled with the consuming program's own flags.
22
--
3-
-- ⭐⭐ THERE IS NO MULTILIB HERE, AND THAT IS WHY IT IS A SOURCE PACKAGE.
3+
-- THERE IS NO MULTILIB HERE, AND THAT IS WHY IT IS A SOURCE PACKAGE.
44
--
55
-- A prebuilt C library ships one build per ABI a target table can name — seven
66
-- for Cortex-M alone — and every consumer then finds the right one through a
@@ -14,59 +14,73 @@
1414
-- directories and the soft-float row received a library carrying
1515
-- `Tag_ABI_HardFP_use`. Nothing failed at build time.
1616
--
17-
-- ⚠️ AND THE HEADERS WERE NEVER PER-PROFILE. Measured across those seven
17+
-- AND THE HEADERS WERE NEVER PER-PROFILE. Measured across those seven
1818
-- builds, the whole include tree — `picolibc.h` and `newlib.h`, which meson
1919
-- GENERATES, included — is byte-identical. The prebuilt ships seven copies of
2020
-- one directory.
2121
--
22-
-- ⚠️ `picocrt` IS DELIBERATELY ABSENT. A startup object decides where execution
22+
-- `picocrt` IS DELIBERATELY ABSENT. A startup object decides where execution
2323
-- begins and how it reaches the host — which board is running. Choosing among
2424
-- picolibc's nine variants is a board-support package's job; `cortex-m-rt`
2525
-- supplies its own, including the thread-pointer initialisation without which a
2626
-- `printf` program links cleanly, runs, prints nothing and hangs.
2727
--
28-
-- ⚠️ THE NAMESPACE IS UPSTREAM'S, NOT `mcpplibs`. This package vendors someone
28+
-- THE NAMESPACE IS UPSTREAM'S, NOT `mcpplibs`. This package vendors someone
2929
-- else's sources and adds a manifest; the code is theirs and the identity says
3030
-- so. `mcpplibs` is for packages whose CONTENT this organisation wrote.
3131
--
32-
-- The wrapper REPOSITORY can still live under mcpplibs — `ocornut.imgui` is
32+
-- The wrapper REPOSITORY can still live under mcpplibs — `ocornut.imgui` is
3333
-- published from `mcpplibs/imgui-m` for exactly this reason. Where the manifest
3434
-- lives and whose code it describes are different questions.
35+
-- THE VERSION IS UPSTREAM'S, AND THE FOURTH SEGMENT IS THE PACKAGING REVISION.
36+
--
37+
-- `1.8.12` is what upstream released and what every one of the 2109 vendored
38+
-- files was compared against, byte for byte. A change to the PACKAGING moves
39+
-- the fourth segment: `1.8.12.1` orders strictly above `1.8.12`, because mcpp
40+
-- compares an arbitrary-length dot list with absent segments as zero, and
41+
-- satisfies every requirement `1.8.12` satisfies, because a bare requirement is
42+
-- a caret. A consumer therefore writes the number upstream released.
43+
--
3544
package = {
3645
spec = "1",
3746
namespace = "picolibc",
3847
name = "picolibc",
39-
description = "picolibc 1.8.12 as a source package: a freestanding C library compiled with the consuming program's own flags, so there is no multilib and no ABI convention to match",
40-
licenses = {"BSD-3-Clause", "BSD-2-Clause"},
48+
description = "picolibc as a source package: a freestanding C library compiled with the consuming program's own flags, so there is no multilib and no ABI convention to match",
49+
-- Counted over the files actually shipped, not guessed. picolibc descends
50+
-- from newlib and the vendored tree carries five identifiers: BSD-3-Clause
51+
-- (902 files), BSD-3-Clause-Clear (31), MIT (8), BSD-2-Clause-FreeBSD (5),
52+
-- BSD-2-Clause (4). `LICENSE.picolibc` is upstream's per-file mapping.
53+
licenses = {"BSD-3-Clause", "BSD-3-Clause-Clear", "MIT",
54+
"BSD-2-Clause-FreeBSD", "BSD-2-Clause"},
4155
repo = "https://github.com/mcpplibs/picolibc",
4256
type = "package",
4357

4458
xpm = {
4559
linux = {
46-
["0.1.1"] = {
60+
["1.8.12.1"] = {
4761
url = {
48-
GLOBAL = "https://github.com/mcpplibs/picolibc/archive/refs/tags/0.1.1.tar.gz",
49-
CN = "https://gitcode.com/mcpp-res/picolibc/releases/download/0.1.1/picolibc-0.1.1.tar.gz",
62+
GLOBAL = "https://github.com/mcpplibs/picolibc/archive/refs/tags/1.8.12.1.tar.gz",
63+
CN = "https://gitcode.com/mcpp-res/picolibc/releases/download/1.8.12.1/picolibc-1.8.12.1.tar.gz",
5064
},
51-
sha256 = "2265a49e58ed02b2166a4cbef40595a2250c7a0821156f96d4e04ae2086ccf89",
65+
sha256 = "8c148d5cce7857caeeeacacc95c28e1bbdf13cc06408876ae2fdaece2caaefa8",
5266
},
5367
},
5468
macosx = {
55-
["0.1.1"] = {
69+
["1.8.12.1"] = {
5670
url = {
57-
GLOBAL = "https://github.com/mcpplibs/picolibc/archive/refs/tags/0.1.1.tar.gz",
58-
CN = "https://gitcode.com/mcpp-res/picolibc/releases/download/0.1.1/picolibc-0.1.1.tar.gz",
71+
GLOBAL = "https://github.com/mcpplibs/picolibc/archive/refs/tags/1.8.12.1.tar.gz",
72+
CN = "https://gitcode.com/mcpp-res/picolibc/releases/download/1.8.12.1/picolibc-1.8.12.1.tar.gz",
5973
},
60-
sha256 = "2265a49e58ed02b2166a4cbef40595a2250c7a0821156f96d4e04ae2086ccf89",
74+
sha256 = "8c148d5cce7857caeeeacacc95c28e1bbdf13cc06408876ae2fdaece2caaefa8",
6175
},
6276
},
6377
windows = {
64-
["0.1.1"] = {
78+
["1.8.12.1"] = {
6579
url = {
66-
GLOBAL = "https://github.com/mcpplibs/picolibc/archive/refs/tags/0.1.1.tar.gz",
67-
CN = "https://gitcode.com/mcpp-res/picolibc/releases/download/0.1.1/picolibc-0.1.1.tar.gz",
80+
GLOBAL = "https://github.com/mcpplibs/picolibc/archive/refs/tags/1.8.12.1.tar.gz",
81+
CN = "https://gitcode.com/mcpp-res/picolibc/releases/download/1.8.12.1/picolibc-1.8.12.1.tar.gz",
6882
},
69-
sha256 = "2265a49e58ed02b2166a4cbef40595a2250c7a0821156f96d4e04ae2086ccf89",
83+
sha256 = "8c148d5cce7857caeeeacacc95c28e1bbdf13cc06408876ae2fdaece2caaefa8",
7084
},
7185
},
7286
},

0 commit comments

Comments
 (0)