On Sat, Jun 06, 2020 at 05:03:55PM -0500, Bruce Dubbs via lfs-dev wrote:
> On 6/6/20 4:39 PM, Ken Moffat via lfs-dev wrote:
>
> > Well, again thanks, but I'm not at all certain. For example, the
> > host system is the one where after its first boot I managed to run
> > the 'check' tests without failures. Now (normal desktop installed,
> > but same kernel) the tests which raise sigfpe again fail.
>
> You do a lot with different flags. I only use them when absolutely
> necessary. I suspect your issues have something to do with that.
>
Seems likely - the host system, where sigfpe seemed to be raised ok
when I tried it after the first boot, used -O2 in glibc (for glibc I
drop the hardening flags), the current build(s) was/were partly
intended to see if changing to '-O2 -march=native' was also ok.
But in general I'm much more interested in hardening, and I
typically force -O3 to try to cover some of the slowdown from that,
and -march=native to reduce overheads (i.e. use the best code for
the current CPU).
On a modern desktop there are always only-known-to-bad-guys
vulnerabilities, I prefer strength in depth (e.g. there have been
reports of vulnerabilities where some of the common hardening flags
mitigated the problem).
> Have you ever done any benchmarks comparing a build with and without your
> different flags? If you are only changing installed space and/or execution
> time by a few percent then it seems that the benefit is not worth the
> effort.
>
What I found when playing with variations of the flags last year was
that there seemed to be a large variation in build times, e.g. I
would expect a -O3 compile of a package to take longer than -O2, but
sometimes the converse was true (testing with one full build with
each set of flags, looking at build times for selected packages).
For some things, I agree that there is no time benefit (in fact
there is usually a time loss when comiling with higher
optimization). But for reasonable hardware that is a price I'm
willing to pay (for my laptop and athlon 200ge used as a server, I
stick to -O2 with hardening).
> Even if a task takes two seconds and you have a 50% reduction to one second,
> is it really important? A 10% reduction from an hour to 54 minutes is
> really not significant either unless you are doing that task continuously.
>
> -- Bruce
Time is no-longer the most important factor for me, although I'm
getting the impression that the current toolchains (both gcc and
clang) get slower with each release.
Thanks for the thoughts.
ĸen
--
+++ OUT OF CHEESE ERROR. REDO FROM START +++
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page