If you read the gcc manual, you'll see that march specifies the instruction set to use, meaning it should be set to either 'generic' or the lowest common denominator of your target CPUs, and that mtune specifies which specific optimizations to apply, meaning it should be set to match the processor you use most frequently.

The -march=i686 told gcc to use an instruction set that would run
on pentium pro, pentium II, pentium III, pentium 4, pentium-M,
athlon, and various other intel 32-bit instruction set compatible
cpus. The -mtune=pentium3 told gcc to optimize scheduling of
instructions for a pentium III. On anything other than a pIII
that was still instruction set compatible, the code would run slower
than if instruction scheduling had been tuned for that cpu, but it
would still run (so I could boot the system on a different motherboard
with a different 32-bit cpu that still supported the Pentium Pro
instruction set if necessary and then recompile).

The OP seems to be wondering if there is some 64-bit equivalent
of -march=i686, so that he can compile to a 64-bit instruction set
that will run on both intel and amd 64-bit x86-family cpus, while
using -mtune to schedule instructions for his current 64-bit cpu.

I would expect it to be "-march=x86-64" if there were such a 64-bit x86
common denominator instruction set.

"generic" probably works for -mtune=, instruction scheduling for some
average of what would produce best cpu performance over several cpu
models, but the description of what it does is too vague to use it for an
-march= parameter (will it use a 32-bit or 64-bit instruction set, for example)._________________TIA

It turns out -march=x86-64 -mtune=nocona is what I need. I spent some time yesterday compiling a base system with these options (on my Intel machine where the OS will be installed), and then I rsync'd the install to a blank partition on my desktop machine (an AMD64). My desktop was able to boot the system, so I'm good to go.

I do not see "x86-64" in the options for -march= (and/or -mtune=) in the
gcc documentation, so what are the chances that gcc simply ignored
an unrecognized -march= parameter and compiled with the default
i386 instruction set? (Runs on any kind of x86 386 and newer, but there
are no 64-bit instructions in that instruction set.)

Check your emerge logs, maybe there is a message about it.
If you have the "file" package installed ("emerge --info file" should
tell you), you could run "file pathname" on one of your newly
compiled binaries and see whether file thinks it is 64-bit or not.

For normal athlon64 binaries, file reports "ELF 64-bit LSB executable"
on an amd64 X2 system here. For grub, it reports "ELF 32-bit LSB executable".
(grub needs 32-bit emulation enabled in the kernel to run on this system.)

If you use -march=nocona, it might run on nocona, core2, core7,
and atom, but I do not know if it would run on the amd 64-bit cpus
as well._________________TIA

I don't see that option in the manual, but I also don't see any errors in the emerge logs. Searching google shows that x86-64 might be an alias for k8, but I'm not sure. I ran file on the mysql binary (which portage compiled) and it shows it as 64-bit:

is more portable: it will compile for all platforms, based on the lowest comon CPU: it will be
- i686 when CHOST=i686-gentoo-linux-gnu
- k8 (or something like that) when CHOST=x86_64-gentoo-linux-gnu
- this_cool_processor when CHOST=this_cool_processor-gentoo-linux-gnu

And so, I use almost the same make.conf for all my platforms. I only have to adjust some USE, CHOST and ACCEPT_KEYWORDS. I do it for i686 and x86_64 builds._________________Kind regards,
Xavier Miller

What happens when you use -march=generic (or
-march=x86-64 for that matter) may depend on
what version of gcc you have as the default
compiler ("gcc-config -l" to see which versions are
installed and which version is currently selected
as the default compiler).

From the gcc-4.4.4 documentation:

Quote:

There is no -march=generic option because -march indicates the instruction set the compiler can use, and there is no generic instruction set applicable to all processors. In contrast, -mtune indicates the processor (or, in this case, collection of processors) for which the code is optimized.

The documentation may not be entirely accurate
for a given compiler version as well (there may be
implemented options not noted in the documentation).

Plus an ebuild can read the host type in CHOST in /etc/make.conf
and override the CFLAGS specfied there with what the maintainers
feel is most appropriate for that application on that architecture._________________TIA