You are not logged in.

#1 2014-08-16 14:01:45

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

makepkg default -march=x86-64 cflag

As default in makepkg.conf, I see:

CFLAGS="-march=x86-64 ...

Yet on:
https://gcc.gnu.org/onlinedocs/gcc-4.9. … 64-Options

I don't see that as being an accepted value. Has this changed in a recent gcc version, meaning gcc is probably just ignoring it?

A quick google suggests it could be "equivalent" to -march=k8
...but the asm produced from a very simple c program differs between them, so that's not the case

EDIT: ...as march sets mtune unless told otherwise... it was tuning for k8. tuned both for the same cpu and the output is the same, so it does seem to translate to march=k8
I still wonder why it's not on the gcc documentation page though

Last edited by stevenhoneyman (2014-08-16 14:07:56)

Offline

#2 2014-08-16 14:34:11

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,730
Website

Re: makepkg default -march=x86-64 cflag

Use march=native for your own purposes... you just can't use the packages on other machines unless identical processors.

CFLAGS="-march=native -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4"
CXXFLAGS="${CFLAGS}"

Offline

#3 2014-08-16 14:45:43

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: makepkg default -march=x86-64 cflag

Thanks, but yes, they're to share amongst my machines or I would use native - none of them have anything older than a 2nd gen Core i5... but I wouldn't want stuff not to run on a "relatively new" processor either (including AMD).

No reason for me to support legacy/ancient CPUs, so I'm thinking

-march=nocona -mtune=haswell

is probably my best bet?

Offline

#4 2014-08-16 14:52:29

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,730
Website

Re: makepkg default -march=x86-64 cflag

No. If they are all different use the default.

Offline

#5 2014-08-18 02:58:21

Napaim
Member
From: Scotland
Registered: 2009-03-09
Posts: 26

Re: makepkg default -march=x86-64 cflag

You really should just stick with the `native` options`, it's a lot less work and you rarely get any benefit from specifying.

Offline

#6 2014-08-18 16:31:22

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: makepkg default -march=x86-64 cflag

Napaim wrote:

You really should just stick with the `native` options`, it's a lot less work and you rarely get any benefit from specifying.

Why would I use native when I need to support some other processors?

Offline

#7 2014-08-18 18:55:06

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,730
Website

Re: makepkg default -march=x86-64 cflag

stevenhoneyman wrote:
Napaim wrote:

You really should just stick with the `native` options`, it's a lot less work and you rarely get any benefit from specifying.

Why would I use native when I need to support some other processors?

Ummm....

graysky wrote:

you just can't use the packages on other machines unless identical processors.

Offline

#8 2014-08-18 18:55:34

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: makepkg default -march=x86-64 cflag

That was my point!

Offline

#9 2014-08-18 19:10:16

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,730
Website

Re: makepkg default -march=x86-64 cflag

My bad... I read it as the exact opposite lol

Offline

Board footer

Powered by FluxBB