On 5/18/2011 12:23 PM, Dr Andrew John Hughes wrote:
On 07:25 Mon 16 May     , Erik Trimble wrote:
On 5/16/2011 6:03 AM, Andrew Haley wrote:
On 05/16/2011 12:08 PM, Dalibor Topic wrote:

The reason I'm asking is that I'm wondering if this is something we
should expect to crop up in different parts of the code base, or
whether it's a one off due to some specific thing some distros chose
to do different from each other.
That's hard to say.  It certainly could crop in other parts of the
code base, and I'm surprised it doesn't happen regularly.  I'm rather
appalled that distros do this kind of thing, TBH.

Andrew.

Just so I understand this - you're saying that by running *just* the
'gcc' command on different linux systems, that actually implies that gcc
gets invoked with some set of flags already set? And, that there's no
way to just invoke "vanilla" gcc ?

If so, that's, ah, mindboggling (not in a good way)...

Maybe I'm misreading what you said, but I don't find it mindboggling that
an application would have default settings for certain options.  That's
basically what we're talking about here.  If a warning can be either on
or off, then one of these two has to be a default for that exact situation
when the user does just say "gcc" and doesn't specify whether they want
the warning or not.
Yes, but gcc isn't *just* an application, it's an application *builder*.

If people want to pay more than lip service to portability, then the defaults set for such an entity should be ONLY those which are universal - that is, distro A should never be setting defaults that distros B & C don't also set.

Given the current state of things, that means gcc should only be set with the defaults that the GNU folks set, and NOT anything specific to a distro.

If a distro wants something specific in the way of flags for itself, it should have a wrapper or some such for itself to call, but the generic 'gcc' should behave EXACTLY as it does on all other platforms. This applies to all "builder" programs (ld, cpp, et al.)

Unless of course, portability isn't a concern, which, frankly, for many Linux distros, doesn't seem to be anywhere on their radar.


A number of distros change the defaults of gcc in order to produce more
warnings, as some can point to real security issues.  This runs afoul of
HotSpot's use of -Werror which presumably assumes the default set of
warnings used by a certain version of gcc.  I think the appropriate solution
to this is, as Andrew suggests, to make explicit our preference for that
warning rather than relying on the implicit defaults.

--
Erik Trimble
Java System Support
Mailstop:  usca22-123
Phone:  x17195
Santa Clara, CA
Timezone: US/Pacific (GMT-0800)



--
Erik Trimble
Java System Support
Mailstop:  usca22-123
Phone:  x17195
Santa Clara, CA
Timezone: US/Pacific (GMT-0800)

Reply via email to