Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel Ricers wanted: -march=native support
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
adobriyan
n00b
n00b


Joined: 09 Feb 2019
Posts: 2

PostPosted: Mon Mar 04, 2019 5:23 pm    Post subject: Kernel Ricers wanted: -march=native support Reply with quote

https://marc.info/?l=linux-kernel&m=155171997007045&w=4

# apply -ad1 patchset

# copy regular kernel .config

# enable "-march=native" support in
# "Processor type and features"
# "Processor family"

# ensure CONFIG_MARCH_NATIVE is enabled
$ grep -e CONFIG_MARCH_NATIVE .config

# workaround kbuild race condition if "-j" is used
$ make syncconfig

# build the kernel
$ make ...

# install kernel, reboot into new kernel

# verify detected CONFIG_MARCH_NATIVE_* options
$ gzip -d </proc/config.gz | grep -e CONFIG_MARCH_NATIVE

Ping me over email if something breaks or horribly slow.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 22645
Location: here

PostPosted: Mon Mar 04, 2019 5:32 pm    Post subject: Reply with quote

A patch for this purpose is already applied activating experimental use flag in gentoo-sources
Code:
# CONFIG_MK8 is not set
# CONFIG_MK8SSE3 is not set
# CONFIG_MK10 is not set
# CONFIG_MBARCELONA is not set
# CONFIG_MBOBCAT is not set
# CONFIG_MJAGUAR is not set
# CONFIG_MBULLDOZER is not set
# CONFIG_MPILEDRIVER is not set
# CONFIG_MSTEAMROLLER is not set
# CONFIG_MEXCAVATOR is not set
# CONFIG_MZEN is not set
# CONFIG_MPSC is not set
# CONFIG_MATOM is not set
# CONFIG_MCORE2 is not set
# CONFIG_MNEHALEM is not set
# CONFIG_MWESTMERE is not set
# CONFIG_MSILVERMONT is not set
# CONFIG_MSANDYBRIDGE is not set
# CONFIG_MIVYBRIDGE is not set
# CONFIG_MHASWELL is not set
# CONFIG_MBROADWELL is not set
# CONFIG_MSKYLAKE is not set
# CONFIG_MSKYLAKEX is not set
# CONFIG_MCANNONLAKE is not set
# CONFIG_MICELAKE is not set
CONFIG_MNATIVE=y

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
adobriyan
n00b
n00b


Joined: 09 Feb 2019
Posts: 2

PostPosted: Mon Mar 04, 2019 5:46 pm    Post subject: Reply with quote

gentoo-sources does only -march=native itself. -ad1 does slightly more.

Needless to say, I don't use gentoo-sources but self compiled kernels :^)
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1725

PostPosted: Mon Mar 04, 2019 8:47 pm    Post subject: Reply with quote

Pretty much all of the kernels through gentoo are self-compiled. As all of the kernel packages does is download the kernel source code, and apply any additional patches; it is left to you to go and configure and compile the kernels that you want. The only one that is somewhat of an exception is the genkernel, in that it comes with a tool to setup a default config for you, but it is still where you have to run that command as portage does not do anything more for kernels.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6013

PostPosted: Tue Mar 05, 2019 2:03 am    Post subject: Reply with quote

This is nothing novel around these parts, gentoo-sources has it, zen-sources has it, ...

All your -mno-$foo flags are redundant, as the x86 makefile already correctly disables the FPU.
As the patch author, could you explain what all those uncommented, no-license asm hacks are for? Other patchsets do not need those and we live in a post-Spectre world… what's with the random wifi driver edit?

Also, benchmark numbers?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
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