You are not logged in.

#1 2015-04-28 13:59:21

gen2arch
Member
Registered: 2013-05-16
Posts: 207

Can I set CFLAGS="-march=broadwell" optimizations in /etc/makepkg.conf

Hi

does the Arch Build System allow the new compiler optimizations

-march=broadwell

to be set as CFLAGS and CXXFLAGS in /etc/makepkg.conf?

I recently installed Arch on a machine having this processor (an Intel Broadwell NUC) and I was wondering if I should change CFLAGS from the generic "x86-64" to the more specific broadwell setting. As far as I understood gcc > 4.9 does support this.

What else needs to be adjusted in Arch in order to use this optimizations?

Thanks

gen2arch

Offline

#2 2015-04-28 14:17:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,480
Website

Re: Can I set CFLAGS="-march=broadwell" optimizations in /etc/makepkg.conf

Why wouldn't it?  If you compiler allows it, makepkg allows it as those variables are just passed directly to the compiler.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2015-04-29 02:38:04

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 507

Re: Can I set CFLAGS="-march=broadwell" optimizations in /etc/makepkg.conf

I have found that I run into too many failed compile issues if I use -march=bdver2. If I leave it set to native (-march=native), everything tend to compile. I don't know why, native sets bdver2. If you set -march=broadwell and you run into issues/fails, try native instead.


An old man, trying to stay sane

Offline

#4 2015-04-29 08:53:20

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

Re: Can I set CFLAGS="-march=broadwell" optimizations in /etc/makepkg.conf

The kernel package will not honor those flags in makepkg.conf aa it has its own.  You  can apply my gcc patch to the kernel source for them if you wish.

https://github.com/graysky2/kernel_gcc_patch

Offline

#5 2015-04-30 10:40:05

gen2arch
Member
Registered: 2013-05-16
Posts: 207

Re: Can I set CFLAGS="-march=broadwell" optimizations in /etc/makepkg.conf

Thanks everyone for your input!

graysky: actually the linux kernel is exactly the package in view of which I was looking into the Arch Build System; having come over from gentoo, I thought it would be a good idea to streamline the generic arch kernel and, in the process, apply processor specific optimizations. So your point that precisely the kernel doesn't honor these settings is indeed very helpful!

Against which sources do I have to apply your patch: actually, where can I download the source package of Arch linux' own kernel build?

Thanks again

gen2arch

Offline

#6 2015-04-30 11:00:13

mychris
Member
From: Munich
Registered: 2012-09-15
Posts: 68

Re: Can I set CFLAGS="-march=broadwell" optimizations in /etc/makepkg.conf

You can use the abs to download the PKGBUILD files (and everything else needed) to build all packages from the official repositories.

Offline

#7 2015-04-30 11:11:13

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 507

Re: Can I set CFLAGS="-march=broadwell" optimizations in /etc/makepkg.conf

gen2arch wrote:

Against which sources do I have to apply your patch: actually, where can I download the source package of Arch linux' own kernel build?

It's a stock kernel with these patches


An old man, trying to stay sane

Offline

Board footer

Powered by FluxBB