* [gentoo-user] CFLAGS for both AMD64 and Intel?
@ 2017-12-03 7:23 Manuel McLure
2017-12-03 7:40 ` Mike Gilbert
2017-12-03 8:08 ` Walter Dnes
0 siblings, 2 replies; 4+ messages in thread
From: Manuel McLure @ 2017-12-03 7:23 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]
Here's the situation. I have a system that's been running for many years
with an Athlon 5050e processor. The system is built with
CFLAGS="-march=k8-sse3 -O2 -pipe -msse3"
CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 sse3"
I have the possibility of upgrading the system to a first-generation Intel
Core i5 which should give a nice speed boost, but of course the Intel chip
doesn't understand 3dnow or 3dnowext, so I'll have to do a system rebuild
before I switch out the motherboard/processor. It seems pretty obvious that
I have to take "3dnow 3dnowext" out of CPU_FLAGS_X86, but what CFLAGS would
be recommended for a system that will still run with the AMD processor but
won't fall over when I switch to the Intel processor? Once I have the Intel
in place I can rebuild with options more suited for that chip, but I want
to make sure I don't end up in a catch-22 situation.
--
Manuel A. McLure WW1FA <manuel@mclure.org> <http://www.mclure.org>
...for in Ulthar, according to an ancient and significant law,
no man may kill a cat. -- H.P. Lovecraft
[-- Attachment #2: Type: text/html, Size: 1461 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] CFLAGS for both AMD64 and Intel?
2017-12-03 7:23 [gentoo-user] CFLAGS for both AMD64 and Intel? Manuel McLure
@ 2017-12-03 7:40 ` Mike Gilbert
2017-12-03 8:08 ` Walter Dnes
1 sibling, 0 replies; 4+ messages in thread
From: Mike Gilbert @ 2017-12-03 7:40 UTC (permalink / raw
To: gentoo-user
On Sun, Dec 3, 2017 at 2:23 AM, Manuel McLure <manuel@mclure.org> wrote:
> Here's the situation. I have a system that's been running for many years
> with an Athlon 5050e processor. The system is built with
>
> CFLAGS="-march=k8-sse3 -O2 -pipe -msse3"
> CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 sse3"
>
> I have the possibility of upgrading the system to a first-generation Intel
> Core i5 which should give a nice speed boost, but of course the Intel chip
> doesn't understand 3dnow or 3dnowext, so I'll have to do a system rebuild
> before I switch out the motherboard/processor. It seems pretty obvious that
> I have to take "3dnow 3dnowext" out of CPU_FLAGS_X86, but what CFLAGS would
> be recommended for a system that will still run with the AMD processor but
> won't fall over when I switch to the Intel processor? Once I have the Intel
> in place I can rebuild with options more suited for that chip, but I want to
> make sure I don't end up in a catch-22 situation.
I would go with just "-O2 -pipe" for maximum compatibility. Remove the
-march option altogether, and add it back once the system is running
on the Intel chip.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] CFLAGS for both AMD64 and Intel?
2017-12-03 7:23 [gentoo-user] CFLAGS for both AMD64 and Intel? Manuel McLure
2017-12-03 7:40 ` Mike Gilbert
@ 2017-12-03 8:08 ` Walter Dnes
2017-12-05 19:09 ` Manuel McLure
1 sibling, 1 reply; 4+ messages in thread
From: Walter Dnes @ 2017-12-03 8:08 UTC (permalink / raw
To: gentoo-user
On Sat, Dec 02, 2017 at 11:23:10PM -0800, Manuel McLure wrote
> Here's the situation. I have a system that's been running for many years
> with an Athlon 5050e processor. The system is built with
>
> CFLAGS="-march=k8-sse3 -O2 -pipe -msse3"
> CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 sse3"
>
> I have the possibility of upgrading the system to a first-generation
> Intel Core i5 which should give a nice speed boost, but of course the
> Intel chip doesn't understand 3dnow or 3dnowext, so I'll have to do
> a system rebuild before I switch out the motherboard/processor. It
> seems pretty obvious that I have to take "3dnow 3dnowext" out of
> CPU_FLAGS_X86, but what CFLAGS would be recommended for a system
> that will still run with the AMD processor but won't fall over when
> I switch to the Intel processor? Once I have the Intel in place I
> can rebuild with options more suited for that chip, but I want to
> make sure I don't end up in a catch-22 situation.
https://gcc.gnu.org/onlinedocs/gcc-6.4.0/gcc/x86-Options.html#x86-Options
lists what instruction sets gcc expects for any "-march=<whatever>"
I would suggest rebuilding with...
CFLAGS="-march=nocona -O2 -pipe"
CPU_FLAGS_X86="mmx sse sse2 sse3"
nocona was the first Intel cpu to support AMD64 instructions, and it's
the newest Intel that does not exceed your AMD. The next Intel cpu, the
"core2" supports ssse3 which your AMD does not (count the "s"'s... very
carefully; sse3 != ssse3).
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] CFLAGS for both AMD64 and Intel?
2017-12-03 8:08 ` Walter Dnes
@ 2017-12-05 19:09 ` Manuel McLure
0 siblings, 0 replies; 4+ messages in thread
From: Manuel McLure @ 2017-12-05 19:09 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]
On Sun, Dec 3, 2017 at 12:08 AM, Walter Dnes <waltdnes@waltdnes.org> wrote:
>
> https://gcc.gnu.org/onlinedocs/gcc-6.4.0/gcc/x86-Options.html#x86-Options
> lists what instruction sets gcc expects for any "-march=<whatever>"
>
> I would suggest rebuilding with...
>
> CFLAGS="-march=nocona -O2 -pipe"
> CPU_FLAGS_X86="mmx sse sse2 sse3"
>
> nocona was the first Intel cpu to support AMD64 instructions, and it's
> the newest Intel that does not exceed your AMD. The next Intel cpu, the
> "core2" supports ssse3 which your AMD does not (count the "s"'s... very
> carefully; sse3 != ssse3).
>
>
Thanks! I have successfully rebuilt the system with "-march=nocona -O2
-pipe" (and switched to gcc 6.4.0/profile 17 while I was at it) and
everything seems to be running fine. Hopefully I can pick up a micro-ATX
LGA1156 motherboard for cheap and can do the processor upgrade soon.
--
Manuel A. McLure WW1FA <manuel@mclure.org> <http://www.mclure.org>
...for in Ulthar, according to an ancient and significant law,
no man may kill a cat. -- H.P. Lovecraft
[-- Attachment #2: Type: text/html, Size: 1945 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-12-05 19:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-03 7:23 [gentoo-user] CFLAGS for both AMD64 and Intel? Manuel McLure
2017-12-03 7:40 ` Mike Gilbert
2017-12-03 8:08 ` Walter Dnes
2017-12-05 19:09 ` Manuel McLure
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox