Back to the question.
I would run the following command on the Ryzen machine:
Code: Select all
LANG=C gcc -Q -O2 --help=target -march=native >ryzen.txt
and the command below on the Pentium machine
Code: Select all
LANG=C gcc -Q -O2 --help=target -march=native >pentium.txt
After that, I would run
Code: Select all
LANG=C gcc -Q -O2 --help=target -march=x86-64 >x86-64.txt
and compare 'x86-64.txt' with the other two files:
Code: Select all
diff x86-64.txt ryzen.txt | egrep "^>"
diff x86-64.txt pentium.txt | egrep "^>"
If everything you see is 'enabled', you will know that '-march=x86-64' will work for both machines. Something is wrong if you see 'disabled'.
After that, I would repeat the last step with 'core2', 'sandybridge', 'ivybridge', 'haswell', 'skylake'.
Code: Select all
LANG=C gcc -Q -O2 --help=target -march=core2 >core2.txt
diff core2.txt ryzen.txt | egrep "^>"
diff core2.txt pentium.txt | egrep "^>"
...
Choose the last / most advanced architecture where you don't see any 'disabled'.