Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Question about CPU upgrade and march=
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
krumpf
n00b
n00b


Joined: 15 Jul 2018
Posts: 24

PostPosted: Tue Jan 07, 2020 7:46 am    Post subject: Question about CPU upgrade and march= Reply with quote

Hi,
I'm upgrading my CPU/motherboard, from an old i5-3470 (ivybridge) to a ryzen 3600

I was wondering, should I emerge -e @system with march=x86_64 in make.conf before the cpu change (with a generic x86_64 kernel),
or can I simply switch from march=ivybridge (current) to march=znver2 ?
Afaik, every instruction set & X86_FLAGS from the ivybridge is covered by the ryzen (unless there's some intel specific stuff I didn't figure),
but I'd rather ask around before doing something stupid and having to reinstall gentoo from the start

Edit: small bonus question, can I ditch the retpoline options in kernel with ryzen?

Edit 2: Is there anyone with a Ryzen 3000 who could post the result from cpuid2cpuflags please ?
Back to top
View user's profile Send private message
Banana
Guru
Guru


Joined: 21 May 2004
Posts: 333
Location: Germany

PostPosted: Tue Jan 07, 2020 11:45 am    Post subject: Reply with quote

Hello krumpf.

I think you can get some usefull information from here: https://forums.gentoo.org/viewtopic-t-1004312-start-0.html and here: https://forums.gentoo.org/viewtopic-t-818103-start-0.html
The first one should be the better one. tl:dr; Yes it can be done and a =native should to the trick.
_________________
My personal space
Back to top
View user's profile Send private message
Koyan
n00b
n00b


Joined: 07 Nov 2014
Posts: 6

PostPosted: Tue Jan 07, 2020 1:54 pm    Post subject: Re: Question about CPU upgrade and march= Reply with quote

krumpf wrote:
Hi,
Edit 2: Is there anyone with a Ryzen 3000 who could post the result from cpuid2cpuflags please ?


This is from my 3950X:
CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3

Throughout the years I've upgraded this system from a Phenom II to an FX-8350 to a 2700X and now a 3950X. Each time I recompiled with march=x86_64 without any CPU_FLAGS before switching the processor and recompiled again with march=native and the new CPU_FLAGS. Worked like a charm every time.
Back to top
View user's profile Send private message
krumpf
n00b
n00b


Joined: 15 Jul 2018
Posts: 24

PostPosted: Tue Jan 07, 2020 2:37 pm    Post subject: Reply with quote

Thanks for answers

I'm now thinking about doing a fresh install, seems less hassle than having to emerge @system with march=x86_64 on the i5, I would save a few hours compiling.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3545
Location: Illinois, USA

PostPosted: Tue Jan 07, 2020 2:47 pm    Post subject: Reply with quote

krumpf wrote:
Thanks for answers

I'm now thinking about doing a fresh install, seems less hassle than having to emerge @system with march=x86_64 on the i5, I would save a few hours compiling.

Less hassle than two commands?
Back to top
View user's profile Send private message
krumpf
n00b
n00b


Joined: 15 Jul 2018
Posts: 24

PostPosted: Tue Jan 07, 2020 3:01 pm    Post subject: Reply with quote

Tony0945 wrote:
Less hassle than two commands?


I mean, instead of recompiling kernel and system set to a generic x86_64, change CPU, and then recompile with znver2;
I might as well start with a fresh install, since I guess the install medias are generic X86_64

My system set is 345 packages, emerging all that on the i5-3470 might take 6 to 10 hours; and I feel I'll go faster with a fresh install :)
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3545
Location: Illinois, USA

PostPosted: Tue Jan 07, 2020 4:44 pm    Post subject: Reply with quote

krumpf wrote:
My system set is 345 packages, emerging all that on the i5-3470 might take 6 to 10 hours; and I feel I'll go faster with a fresh install :)


Start it just before you go to sleep.
Fresh install is such a hassle, formatting disks, adding your favorite programs/itilities back in. And you have to emerge -e @world anyway.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44921
Location: 56N 3W

PostPosted: Tue Jan 07, 2020 4:57 pm    Post subject: Reply with quote

Tony0945,

You copy over your /etc/portage/* and your world file tune make.conf to the new hardware and emerge -e @world.

There is no -march=x86_64
Leave -march unset and set -mtune=generic to get go anywhere amd64 code.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7368

PostPosted: Tue Jan 07, 2020 6:06 pm    Post subject: Reply with quote

NeddySeagoon wrote:
There is no -march=x86_64

but there's a x86-64 :)
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3545
Location: Illinois, USA

PostPosted: Tue Jan 07, 2020 9:10 pm    Post subject: Reply with quote

NeddySeagoon wrote:
You copy over your /etc/portage/* and your world file tune make.conf to the new hardware and emerge -e @world.


I always move my hard drive (or copy it if moving to SSD or bigger drive) after compiling without march=native, then on the new box emerge again with march=native. Much simpler.
Oh, and the same with the kernel.
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