This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils 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: Some stuff for 0.159+


On Thursday, January 23, 2014 14:32:29 Mark Wielaard wrote:
> On Wed, 2014-01-15 at 10:33 -0500, Mike Frysinger wrote:
> > On Wednesday 15 January 2014 10:16:34 Mark Wielaard wrote:
> > >   https://bugzilla.redhat.com/show_bug.cgi?id=1037051
> > >   elfutils FTBFS if "-Werror=format-security" flag is used
> > >   Currently we just remove that flag, but if we can rewrite the code to
> > >   enable it by default for all files that would be nice. Dunno if that
> > >   is really possible in all cases though.
> > 
> > i'd argue that this is good justification for my --disable-werror patch. 
> > there are plenty of compiler versions & flags that people can enable on
> > platforms that'll trigger warnings elfutils doesn't expect.  users are
> > left in the crappy scenario of either they don't get to build anything at
> > all, or they have to manually edit the Makefiles to delete the -Werror
> > flag.  i don't really understand the desire to force -Werror on everyone
> > all the time.
> > 
> > then bugs like this turn into a wish list item rather than FTB and can be
> > evaluated as such.  using crazy flags ?  then pass in --disable-werror and
> > we don't care.  using reasonable flags ?  then we'll look at fixing your
> > report, but you can work around it in the mean time with
> > --disable-werror.
>
> I do see your point, although I am unsure how to distinguish "crazy"
> from "non-crazy" compile flags. Also if people really insist on using
> crazy compile flags can't they just also add -Wno-error to CLFAGS
> themselves?

browse Gentoo bugs and you'll find a wide variety of flags :)

you're right that adding -Wno-error themselves for exceptional cases should 
work since the build prepends the flag to the user's flags.  but all the other 
major projects out there have standardized on --disable-werror which makes it 
a no brainer to utilize.  elfutils does the right thing with CFLAGS, but there 
are lots of projects that do not, so you end up being hesitant to dig down 
into the build system with things like this.  the configure flag takes all 
that away.

> I do like to fix any non-crazy issues though. I just posted a patch to
> handle -Wformat=2 (which includes -Wformat-security) by default for all
> files now to solve the above bug. It is not the prettiest solution, but
> not terribly ugly either (nothing we didn't do before in other places,
> but we will see if someone yells and screams about the change).

i'm glad elfutils supports the extra -W flags.  but it's a bit of a losing 
battle.  gcc will always be introducing new -W flags, or changing how the 
existing ones behave, or adding their own false positives.  it's admirable 
that the project tries to stay ahead of the curve (and it is certainly much 
more open than it was in the past which is great), but i don't think it's a 
battle that can be reasonable won all the time.

i have to support elfutils on every Gentoo arch with a variety of binutils 
(usually the last ~2), gcc (usually the last ~3), and glibc (usually the last 
~3) versions.  and elfutils itself is not always the latest release (since it 
has to undergo testing before it can be moved into the stable area).  
backporting warning fixes for every entry in that matrix is not worth anyone's 
time.  Gentoo might have a bit more entries than most distros, but i doubt it 
is the only one to run into this problem.

> Do you have any other examples (or just crazy examples to know what
> people out there really do)?

i see people building with -O0 -g and -flto and omit frame pointer and various 
-finline flags.  and whatever the latest hotness is that gcc has released 
(like the new graphite stuff).  those have a way of tickling warnings that 
aren't useful.
-mike

Attachment: signature.asc
Description: PGP signature


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