Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't find flags for my old pc's cpu - intel pentium merom
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
shim747
n00b
n00b


Joined: 09 Apr 2021
Posts: 1

PostPosted: Fri Apr 09, 2021 3:26 pm    Post subject: Can't find flags for my old pc's cpu - intel pentium merom Reply with quote

Hello, i wanted to install gentoo on my old computer and followed the instructions in the handbook but then there was a part with flags and there were "safe flags" recommended for many intel and amd cpus but mine didn't appear there. I saw ones for older and newer pentium processors, but there weren't ones for pentium merom generation.
Can anyone help me with setting them up for this processor?
Back to top
View user's profile Send private message
abdus
Apprentice
Apprentice


Joined: 10 Feb 2021
Posts: 189
Location: bandung

PostPosted: Fri Apr 09, 2021 3:37 pm    Post subject: Reply with quote

for the cpu flags follow the instructions in this page https://wiki.gentoo.org/wiki/CPU_FLAGS_X86
for the safe cflags https://wiki.gentoo.org/wiki/Safe_CFLAGS
_________________
i would like to thank everyone that contributed to the gentoo project in any means
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Apr 09, 2021 3:39 pm    Post subject: Reply with quote

Look at Safe CFLAGS and choose the settings for "Automatic CPU detection by the compiler":
Code:
COMMON_FLAGS="-O2 -pipe -march=native"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"

Use the program 'cpuid2cpuflags' to get the CPU flags:
Code:
cpuid2cpuflags

EDIT: abdus was faster :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Apr 09, 2021 3:52 pm    Post subject: Reply with quote

shim747,

Welcome to gentoo.

The Intel pentium merom is a whole range of low power CPUs.
Code:
CFLAGS="-march=native -O2 -pipe"
and the same for CXXFLAGS is a good place to start.
gcc will work out what in correct for the CPU its running on.
To see what gcc will do, run
Code:
gcc -### -E - -march=native 2>&1 | sed -r '/cc1/!d;s/(")|(^.* - )|( -mno-[^\ ]+)//g'


I get
Code:
-march=amdfam10 -mmmx -m3dnow -msse -msse2 -msse3 -msse4a -mcx16 -msahf -mpopcnt -mabm -mlzcnt -mprfchw -mfxsr --param l1-cache


Something to be aware of is that should you want to build code on another system to run on your merom you must not use -march=native, as gcc will build for the system its actually running on.
Its safe to use the output of that gcc command in place of -march=native if you wish.
Do leave a comment in make.conf to remind yourself where it came from though.
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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