1 |
On Sun, Mar 22, 2015 at 10:03 AM, Mike Gilbert <floppym@g.o> wrote: |
2 |
> On Sat, Mar 21, 2015 at 3:52 PM, Fernando Rodriguez |
3 |
> <frodriguez.developer@×××××××.com> wrote: |
4 |
>> On Saturday, March 21, 2015 8:46:10 AM Mike Gilbert wrote: |
5 |
>>> On Thu, Mar 19, 2015 at 12:20 AM, Walter Dnes <waltdnes@××××××××.org> wrote: |
6 |
>>> > CFLAGS="-O2 -march=atom -mno-cx16 -msahf -mmovbe -mno-aes -mno-pclmul - |
7 |
>> mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 - |
8 |
>> mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rtm -mno- |
9 |
>> hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr |
10 |
>> -mno-xsave -mno-xsaveopt --param l1-cache-size=24 --param l1-cache-line- |
11 |
>> size=64 --param l2-cache-size=512 -mtune=atom -fstack-protector -mfpmath=sse - |
12 |
>> fomit-frame-pointer -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables" |
13 |
>>> > |
14 |
>>> > Is that correct (assuming that's my output)? |
15 |
>>> > |
16 |
>>> |
17 |
>>> I should warn you against including all of those -mno-xxx flags. This |
18 |
>>> has been known to break the build process for packages like chromium, |
19 |
>>> which always wants to build with SSE4 support and toggles it off at |
20 |
>>> runtime. Passing -mno-sse4.1 causes a build failure as it tries to use |
21 |
>>> macros that are not defined. |
22 |
>>> |
23 |
>> |
24 |
>> Isn't it possible that removing it for all packages would cause a more subtle |
25 |
>> problem with another faulty ebuild (like a program crashing due to an illegal |
26 |
>> instruction)? |
27 |
> |
28 |
> Passing -march=atom should be sufficient to ensure that you don't get |
29 |
> any illegal instructions. The -mno-XXX flags are redundant, and MOSTLY |
30 |
> harmless. |
31 |
> |
32 |
> In the case of chromium, the build system adds -msse4.1 for specific |
33 |
> files (just the ones using SSE4.1 instructons). When you have |
34 |
> -mno-sse4.1, this takes precedence and the build fails. |
35 |
|
36 |
To put it another way: back in the day before gcc -march=native, |
37 |
nobody would have told you to put a bunch of -mno-xxx flags in your |
38 |
global CFLAGS. They would have told you to find the -march setting |
39 |
most appropriate for your processor. |