Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [RFC] New policy: LDFLAGS should be respected
Date: Sat, 26 Jul 2008 17:07:35
Message-Id: 20080726180712.3d5b85d0@snowcone
In Reply to: Re: [gentoo-dev] Re: [RFC] New policy: LDFLAGS should be respected by Arfrever Frehtes Taifersar Arahesis
1 On Sat, 26 Jul 2008 18:54:20 +0200
2 Arfrever Frehtes Taifersar Arahesis <arfrever.fta@×××××.com> wrote:
3 > Respecting LDFLAGS provides also some some degree of optimization.
4
5 It's a *very* small degree, and certainly nowhere near on the scale of
6 the difference made by CFLAGS on some archs.
7
8 If CFLAGS only made the kind of difference that it made on x86 on other
9 archs, packages ignoring CFLAGS wouldn't be considered a big deal. It's
10 only because ignoring CFLAGS results in either certain types of
11 performance-critical code being *a factor of ten* slower or binaries
12 that won't run that it matters.
13
14 (As to why you get that factor of ten: gcc on sparc builds v7 code
15 unless you tell it not to. v7 has no hardware integer multiply or
16 divide, and doing it manually takes something like twenty clock cycles.
17 v9 and later, which is what nearly everyone uses, has hardware integer
18 multiply and divide, and can have several scheduled at the same time.
19 For crypto, this matters a hell of a lot.)
20
21 (And the breakage? Some archs need to be told to use IEEE floating
22 point via a -m CFLAG, or they'll generate code using the wrong ABI.)
23
24 > Potential benefits of LDFLAGS are sufficient to fix packages which
25 > ignore LDFLAGS. The difference in impact is irrelevant, because even
26 > bugs without any impact can be filed and should be fixed.
27
28 Of all the things people could be doing, making packages honour LDFLAGS
29 is an extremely minor issue at best. Whilst there's nothing wrong with
30 making the changes, it's not exactly the most productive use of limited
31 resources...
32
33 --
34 Ciaran McCreesh

Attachments

File name MIME type
signature.asc application/pgp-signature