Philippe Michel <[email protected]> writes:

> Second question, for those who make binary packages for various
> distributions :

> With gnubg, the -O3 compilation flag brings a significant speed
> improvement. -ffast-math helps as well.

> What is your policy about such flags in upstream sources ? Do you follow
> them ? Override them ?

In general, in Debian, we set some default CFLAGS to use -O2 and a bunch
of security flags.  The security flags we just do across the board without
trying to figure out whether or not a given package necessarily benefits
from them.

I can pretty easily override that, though, and would tend to follow your
recommended flags (although I'd probably add the security flags in because
we have various audits to check for that, and even though it's mostly
pointless for gnubg, it's easier to standardize).  Debian normally doesn't
use -O3 because, for a lot of packages, -O3 is actually slower than -O2
because more aggressive loop unrolling blows the CPU instruction cache,
but that can vary by package.

The only caveat is that we build everything for a bunch of architectures,
and sometimes it's been necessary to back off on gcc optimization flags to
avoid bugs on some platforms.  But that's fairly rare.

> Finally, would it cause trouble to someone if gnubg was build as C99
> code (-std=gnu99 really, since it would have to cater with embedded
> asm).

Would be fine here, although I'm surprised it would make much difference.
For C, it normally doesn't.  Are you thinking about doing that just to get
better compiler warnings?

-- 
Russ Allbery ([email protected])              <http://www.eyrie.org/~eagle/>

_______________________________________________
Bug-gnubg mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-gnubg

Reply via email to