x86_64 build
Thorsten Leemhuis
fedora at leemhuis.info
Tue Oct 18 07:41:32 UTC 2005
Am Dienstag, den 18.10.2005, 09:24 +0200 schrieb Ralf Corsepius:
> As RPM_OPT_FLAGS also are those FLAGS which are being used to propagate
> architecture dependent flags to configure scripts/Makefiles, a package
> not acknowledging RPM_OPT_FLAGS will also not build correctly on
> x86_64, because there the implicit default flags do not match the system
> requirements (In a nutshell, you must pass -m64 on x86-64, otherwise the
> compiler will use it's implicit default (-m32) and you'll get 32bit
> binaries).
Ralf, sorry, this is completely wrong. If you call gcc without "-m32" or
"-m64" it will build 64bit binaries.
[thl at thl ~]$ echo '#include <stdio.h>
int main()
{
printf("Hello, World.\n");
return 0;
}' > hello_world.c
[thl at thl ~]$ gcc -o hello_world hello_world.c
[thl at thl ~]$ file hello_world
hello_world: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), not stripped
[thl at thl ~]$ ./hello_world
Hello, World.
[thl at thl ~]$
More information about the fedora-extras-list
mailing list