New Computer, what should I install?
Jerry Feldman
gaf-mNDKBlG2WHs at public.gmane.org
Thu May 17 17:29:04 EDT 2007
-mtune is specific to scheduling the code for a particular CPU
architecture
-march specifies the instruction set and implies -mtune.
-m32 and -m64 generate code for 32-bit and 64-bit x86 architectures.=20
There are ways to run 32-bit drivers on 64-bit systems, but I don't
have that info at my fingertips right now.
On Thu, 17 May 2007 15:54:25 -0400
Kristian Hermansen <kristian.hermansen-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> Matthew Gillen wrote:
> >>From the gcc man page:
> >> While picking a specific cpu-type will schedule things appropriately f=
or
> >> that particular chip, the compiler will not generate any code that doe=
s not
> >> run on the i386 without the -march=3Dcpu-type option being used.
> >=20
> > Check the "-mtune=3Dcpu-type" and "march=3Dcpu-type" command line switc=
hes.
>=20
> This is not entirely correct. I generate code from gcc (amd64)=20
> targeting i386 all the time using only the -m32 option. For instance:
>=20
> administrator at khermans-um64:/tmp$ uname -a
> Linux khermans-um64 2.6.20-15-generic #2 SMP Sun Apr 15 06:17:24 UTC=20
> 2007 x86_64 GNU/Linux
> administrator at khermans-um64:/tmp$ cat hello.c
> #include <stdio.h>
>=20
> int main() {
> printf("Hello World!\n");
> }
> administrator at khermans-um64:/tmp$ gcc -o hello64 hello.c
> administrator at khermans-um64:/tmp$ file hello64
> hello64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for=20
> GNU/Linux 2.6.0, dynamically linked (uses shared libs), not stripped
> administrator at khermans-um64:/tmp$ ./hello64
> Hello World!
> administrator at khermans-um64:/tmp$ gcc -m32 -o hello32 hello.c
> administrator at khermans-um64:/tmp$ file hello32
> hello32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for=20
> GNU/Linux 2.6.0, dynamically linked (uses shared libs), not stripped
> administrator at khermans-um64:/tmp$ ./hello32
> Hello World!
>=20
> Any questions?
> --=20
> Kristian Hermansen
>=20
> --=20
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>=20
> _______________________________________________
> Discuss mailing list
> Discuss-mNDKBlG2WHs at public.gmane.org
> http://lists.blu.org/mailman/listinfo/discuss
>=20
--=20
Jerry Feldman <gaf-mNDKBlG2WHs at public.gmane.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
More information about the Discuss
mailing list