dmidecode-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [dmidecode] A lot of compile time warnings on ia64


From: Jean Delvare
Subject: Re: [dmidecode] A lot of compile time warnings on ia64
Date: Sat, 24 Sep 2005 12:26:40 +0200

Hi Petter,

[Petter Reinholdtsen]
> I have no way to test this on an ia64 machine.  The only info I have
> is from the build log. :(

Well, if the ia64 dmidecode binary was failing, I guess you'd have had
quite a few reports in the Debian bug tracking system aleady. As long
as nobody complains, I guess we can assume it just works.

> I do not see the point of asking the compiler to report less warnings,
> as long as the build still succeeds, so I'll keep them.  I believe it
> is a good idea to ask the compiler to help me as much as it can to
> find questionable code.  I'll try to remember that you believe the
> warnings caused by -ansi and -pedantic are irrelevant.

Precisely, I have seen -ansi and -pedantic complain about
non-questionable code quite a few times. This is the reason why I
removed them. One problem I see if you leave them is that the compiler
doesn't tell you which flag triggered which warning, so I'll never know
which warnings I want to ignore and which ones I need to care about.
This makes my analysis work harder when you point me to your build logs.

I also seem to remember that -ansi -pedantic caused your builds to
fail once already, due to an "inline" keyword. As a consequence, you
are applying a patch to the Debian build to work around it. This has
only drawbacks as far as I can see: more maintenance work for you,
longer build time due to the additional patching requirement, and
differences in code which could virtually cause Debian users to have a
version of dmidecode that differs in behavior from mainline, making
bugs harder to track. All that for what benefit? Almost none to date as
far as I can see.

> The '-Os' is included to make the binary as small as possible, as it
> is used by the debian install system.

I didn't know about this flag, thanks for pointing it out.

Beware that -Os seems to change the way the compiler aligns the data.
This trades execution speed for size, which is wanted in your
situation, but also sounds curiously related to the warnings you have.

I've made some comparison on dmidecode size (on i686, figures may not
be relevant for ia64 unfortunately):

-O0: 78k (62k stripped)
-Os: 64k (48k stripped)
-O1: 69k (53k stripped)
-O2: 71k (54k stripped)
-O3: 73k (61k stripped)

Bottom line is that stripping saves more than -Os (of course, both
together saves even more). So if -Os actually seems to cause trouble on
ia64, you may want to use stripped -O1 instead.

-- 
Jean Delvare




reply via email to

[Prev in Thread] Current Thread [Next in Thread]