tech-pkg archive

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

Re: Package optimizations



coypu%sdf.org@localhost writes:

> there's some discussion about whether we should allow packages to have
> their own optimization flags.
>
> Reasons for:
> 1. We will never be able to declare a package as having more than -O2.

I don't follow this statement.  Why can't CFLAGS globally have -O3?  And
what do you mean by "declare a package".

> Decisions about things like -ffast-math are only possible by people who
> regularly modify the code.
> We are unnecessarily missing optimizations upstream has tested as OK.

That makes sense.

> 2. Disabling optimizations and relying on CFLAGS, as we currently do,
> might be missed if ${CFLAGS} isn't used by mistake.

Can you explain "disabling"?  Do you mean "we have a patch to remove
things from upstream's configure that checks if -O2 (whatever) works and
if so adds it to CFLAGS?  How prevalent is this?

"CFLAGS isn't used by mistake": that seems like a bug in upstream and/or
our packaging, which needs fixing regardless, so that setting debug
flags globally works.

Also, what if somebody wants to build pkgsrc with CFLAGS="-O0 -ggdb"?
Shouldn't that result in every package (every C file) being built that
way?   upstream configure that thinks it knows better seems to fight
that.  Is this question, whose judgement should win, the essence of this
issue, or is there something else?


Home | Main Index | Thread Index | Old Index