Mail Archives: djgpp/1996/07/20/11:15:44
In article <4s6811$s12 AT news DOT csus DOT edu>,
gmontem AT sfsu DOT edu (GEORGE ARUGAY MONTEMAYOR) writes:
> I may sound stupid, but what are pipes, and what does the -pipe do? Ack.
> I'm not very familiar with all of the command line options, so bear with
> me. :( Anyways, is there a document on all of the command line options
> GCC supports?
Pipes are something special in UNIX. At example, you redirect standard
output of the first program to the standard input of a second
program. This is the thing you do if you enter "DIR | MORE" in MSDOS.
But unlike UNIX, MSDOS is a single tasking operating system. It cannot
run more than one program at a time. So MSDOS uses temporary files to
simulate real pipes, the output of the first program is redirected
into a temporary file, the first program terminates, the second
program is started with standard input redirected to the temporary
file. All is done sequential. You have a lot of traffic on your hard
disk.
In UNIX all programs involved into a pipe operation are started
simultanously, no temporary files are used, all is done in memory
buffers. If you give gcc the -pipe option, cpp, cc1 and as are started
simulatanously, the output of cpp is given to cc1 by a pipe and the
output of cc1 is given to as by another pipe. No temporary files have
to be written and compilation is speeded up - if you have enough
memory installed to avoid swapping.
Harald
--
*-------*-------*-------*-------*-------*-------*-------*-------*-------*
This message was composed on a Linux machine.
PGP public key available on demand.
- Raw text -