UNIX was ported to the System/370 in 1980, but it ran on top of TSS, which I understand was an obscure product.
"Most of the design for implementing the UNIX system for System/370 was done in 1979, and coding was completed in 1980. The first production system, an IBM 3033AP, was installed at the Bell Laboratories facility at Indian Hill in early 1981."
https://web.archive.org/web/20240930232326/https://www.bell-...
Interesting. Summer 84/85 (maybe 85/86) I used a port of PCC to System/360 (done, I believe, by Scott Kristjanson) on the University of British Columbia mainframes (Amdahls running MTS). I was working on mail software, so I had to deal with EBCDIC/ASCII issues, which was no fun.
I sometimes wonder if that compiler has survived anywhere.
z/OS 3.1 is certified for UNIX 95, if this list is correct:
https://www.opengroup.org/openbrand/register/index2.html
That would include a C compiler, but yours is probably on tape somewhere.
Linux has been on this list, courtesy of two Chinese companies.