View previous topic :: View next topic |
Author |
Message |
sl70 Guru
Joined: 18 Jun 2002 Posts: 449 Location: Saitama, JP
|
Posted: Wed Sep 01, 2004 6:47 pm Post subject: CFLAGS with AMD64 |
|
|
I'm building my system on my new AMD64 machine, and ran into a little problem. If I included -march=athlon-xp in CFLAGS, as is stated in the documentation, it got a C compiler is unable to make executables error message. So, I included only -O2 in CFLAGS. (CHOST is still x86_64 whatever.) Is that ok? Am I still going to get all the 64-bit extensions?
Thanks. |
|
Back to top |
|
|
jstreed n00b
Joined: 15 Aug 2004 Posts: 3 Location: Atlanta, GA
|
Posted: Wed Sep 01, 2004 7:15 pm Post subject: here you go |
|
|
you should set -march=athlon64
this should fix your problem. |
|
Back to top |
|
|
moltonel n00b
Joined: 31 Mar 2003 Posts: 31 Location: Ireland
|
Posted: Sat Sep 04, 2004 10:33 pm Post subject: |
|
|
I've run into the same problem (C compiler unable to make executable) during bootstrap, with CFLAGS="-march=athlon64 -other-optims".
Could be an issue with gcc (I read somewhere older gcc have problems with -march=athlon64), altough I also tried with a gcc-3.4.1 stage1 tarball.
Anyway, I dropped -march from CFLAGS alltogether and it is happyly bootstraping now. If all goes well I'll try reactivating march=athlon64 after bootstarp. |
|
Back to top |
|
|
crazycat l33t
Joined: 26 Aug 2003 Posts: 838 Location: Hamburg, Germany
|
Posted: Sat Sep 04, 2004 10:42 pm Post subject: |
|
|
U need gcc 3.4 to use -march=athlon64, and how to switch gcc u can find here in forum |
|
Back to top |
|
|
moltonel n00b
Joined: 31 Mar 2003 Posts: 31 Location: Ireland
|
Posted: Sun Sep 05, 2004 12:10 am Post subject: |
|
|
I used a stage1-amd64-gcc34-20040716.tar.bz2 tarball, gcc -v says 3.4.1, so does emerge, so does gcc-config -c, and I even tried using ~amd64 for gcc and gcc-config in /etc/portage/package.keywords.
I didn't check the forums, but I'm pretty confident that I'm using gcc 3.4 :p
Yet march=athlon64 doesn't work on my machine :/ |
|
Back to top |
|
|
LaNcom Apprentice
Joined: 03 May 2003 Posts: 254 Location: Erfurt, Germany
|
Posted: Sun Sep 05, 2004 1:29 am Post subject: |
|
|
Try "-march=k8", maybe that works... |
|
Back to top |
|
|
crazycat l33t
Joined: 26 Aug 2003 Posts: 838 Location: Hamburg, Germany
|
Posted: Sun Sep 05, 2004 3:28 am Post subject: |
|
|
as u can read in gcc manual here
http://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/i386-and-x86-64-Options.html#i386%20and%20x86-64%20Options
it should work - if not - then u do not use gcc 3.4.1 or the problem lies somewhere else! Probably, ur machine was substituted by aliens! And they uncovered the yet to be explored metaphysical misteries of gcc and the divine infinity of the infinite divinity of mystical gnu software and borked it in the way no human could ever imagine...
I use gcc 3.4.1 and -march=athlon64 myself without any problems. Maybe portage useses older gcc to compile? |
|
Back to top |
|
|
moltonel n00b
Joined: 31 Mar 2003 Posts: 31 Location: Ireland
|
Posted: Sun Sep 05, 2004 11:49 am Post subject: |
|
|
Damn those aliens
When I compile a C hello world, it works as expected (it feels good to have an athlon64-optimised hello world).
I guess it's a temporary chicken-and-egg issue. I'll tell you once I manage to put grub on the MBR, reboot, and reemerge world with march=athlon64. |
|
Back to top |
|
|
moltonel n00b
Joined: 31 Mar 2003 Posts: 31 Location: Ireland
|
Posted: Sun Sep 05, 2004 6:00 pm Post subject: |
|
|
OK, whatever it was, it's solved now, and "emerge -e world" with the correct march is about finished. |
|
Back to top |
|
|
|