AT&T Compilation System


Description

The C compiler issued with AT&T Unix.

This compiler doesn't have any identifying macros. The assumption was "Well, you're on AT&T System V, so you must be using AT&T's C compiler."

Porting Bases

AT&T Unix was ported to a few architectures. Below is a list of known porting bases that AT&T referenced in sources and/or documentation. This might help in identifying the compiler.

ReleasePorting Base
SVR1PDP-11 and VAX
SVR2VAX, 3B2, and NS32000
SVR33B2
SVR4Intel x86 and SPARC1

Macros

TypeMacroEarliestDescription
IdentificationunixSVR1Defined on all Unix systems
Identificationpdp11SVR1Defined on PDP-11 hardware
IdentificationvaxSVR1Defined on VAX hardware
Identificationm68kSVR1Defined in System V/68 R12
Identificationu370SVR1Defined on VM/370 UTS I presume3
Identificationu3bSVR2Defined on 3B hardware4
Identificationu3b5SVR2Defined on 3B5 hardware
Identificationns32000SVR2Defined on NS32K hardware
IdentificationiAPX286SVR2Defined on Microport's System V/AT
Identificationu3b2SVR3Defined on AT&T 3B2 hardware
Identificationu3b20dSVR3Defined on AT&T 3B20 hardware
Identificationu3b15SVR3Defined on AT&T 3B15 hardware
IdentificationsysV68SVR3Defined on System V/68 Release 3
IdentificationclipperSVR3Defined on Intergraph CLIX
Identificationm88kSVR3Opus System V.3 for M880005 and DG/UX
Identificationi386SVR4Defined on Intel hardware
IdentificationsparcSVR4Defined on SPARC hardware

References to other things -- gcos, interdata, tss etc -- in /lib/cpp seem to me to be efforts to port the C compiler to those systems, possibly for the aim of cross-compiling Unix. I am going to ignore those definitions for now.

Conclusion

It is not easily possible to detect the compiler or the version of AT&T System V from preprocessor macros alone.

The ideal solution is to use a script that can invoke uname and create custom definitions.

Notes

These sorts of shenanigans continue with all derivatives of System V Release 3.

SCO System V Release 5 also slightly conflates this. I think the mentality was "This is Unix, we do not need to define anything that identifies what sort of Unix, because this is Unix."

AT&T System V was a mess.


  1. Source trees of System V Release 4 for the 3B2 exist. I am assuming that the 3B2 was the internal platform used by AT&T for the development of SVR4. It is also possible there could have been government and telco contracts that required AT&T to deliver SVR4 for the 3B2-600 or 3B2-1000. If you have any reliable proof of this (distribution tapes, documentation) please reach out to me. back

  2. I would assume that all other Motorola 68000 ports of System V also use m68k. One day I'll get AmiUX working so I can confirm this. back

  3. References to u370 in the System V Release 1 source code might be historical -- Amdahl ported 6th Edition Unix to run in VM/370. Amdahl also ported System V to VM/370, but that's unobtanium, so I cannot confirm the /lib/cpp predefined macros. back

  4. System V Release 1 kernel source makes use of u3b macro, but there is no makefile target. This makes sense as the 3B hardware was probably still under internal development at the time. For our purposes, this exists for System V Release 2. back

  5. Might also define opusback

 
Return to top
 
Created: