Hi, I think that is how I got the flags for the current CPU. Those commands look familiar. Since then, I think cpuid2cpuflags can do most of it, tho it does seem to fall short on some flags. The way you did it reveals a lot more details.
My concern is this tho. I have my old CPU still installed and everything is compiled based on that. So, I'm stable with the old CPU. However, when I shutdown, take out the old CPU and install the new one, I'm concerned it may not boot at all because of the change or may boot but be very unstable. I recall years ago being able to set up the flags in such a way that it can run on virtually any CPU but it's been a long time ago and I don't know if it is needed or not. My hope was, someone did a very similar upgrade and can say for sure if it works or if I need to do things before changing the CPUs to make sure I can boot and be stable. If I can just get a stable console, I can do a emerge -e world and get the OS inline with the CPU. I'm just concerned whether I will have that or not. I should be current on gcc. I just updated the other day and update once a week. I used to do more often but time isn't as plentiful as it used to be. I just don't want to swap CPUs only to find out I've got to swap back because my system won't boot at all. Heck, it may even fail to load the kernel itself for all I know. Dale :-) :-) Corbin Bird wrote: > My two cents worth : > > Update gcc before changing any hardware. > > With gcc somewhat current, try this on the replacement CPU. > This gives a listing of all CPU supported compiler flags. > Including -mtune / -march :) > > gcc -c -Q -march=native --help=target > > sample of output : > > -msse4 [enabled] > -msse4.1 [enabled] > -msse4.2 [enabled] > -msse4a [enabled] > -msse5 > -msseregparm [disabled] > -mssse3 [enabled] > -mstack-arg-probe [disabled] > -mstack-protector-guard= tls > -mstackrealign [disabled] > -mstringop-strategy= [default] > -mstv [enabled] > -mtbm [enabled] > -mtls-dialect= gnu > -mtls-direct-seg-refs [enabled] > -mtune-ctrl= > -mtune= bdver2 > -muclibc [disabled] > -mveclibabi= [default] > -mvect8-ret-in-mem [disabled] > -mvzeroupper [enabled] > -mx32 [disabled] > -mxop [enabled] > -mxsave [enabled] > -mxsavec [disabled] > -mxsaveopt [disabled] > -mxsaves [disabled] > > > This will give you the L1 / L2 cache/line/size parameters : > > gcc -### -march=native /usr/include/stdlib.h > > sample of output : > > gcc version 7.3.0 (Gentoo 7.3.0-r3 p1.4) > COLLECT_GCC_OPTIONS='-march=native' > /usr/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/cc1 -quiet > /usr/include/stdlib.h "-march=bdver2" -mmmx -mno-3dnow -msse -msse2 > -msse3 -mssse3 -msse4a -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul > -mpopcnt -mabm -mlwp -mfma -mfma4 -mxop -mbmi -mno-sgx -mno-bmi2 -mtbm > -mavx -mno-avx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd > -mf16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mxsave > -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf > -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq > -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi > -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero > -mno-pku -mno-rdpid --param "l1-cache-size=16" --param > "l1-cache-line-size=64" --param "l2-cache-size=2048" "-mtune=bdver2" > -quiet -dumpbase stdlib.h -auxbase stdlib -o /tmp/ccQiaXih.s > "--output-pch=/usr/include/stdlib.h.gch" > > > Reference Link : https://wiki.gentoo.org/wiki/GCC_optimization > > On 12/6/18 3:27 AM, Dale wrote: >> Howdy, >> >> I mentioned in other threads that I'm doing some upgrades to my system. >> My first question is about a CPU upgrade. I currently have this for my >> CPU, from cpuinfo: >> >> AMD Phenom(tm) II X4 955 Processor >> >> Those were put there ages ago, likely when I built and installed Gentoo >> on this rig. Do I need to change those to something that is compatible >> with both CPUs and then change to the new CPU after it is installed? Or >> will the new CPU be close enough that it won't matter? Right now, I >> don't know for sure what the new CPU supports or doesn't. >> >