This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Suggestion: Use -pipe by default
- To: Bourne-again Superuser <toor at dyson dot jdyson dot com>
- Subject: Re: Suggestion: Use -pipe by default
- From: nisse at lysator dot liu dot se (Niels Möller)
- Date: 07 Oct 2000 00:42:27 +0200
- Cc: pedwards at disaster dot jaj dot com (Phil Edwards), gcc-bugs at gcc dot gnu dot org
- References: <200010062052.PAA29736@dyson.jdyson.com>
Bourne-again Superuser <toor@dyson.jdyson.com> writes:
> Another argument for -pipe (implied by another contributor to this thread), is
> to minimize the use of the /tmp or /var/tmp for minor security
> improvement...
That was actually what I had in mind when I asked about this. I'm not
going to claim that it is a big security problem (it seems gcc opens
the files with mode 0600 and O_EXCL, which I think should at least
stop symlink-attacks). But if it is reasonable painless to avoid using
/tmp, that's something that should be done. So far it seems that the
arguments for not making -pipe default are:
1. Not all assemblers can read input from a pipe.
2. It is a significant performance hit on machines with small amounts
of memory (I would imagine that the amount of memory needed by as
is typically very small compared to that used by cc1, but I haven't
tried to verify that).
3. There may be a smaller performance hit on larger systems, because
of varios cache and pipe-i/o effects.
4. It changes the optimal argument to make -j. I didn't really
understand why that is a problem.
(By the way, a system call to create an open temp file on disk without
linking it into any directory all is on my OS wishlist, i.e. an
atomic open("foo", O_EXCL...); rm("foo"); ).
Regards,
/Niels