1 |
On Sun, Sep 28, 2014 at 10:56 PM, walt <w41ter@×××××.com> wrote: |
2 |
> On 09/28/2014 01:44 AM, Jorge Almeida wrote: |
3 |
>> I'm having a somewhat disgusting issue on my Gentoo: binaries are |
4 |
>> unaccountably large. |
5 |
>> |
6 |
|
7 |
> Are you cross-compiling for different hardware? I'm just curious what results |
8 |
> you get with --march=native. |
9 |
|
10 |
Nope. Actually, I compiled with --march=native, with no difference |
11 |
(probably because my code is not fancy enough to make use of whatever |
12 |
stuff that pulls), but then tried i686 just to enable comparing with |
13 |
non-Gentoo systems. |
14 |
The purpose is to have small static binaries compiled against dietlibc |
15 |
to be used in the same computer (compile once and forget about future |
16 |
software incompatibilities!). I compiled against glibc to make sure |
17 |
the problem is not with dietlibc. |
18 |
> |
19 |
> Also, I looked up data-sections and function-sections (which I'd never heard |
20 |
> of before today :) The gcc man page says the resulting executable will be |
21 |
> larger and slower, and not to use them "unless there are significant benefits" |
22 |
> but then doesn't say what those benefits might be. Hm, cryptic. |
23 |
> |
24 |
I found those flags in the net (probably StackOverflow), looking for |
25 |
ways to optimize size. Maybe what you read was not meant to static |
26 |
compiling? |
27 |
Anyway, I used these flags in 4 systems (including LFS in the same |
28 |
computer as Gentoo) and only the Gentoo system has this behaviour... |
29 |
|
30 |
Thanks, |
31 |
|
32 |
Jorge |
33 |
> |