Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CFLAGS with AMD64
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
sl70
Guru
Guru


Joined: 18 Jun 2002
Posts: 449
Location: Saitama, JP

PostPosted: Wed Sep 01, 2004 6:47 pm    Post subject: CFLAGS with AMD64 Reply with quote

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
View user's profile Send private message
jstreed
n00b
n00b


Joined: 15 Aug 2004
Posts: 3
Location: Atlanta, GA

PostPosted: Wed Sep 01, 2004 7:15 pm    Post subject: here you go Reply with quote

you should set -march=athlon64


this should fix your problem.
Back to top
View user's profile Send private message
moltonel
n00b
n00b


Joined: 31 Mar 2003
Posts: 31
Location: Ireland

PostPosted: Sat Sep 04, 2004 10:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
crazycat
l33t
l33t


Joined: 26 Aug 2003
Posts: 838
Location: Hamburg, Germany

PostPosted: Sat Sep 04, 2004 10:42 pm    Post subject: Reply with quote

U need gcc 3.4 to use -march=athlon64, and how to switch gcc u can find here in forum
Back to top
View user's profile Send private message
moltonel
n00b
n00b


Joined: 31 Mar 2003
Posts: 31
Location: Ireland

PostPosted: Sun Sep 05, 2004 12:10 am    Post subject: Reply with quote

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
View user's profile Send private message
LaNcom
Apprentice
Apprentice


Joined: 03 May 2003
Posts: 254
Location: Erfurt, Germany

PostPosted: Sun Sep 05, 2004 1:29 am    Post subject: Reply with quote

Try "-march=k8", maybe that works...
Back to top
View user's profile Send private message
crazycat
l33t
l33t


Joined: 26 Aug 2003
Posts: 838
Location: Hamburg, Germany

PostPosted: Sun Sep 05, 2004 3:28 am    Post subject: Reply with quote

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... :D

I use gcc 3.4.1 and -march=athlon64 myself without any problems. Maybe portage useses older gcc to compile?
Back to top
View user's profile Send private message
moltonel
n00b
n00b


Joined: 31 Mar 2003
Posts: 31
Location: Ireland

PostPosted: Sun Sep 05, 2004 11:49 am    Post subject: Reply with quote

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
View user's profile Send private message
moltonel
n00b
n00b


Joined: 31 Mar 2003
Posts: 31
Location: Ireland

PostPosted: Sun Sep 05, 2004 6:00 pm    Post subject: Reply with quote

OK, whatever it was, it's solved now, and "emerge -e world" with the correct march is about finished.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum