Repository navigation
mbt is the build tool for C and S/370 assembler projects that target MVS 3.8j: a project's Makefile is two lines, everything else is in project.toml, and compile, assemble, link and package all run on the host with the cc370 toolchain.
2.2.0 changes how a C module gets its startup. libc370 2.3.0 moved the C startup (@@CRT0) into libc.a, so mbt no longer links a startfile: the entry point decides, and the archive supplies it. It also makes the choice of @@START explicit instead of an accident of archive order. Requires cc370 >= 1.2.0; tested with cc370 1.4.0 and libc370 2.3.1.
Read this first
startup = "crt0"/"crt1"can go. Both now mean "no explicit startfile"; mbt warns once per project while a module still names them. Drop the key together with a[toolchain] libc370pin of at least 2.3.0: against an older libc370, a module without the key falls back tocrt0.o.- A dependency that defines
@@STARTnow needs a decision. libc370 is searched ahead of every dependency, so each module gets libc370's@@STARTunless it saysdep_startup = true. If a dependency archive defines@@STARTand a module sets neithertruenorfalse,makestops with exit 2 and names both. A CGI module that relies on its server's launcher setsdep_startup = true. - An unknown
startupvalue is an error (exit 2). It used to becomecrt0silently. startup = false(own entry point) andstartup = "crtm"are unchanged.- A C module's startup no longer sits at offset 0 of the load module; the directory entry points at it. Anything that branches to a module's load point instead of its entry point would notice.
What changed
| before (2.1.x) | now (2.2.0) | |
|---|---|---|
| C startup | crt0.o / crt1.o named on the link line |
@@CRT0 taken from libc.a by the entry point |
@@START |
whichever archive came first; dependencies could win silently | libc370 first; a dependency's only with dep_startup = true |
dependency defines @@START, module silent |
built green with the wrong one | exit 2, naming module and archive |
startup = "crt1" |
the startfile without the thread driver | deprecated, one warning per project |
unknown startup value |
treated as crt0 |
configuration error |
| sysroot detection | by crt0.o |
by libc.a, older sysroots still found |
libc370 without @@CRT0 in libc.a |
— | linked as before, with one warning |
Install
mbt is consumed as a git submodule:
git -C mbt fetch --tags
git -C mbt checkout v2.2.0
git add mbtThen remove startup = "crt0"/"crt1" from project.toml, pin [toolchain] libc370 = "2.3.1" (or at least 2.3.0), and add dep_startup where make asks for it. docs/MIGRATION.md describes the model in full.
Changelog
- The C startup comes out of
libc.a;startup =becomes optional, the entry point decides (#158). - libc370's
@@STARTfirst for modules and tests;dep_startupselects a dependency's (#62). - Sysroot found by
libc.a; a cc370 floor of 1.2.0 when the CRT comes from the archive; one warning on an older libc370 (#160). docs/MIGRATION.md: ld370's default since cc370 1.2.0 and what each startup is for (#157); maintainer documentation moved tointernals/(#155, #156).