Gentoo Archives: gentoo-user

From: Andrew Udvare <audvare@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] march cflag for Intel Pentium Dual-Core E2160 SLA8Z Malay processor
Date: Thu, 20 Sep 2018 00:33:46
Message-Id: D2B4AA72-7BA7-4BB6-BC25-9B1BA35065C8@gmail.com
In Reply to: Re: [gentoo-user] march cflag for Intel Pentium Dual-Core E2160 SLA8Z Malay processor by Jack
1 > On 2018-09-19, at 17:54, Jack <ostroffjh@×××××××××××××××××.net> wrote:
2 >
3 > Unless I'm missing something, I'm surprised nobody has mentioned one potential problem. Unless you are careful, code you compile for an AMD may not run on an Intel. If you are just going to compile binary packages to move and install, this might be OK (assuming you don't trip over trying to run test during a build.) You should be able to come up with settings so compiled code will run on either architecture, but I have no idea what the side effects might be, such as larger and/or less efficient code. I almost wonder if this doesn't count as cross-compiling, even though it is not a totally incompatible architecture. Hopefully someone can either expand on this, or tell me why I'm barking up the wrong tree.
4
5 I've dealt with this problem before. The key is flags like -mtune=generic and not using -march=native. Optimisations should still be okay.
6
7 Andrew