Search code examples
clangfreebsdcc

-pipe flag of cc on FreeBSD 10.x


Yesterday i was working on FreeBSD jails. According to the documentation, I ran command make buildworld and it compiled lots of files using cc.
In logs i saw something like:

cc ... -pipe ... file.c

Now I'm curious about -pipe flag. I also searched in manual page but did not find anything about this flag.
Do you know what this flag exactly does?


Solution

  • I sent an Email to Salvatore Sanfilippo (author of Redis) and asked above question and he replied with:

    Hello, it simply will use Unix pipes instead of files in order to "chain" the different stages needed for the compilation process. When -pipe is used, as GCC starts to emit the assembler code, the assembler will start to read from the pipe and emit the machine code and so forth. It should optimize compilation speed, but in practice it helps very little AFAIK.

    Thanks to him.