Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
march vs mtune
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3705
Location: Dallas area

PostPosted: Tue Mar 11, 2014 10:35 am    Post subject: Reply with quote

generic being either i386 or x86-64 depending on whether you want 32 or 64 bit.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6970

PostPosted: Tue Mar 11, 2014 10:40 am    Post subject: Reply with quote

So we should assume -march=native == -march=corei7 but when ask, gcc doesn't tell you that.
So doubt exist, gcc bug... The solve is easy : add any missing flags in your cflags : it might not be need, but won't do anything bad, it might be need so it's good.

Until now, there was 0 impact on forcing them to remove the doubt... Now it have an impact if it mean gentoo devs will refuse bug report because i specify them.

Look out specially at -mno-sse4 that is always enable, except when using native.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6970

PostPosted: Tue Mar 11, 2014 10:43 am    Post subject: Reply with quote

Anon-E-moose wrote:
generic being either i386 or x86-64 depending on whether you want 32 or 64 bit.

I get it good Anon-E-moose, it was to be clear, my first output use -march=i686 to specify generic 32bits arch like you suggest.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3705
Location: Dallas area

PostPosted: Tue Mar 11, 2014 10:46 am    Post subject: Reply with quote

For distcc I would pick the lowest common denominator chip that I was planning on running the binary on and use that.

But the point about bug reports is that I would rather see
march=<some cpu> and maybe a few added instructions vs a long list of 30 or so -m commands.
It's just easier to read.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3705
Location: Dallas area

PostPosted: Tue Mar 11, 2014 10:56 am    Post subject: Reply with quote

I don't follow the corei7 line, haven't for a while, but the difference between march=native on an corei7 and setting march=corei7 might be due to the fact that with native, gcc asks the chip itself what it can do, and I'm not sure if every corei7 ever created uses exactly the same instruction set. So setting corei7 may give the base capabilities of the corei7 line. And it could be that when gcc added corei7 arch, that intel only gave them those instructions as a model. It's not necessarily a bug in other words.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6970

PostPosted: Tue Mar 11, 2014 10:57 am    Post subject: Reply with quote

Anon-E-moose wrote:
For distcc I would pick the lowest common denominator chip that I was planning on running the binary on and use that.

That's the problem, you mistake distcc usage.

distcc is using any other host to build a binary for the calling host, that's why you cannot use native, because helper hosts will produce native code for them, and not code for your calling host.
It would be counter productive to use lowest denominator as the aim is not to build a generic binary, but a binary for the calling host.
It would even be just impossible, what is common lowest denominator of a i686 host help by an ia64 helper ? With distcc the ia64 (ok need cross building) and the i686 are just making the binary for the calling host. So you can have hosts that are i486, a pentium something... doing the corei7 binary for the corei7 calling host.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6970

PostPosted: Tue Mar 11, 2014 11:02 am    Post subject: Reply with quote

Anon-E-moose wrote:
the difference between march=native on an corei7 and setting march=corei7 might be due to the fact that with native, gcc asks the chip itself what it can do, and I'm not sure if every corei7 ever created uses exactly the same instruction set.

That's the problem "might be due"... the doubt... so in doubt specifying them just remove the doubt.

Anon-E-moose wrote:
So setting corei7 may give the base capabilities of the corei7 line. And it could be that when gcc added corei7 arch, that intel only gave them those instructions as a model. It's not necessarily a bug in other words.

I didn't look at intel specs, but seriously, i really doubt any corei7 exist without at least see1 capability...
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3705
Location: Dallas area

PostPosted: Tue Mar 11, 2014 11:09 am    Post subject: Reply with quote

krinn wrote:
Anon-E-moose wrote:
the difference between march=native on an corei7 and setting march=corei7 might be due to the fact that with native, gcc asks the chip itself what it can do, and I'm not sure if every corei7 ever created uses exactly the same instruction set.

That's the problem "might be due"... the doubt... so in doubt specifying them just remove the doubt.


I'm certainly not trying to tell anyone not to use a long list of -m flags.
More power to them if they want to type it all in.

All I was doing was explaining why I wouldn't want to see a long list of flags to slough through in a bug report.

As for distcc reread this is what I said "For distcc I would pick the lowest common denominator chip that I was planning on running the binary on and use that. "
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6970

PostPosted: Tue Mar 11, 2014 11:20 am    Post subject: Reply with quote

Anon-E-moose wrote:
All I was doing was explaining why I wouldn't want to see a long list of flags to slough through in a bug report.

They aren't ricing stuff, just default ones, you cannot dismiss a bug report for cflags that are nothing but just the same as when native is use.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Tue Mar 11, 2014 10:54 pm    Post subject: Reply with quote

Jeezus, get a room, you two ;p

(That means: take it to pm, if find yourself arguing tit for tat.)

With respect Anon-E-Moose you misunderstood on the last page: the flags are not identical, and when using distcc it's better to pass at least some of the flags native would give on the CHOST, in CFLAGS, for the cases we're discussing (where you're building for that machine, and not a generic distribution.)

By all means winnow them down, perhaps taking out -mno-*, but the others are required. (Apart from mmx (sth), sse1 and 2 as they're required for the amd64 platform.) Cache(-line)-sizes and msse3 and 4 in above output show that.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3705
Location: Dallas area

PostPosted: Wed Mar 12, 2014 12:11 am    Post subject: Reply with quote

steveL wrote:
With respect Anon-E-Moose you misunderstood on the last page: the flags are not identical, and when using distcc it's better to pass at least some of the flags native would give on the CHOST, in CFLAGS, for the cases we're discussing (where you're building for that machine, and not a generic distribution.)


I thought it was clear that I understood that! Obviously not.

Yes, one might have to give either complete flags OR start from a base and add the ones needed.

Fine, I'll recuse myself from this discussion.

Y'all have fun (and no I'm not upset but I'll leave it as it is) ;)
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum