Skip to content

CC/370 v1.2.0

Choose a tag to compare

@github-actions github-actions released this 04 Oct 12:49
· 136 commits to main since this release
b17cd14

CC/370 (cc370) 1.2.0 is the host-native MVS 3.8j toolchain -- C compiler, assembler, linker and the transport tools -- with ld370 now linking the way IEWL does. Compiling needs no change from 1.1.x; as370 reports a few more of IFOX00's diagnostics, and linking is not quite a drop-in: modules no longer come out RENT and REUS unless you ask for it (see below). It works with LIBC/370 (libc370) >= 2.1.0 (the .deb/.rpm say so; install.sh picks the newest LIBC/370 that accepts this CC/370).

Read this first: what a caller can see

  • ld370 no longer marks every module RENT and REUS (#100). IEWL marks neither unless told (a plain IEWL link lists ATTR 03F2), and ld370 now does the same. A module that declares no attributes is linked with neither -- declare them with --rent, --reus and --refr, which are independent: IEWL's RENT is --rent --reus. --norent/--noreus are still accepted and change nothing on their own. A --pack of a pre-built -iebcopy keeps that member's own attributes. Why it matters: a server that loads a module once may share one copy of a RENT module between concurrent requests, and CC/370 keeps writable statics in the CSECT -- so a module that is not really reentrant must not claim to be.
  • A duplicate CSECT keeps its first definition (#102), as IEWL does. The later copy is dropped with its text, space, relocations and entries. Until now the last copy won and every copy's text stayed in the module.
  • Two explicit objects defining the same entry now draw a warning (#478), as IEWL's IEW0241; the first definition is kept, as before.
  • as370 raises eight more of IFOX00's diagnostics -- IFO025, IFO043, IFO085, IFO123/IFO124, IFO168, IFO211, IFO254 -- exactly where IFOX00 raises them. Source that IFOX00 flags and as370 used to pass may now end with a higher return code, as it would on MVS.
  • Homebrew links LIBC/370 in with one symlink (#726, #732): a file a later LIBC/370 adds is seen at once, without brew reinstall cc370.

Fixed: before and now

before now
a nested function reading its parent's variables (#686) read through the page-table register -- silently wrong values static chain in R0, correct
its trampoline (#686) clobbered R14, 9-character label, copied with a routine LIBC/370 lacks R15-based, @@LTR0, copied with memcpy
default attributes of a linked module (#100) RENT + REUS neither, as IEWL (03F2)
two CSECTs of one name (#102) last copy won, all text kept first kept, the rest dropped
xmit370 create with a --blocksize below 268 (#118) declared a BLKSIZE smaller than its own directory records -- refused by RECEIVE at least 296; a RECFM=F, BLKSIZE 80 library is received
INMR02 #2 INMRECFM in an xmit370 transmission (#117) differed from every real transmission 4802, as they carry
as370 with more than 128 diagnostics of one kind (#86) the rest dropped silently, and the return code with them every one counted
BRXH / BRXLE in as370 (#56) assembled undefined operation codes, as in IFOX00
TPROT / IPTE in as370 (#56) not known IFOX00's formats: SSE and S

Install

The installer -- it installs CC/370 and the newest LIBC/370 that accepts it:

curl -fsSL https://github.com/mvslovers/cc370/releases/latest/download/install.sh | sh

With Homebrew (macOS, Linux):

brew trust mvslovers/tap            # once
brew install mvslovers/tap/cc370    # cc370 and, as its dependency, libc370
brew upgrade mvslovers/tap/cc370    # an existing install

Or the pieces, all listed in SHA256SUMS:

file what
cc370-1.2.0-{darwin,linux}-{amd64,arm64}.tar.gz the toolchain for one host
cc370_1.2.0_{amd64,arm64}.deb Debian/Ubuntu; depends on libc370-dev (>= 2.1.0)
cc370-1.2.0.{x86_64,aarch64}.rpm Fedora/RHEL; requires libc370-devel the same way
install.sh the installer above

Full changelog

Added

  • A second sysroot (#726): besides its own cc370/{include,lib,macros},
    CC/370 searches cc370/libc370/{include,lib,macros} -- headers in cc1,
    crt0.o and -lc through the driver, macros in as370 -- after the tree's
    own. A LIBC/370 kept in its own tree can be linked in with one symlink;
    the Homebrew formula moves to that with this release, so a file a later
    LIBC/370 adds no longer needs brew reinstall cc370. make test-sysroot
    (part of make test-cc370) checks all four with a stand-in libc370.
  • Homebrew (#699): brew trust mvslovers/tap, then
    brew install mvslovers/tap/cc370 from the tap mvslovers/homebrew-tap,
    on macOS and Linux (Homebrew 7 refuses a dependency from an untrusted
    tap); it depends on
    mvslovers/tap/libc370 and links LIBC/370's sysroot into its own tree.
    release.yml renders the formula (packaging/homebrew/) and pushes it to
    the tap with a deploy key held in the release environment (v* tags
    only); homebrew.yml then installs it from the tap on all four hosts. A
    file a later LIBC/370 adds is seen after brew reinstall cc370 until CC/370
    searches a second sysroot (#726).
    With this release the formula links LIBC/370 with one symlink, and that
    restriction is gone (#732).
  • as370: TPROT and IPTE, in the formats IFOX00 gives them (#56,
    measured against IFOX00): TPROT is SSE D1(B1),D2(B2), IPTE the
    S-format D2(B2) -- not RRE.
  • as370: S' and I' are evaluated in conditional assembly (#258); every
    value confirmed against IFOX00.
  • ld370: --entry seeds automatic library call (#107), so the CRT can live
    inside an archive: an entry still undefined after the fixpoint is pulled by
    name.
  • New as370 diagnostics, as IFOX00 raises them: IFO025 for an
    out-of-sequence card under ISEQ (#128), IFO043 for a macro prototype named
    after an operation (#297), IFO254 for an ill-formed second operand of END
    (#441), IFO085 for a library member without a MACRO header (#427), IFO168
    for an expression of more than 20 terms (#272), IFO211 for an S instruction
    with a second operand (#56), IFO123/IFO124 for S'/I' without a scale
    (#258).
  • ld370 warns when two explicit objects define the same entry (#478), as
    IEWL does (IEW0241); the first definition is kept, as before.

Changed

  • ld370 links modules neither RENT nor REUS by default (#100) -- IEWL's
    default (a plain IEWL link lists ATTR 03F2); until now every module was
    marked RENT+REUS unless told otherwise. That claim had consequences: a
    server that loads a module once shares one copy of a RENT module between
    concurrent requests (measured on MVS: use count 3), and CC/370 keeps
    writable statics in the CSECT. A module that declares no attributes is
    now linked with neither RENT nor REUS; declare them
    with --rent,
    --reus and --refr -- orthogonal, so IEWL's RENT is --rent --reus.
    --norent/--noreus are still accepted and now change nothing on their
    own. A --pack of a pre-built -iebcopy keeps that member's own
    attributes.
  • ld370 keeps the first definition of a duplicate CSECT (#102), as IEWL
    does: the later copy is dropped with its text, space, RLDs and entries, and
    the sections after it move up, as in IEWL's layouts (measured on MVS).
    Until now the last copy won and every copy's text stayed in the module.
  • dasm370 names every section of a multi-section deck on stderr (#439),
    and returns rc 4 when the section it took is empty while another is not.
  • xmit370: the unloaded form declares at least BLKSIZE 296 (#118), so a
    RECFM=F library with BLKSIZE 80 RECEIVEs (measured on MVS; 288 is refused).

Fixed

  • Nested functions (#686): the static chain was passed in R10, which every
    prologue reloads with the page table, so a nested function read its parent's
    variables through the wrong address -- silently. It is now R0; the
    trampoline no longer clobbers R14, its label fits in 8 characters, and it is
    copied with memcpy. Measured on MVS.
  • xmit370: INMR02 #2 INMRECFM is 4802 (#117), as every real transmission
    carries (a RECEIVE on MVS accepts it).
  • as370: the return code no longer depends on the 128-entry diagnostic
    lists
    (#86); MNOTE 0 counts among the flagged statements (#682);
    BRXH/BRXLE are undefined operation codes, as in IFOX00 (#56).
  • make test-corpus builds its baseline again (#744).