Skip to content

CC/370 v1.3.1

Choose a tag to compare

@github-actions github-actions released this 05 Oct 11:00
· 67 commits to main since this release
2c1485e

CC/370 (cc370) 1.3.1 is a patch release of the host-native MVS 3.8j toolchain. It fixes the weak definitions that 1.3.0 introduced. Nothing else changes: compiling, linking and every command line behave as in 1.3.0, so it is a drop-in. It works with LIBC/370 (libc370) >= 2.1.0 (install.sh picks the newest LIBC/370 that accepts this CC/370).

Read this first: what a caller can see

  • Only code that uses __attribute__((weak)) is affected. A weak definition is now exported, and a weak name may be used before it is defined in the same file.
  • A weak reference's WXTRN now appears at the end of the generated assembler rather than ahead of the first use. The object deck has the same WX entry; IFOX00 gives the same entry for either placement.

Fixed: before and now

1.3.0 1.3.1
a weak definition (int f(void) __attribute__((weak)); int f(void) {...}, or a weak initialized variable) compiled but not exported (no LD), so nothing could link to it exported like an ordinary definition; still warns -Wweak-definition
a weak name used, then defined in the same file rc 8 (IFO196, symbol previously defined) rc 0, exported

Install

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.3.1-{darwin,linux}-{amd64,arm64}.tar.gz the toolchain for one host
cc370_1.3.1_{amd64,arm64}.deb Debian/Ubuntu; depends on libc370-dev (>= 2.1.0)
cc370-1.3.1.{x86_64,aarch64}.rpm Fedora/RHEL; requires libc370-devel the same way
install.sh the installer above

Full changelog

Fixed

  • cc370: weak definitions are exported, and a weak name may be defined
    after it is used
    (#872). Both were broken in 1.3.0.
    • A weak definition was compiled but not exported (ENTRY=NO, no LD), so
      nothing could link to it. It is now exported like the ordinary
      definition it is.
    • A name declared weak, used and then defined in the same file got its
      WXTRN at the first use, and the definition then failed with IFO196,
      rc 8. The WXTRN is now written at the end of the assembly and only for
      a weak name that stayed undefined; measured on IFOX00, a WXTRN after
      the V-cons gives the same WX entry.