So gcc’s library bindings strongly preferring System V system calls to BSD was due to the flood of Solaris end-users dominating the late 80’s gcc development community to avoid paying Ed Zander extra for Sun’s Solaris compiler. This combined with Linus reading Sun workstation manuals to get a system call list gave linux a very System V flavor.
Interesting – if opinionated – view on the whole situation. Not sure if all the dates check out, but it’s a fun read nonetheless.
The referenced have-you-ever-kissed-a-girl reply to Miller is a fantastic bit of history. You need to read the ’96 thread to get the proper context, but well worth it.
Brings some context to the switchover from (System V) Unix to Linux on various big machines.
Could very well be that a number of older binaries could run directly, and that compiling anew didn’t need as much of a change.
Then again the history of Linux is one thing. Quite another is the future.
Edited 2015-01-29 22:26 UTC
The original choice of stack/nonstack went back to the PDP-11.
r0 through r4 were general registers, r0 used for function return values. r5 was the frame pointer, r6 the stack, and r7 the program counter.
Using r0 through r4 for system calls means that you don’t need the overhead for remapping to access data, computations to determine the address validity, AND double/triple indirect addressing to retrieve a parameter. The parameter is already there – in the register.
Most system calls used 3 or 4 parameters, so no more were needed except for some rare calls – so most of the actual calls were register based, and the runtime library could sped its time just setting up the system call itself.
This carries over for other architectures – 68000 had more registers even.
The nice for the VAX was the stack. The parameters ARE the system call (a chmod instruction followed by a jump to the system call) made things rather easy to use the stack for parameters…
But it all depends on which compiler style you want. If you want to remain compatible with various hosts, you use whatever they use.
Gcc couldn’t be used for sun kernel modules (different parameter lists, and some optimizations that weren’t allowed….) but were ok in user space when care was used.
Never really noticed a problem when using source code…