This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Running GCC as root (was Re: [PATCH - ping] Don't unlink /dev/null on darwin)


On Mon, Feb 14, 2005 at 11:03:25AM -0800, Zack Weinberg wrote:
> Where I'm coming from is, this (running gcc as root) *was* just bad
> practice, and/or a matter of site policy, up till someone found a
> scenario where a legitimate invocation caused breakage when run as
> root -- and not breakage that we have any way of fixing, since it
> boils down to a bug in a vendor assembler.  At that point it becomes
> something that should be disallowed, IMO.

Then refuse to invoke the assembler pointing at /dev/null on that
platform if you want to work around the bug.

> Yes, this causes massive breakage.  Well, (a) all examples so far have
> been cases where there are arguable bugs in the makefiles/scripts, and
> (b) we're bumping the major version number; now is the time for
> massive breakage.  Also, I don't think anyone has actual data on how
> widespread the breakage would be.  (Feel free to speak up if you know,
> or can do experiments and find out.)

No.  Just because we're bumping the version number does not give us any
excuse for breakage.

I was not making up examples.  You will bust Debian package builds back
to the stone age.  For instance, many software distributions will run
configure during 'make clean', and Debian packages run 'make clean' as
root (or fakeroot).

> The check was placed in toplev.c instead of gcc.c precisely because
> there are genuine needs to run the preprocessor (i.e. gcc -E) as root.

Huh?  You admit legitimate uses of PART of gcc as root, and are
no legitimate uses of the REST of it?

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]