fix(mk): a warned assembly must not fail the build - #94
Conversation
as370 returns IFOX00's severity as its exit status -- 0 clean, 4 warning, 8 error, 12 severe, 16 terminal -- and a warned assembly still punches its deck. On MVS that was COND=(8,LT): the ASM step returned 4 and the linkage editor ran anyway. make stops on any non-zero status, so a single warned card would fail a whole build over a diagnostic the assembler itself considers survivable. Until now that could not happen, because as370 had no severity-4 diagnostic at all; since mvslovers/cc370#72 it has two (IFO026 CHARACTERS APPEAR BETWEEN THE BEGIN AND CONTINUE COLUMNS, IFO069 TOO MANY CONTINUATION CARDS), and a comment card reaching column 72 in any hand-written module would now stop the build. The .asm and .s rules keep RC < 8 and re-raise anything at or above 8 with its own code, so `make` still reports `Error 8` for a real assembly error and the diagnostics reach stderr either way. Verified against all three cases: clean (RC 0) builds, warned (RC 4) builds, errored (RC 8) fails with Error 8. Not addressed here: the .c rule cannot do the same, because the cc370 driver treats any non-zero status from the assembler it invokes as fatal. Generated assembler carries no column-72 comment cards, so nothing hits that today.
|
Hold this until mvslovers/cc370#84 lands, and merge it after. The nsf370 team showed the hole in what this PR does on its own: cc370#84 splits the two cases in the assembler, where the distinction actually Measured after the split: libc370 743 modules clean, rexx370 three warnings and |
as370returns IFOX00's severity as its exit status — 0 clean, 4 warning, 8error, 12 severe, 16 terminal — and a warned assembly still punches its deck. On
MVS that was
COND=(8,LT): the ASM step returned 4 and the linkage editor rananyway.
makestops on any non-zero status, so one warned card would fail a whole buildover a diagnostic the assembler itself considers survivable.
$(Q)$(AS) $(ASFLAGS) -o $@ $< || { rc=$$?; [ $$rc -lt 8 ] || exit $$rc; }Verified: clean (RC 0) builds, warned (RC 4) builds with the diagnostic on
stderr, errored (RC 8) fails as
make: *** [build/bad.o] Error 8— the trueseverity survives into make's message.
Follow-ups, after this merged
nsf370 team showed the hole this rule has on its own:
IFO026is severity 4,so
RC < 8swallows it — andIFO026is not an ordinary warning, it means acard was eaten and the deck was punched anyway. Sent through exactly this rule,
a re-lengthened comment card that eats a
DCBDgivesexit code: 0and threecorrupted bytes. cc370#84 splits the two cases in the assembler, where the
distinction exists: a consumed comment stays severity 4, a consumed
statement becomes 8. Until it lands, this rule tolerates both.
.DELETE_ON_ERROR:followed in c80e23c: as370 writes its deck even when itflags the assembly, so a build stopped at RC 8 was leaving a
.onewer thanits source, which the next
makecalled up to date and linked.Not addressed here
The
.crule cannot do the same: the cc370 driver treats any non-zero statusfrom the assembler it invokes as fatal, and that is inside the driver. Nothing
hits it today — generated assembler carries no column-72 comment cards.