Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New to Gentoo on AMD64[solved]
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
punkid
Apprentice
Apprentice


Joined: 18 Dec 2004
Posts: 215
Location: offline

PostPosted: Wed Mar 01, 2006 2:12 pm    Post subject: New to Gentoo on AMD64[solved] Reply with quote

I just got a new computer which has a Sempron 64bit 3000+ CPU.
I've read the Installation Doc on AMD64.
But I still got some questions...

1.I'm planning to build the system from stage3,so could i add these codes into make.conf.

Code:
   CHOST="x86_64-pc-linux-gnu"  /* is it okay to modify this line? but the official Doc says it's unrecommended to modify it from stage3 */
   CBUILD="x86_64-pc-linux-gnu"
   CFLAGS="-march=k8 -03 -pipe"
   CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
   LDFLAGS="-Wl,-O1"
   ACCEPT_KEYWORDS="amd64" /* The whole official Doc just refers x86,but why not amd64? */
   MAKEOPTS="-j2"


2.And there's another question about the kernel

Code:
Processor type and features  --->
   [ ] Intel MCE Features
   [*] AMD MCE Features
  Processor family (AMD-Opteron/Athlon64)  --->
    (*) AMD-Opteron/Athlon64  /* could I choose this option? My CPU is Sempron64,not Athlon64...or I'd choose Generix-x86-64 */
    ( ) Intel EM64T
    ( ) Generic-x86-64"

_________________
My Blog | Latest Screenshot


Last edited by punkid on Wed Mar 01, 2006 2:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
SinoTech
Advocate
Advocate


Joined: 20 Mar 2004
Posts: 2579
Location: Neunkirchen / Saarland / Germany

PostPosted: Wed Mar 01, 2006 2:23 pm    Post subject: Re: New to Gentoo on AMD64 Reply with quote

punkid wrote:
I just got a new computer which has a Sempron 64bit 3000+ CPU.
I've read the Installation Doc on AMD64.
But I still got some questions...

1.I'm planning to build the system from stage3,so could i add these codes into make.conf.

Code:
   CHOST="x86_64-pc-linux-gnu"  /* is it okay to modify this line? but the official Doc says it's unrecommended to modify it from stage3 */
   CBUILD="x86_64-pc-linux-gnu"
   CFLAGS="-march=k8 -03 -pipe"
   CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
   LDFLAGS="-Wl,-O1"
   ACCEPT_KEYWORDS="amd64" /* The whole official Doc just refers x86,but why not amd64? */
   MAKEOPTS="-j2"

[...]

Think you've chosen the wrong stage-3 archiv. In an stage archiv for amd64, the CHOST should be already set to "x86_64-pc-linux-gnu".
Switching the CHOST on an already installed system will cause problems (Sure there're ways to do that, but it is not recommended) since you've obviously an 32 Bit gcc, 32 Bit glibc, ... .
Also there's a amd64 installation handbook, which should refer to "amd64" as accepted keyword instead of "x86" (However on an amd64 (athlon64, ...) the "amd64" keyword is the right one for this place, doesn't matter what the handbook states).


punkid wrote:

[...]
2.And there's another question about the kernel

Code:
Processor type and features  --->
   [ ] Intel MCE Features
   [*] AMD MCE Features
  Processor family (AMD-Opteron/Athlon64)  --->
    (*) AMD-Opteron/Athlon64  /* could I choose this option? My CPU is Sempron64,not Athlon64...or I'd choose Generix-x86-64 */
    ( ) Intel EM64T
    ( ) Generic-x86-64"


Not sure, but think choosing "AMD-Opteron/Athlon64" is ok for you.

Regards,

Sino
_________________
Help to answer the unanswered
Back to top
View user's profile Send private message
punkid
Apprentice
Apprentice


Joined: 18 Dec 2004
Posts: 215
Location: offline

PostPosted: Wed Mar 01, 2006 2:44 pm    Post subject: Reply with quote

Really appreciate you for the help.
I guess i'm almost clear about it.
I'm planning to install the new system this weekend :lol:
_________________
My Blog | Latest Screenshot
Back to top
View user's profile Send private message
Monkeh
Veteran
Veteran


Joined: 06 Aug 2005
Posts: 1656
Location: England

PostPosted: Wed Mar 01, 2006 3:31 pm    Post subject: Reply with quote

Just one thing: Make sure it's a 64-bit Sempron. Not all of them are.
Back to top
View user's profile Send private message
Nightmist
n00b
n00b


Joined: 07 Apr 2006
Posts: 40

PostPosted: Wed Apr 12, 2006 10:19 am    Post subject: CFLAGS and CXXFLAGS Reply with quote

Hello,

I am a bit unsure what CPU to specify for the CFLAGS part, and hope someone can help me out a bit. The handbook has the following:

Code:
CFLAGS="-march=athlon-xp -pipe -O2"   # AMD64 users should use march=k8


I have a AMD Athlon 64 3700+ on this computer, so what should I use? I decided to install the x86 version of Gentoo, as I didn't want all the extra hassle of installing the amd64 version being new to Gentoo and all.

Hope anyone can help, thanks.
Back to top
View user's profile Send private message
kfiaciarka
Veteran
Veteran


Joined: 20 May 2005
Posts: 1498
Location: Dobre Miasto, Poland

PostPosted: Wed Apr 12, 2006 10:45 am    Post subject: Reply with quote

You can read man gcc and decide what to put in your make.conf:) Or try this 8)
Code:

CFLAGS="-O2 -march=athlon-xp -pipe -s -fomit-frame-pointer -fforce-addr -fprefetch-loop-arrays -mfpmath=sse -msse -msse2 msse3 -mmmx -ftracer -ffast-math -m3dnow"
CXXFLAGS="$(CFLAGS) --fno-enforce-eh-specs -fvisibility-inlines-hidden"
MAKEOPTS="-j2 -s"
PORTAGE_STRIP_FLAGS="--strip-all --discard-all -R .comment -R .note -R .note.ABI-tag"

If I were you I'd use ~amd64. With 64bits you will acheive more power:)
BTW, -march=k8 is just compiler optimalization option:)
p.s. use stage3, modify make.conf as you wish and run emerge -e system:)
Back to top
View user's profile Send private message
Nightmist
n00b
n00b


Joined: 07 Apr 2006
Posts: 40

PostPosted: Wed Apr 12, 2006 11:00 am    Post subject: Reply with quote

I just skipped that part when I installed, actually. I am now up and running with this make.conf

Code:
# These settings were set by the catalyst build script that automatically built$
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i386-pc-linux-gnu"
CXXFLAGS="-O2 -mtune=i686 -pipe"
MAKEOPTS="-j2"
USE="-gtk -gnome qt kde dvd hal alsa cdr nvidia"

GENTOO_MIRRORS="http://ftp.rhnet.is/pub/gentoo/ ftp://ftp.rhnet.is/pub/gentoo/ $

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"


So there is no athlon-64 option? Either athlon-xp (is that 32?) or -march=k8 ?

Yeah, but compiler optimalisation is better than nothing :)
Back to top
View user's profile Send private message
kfiaciarka
Veteran
Veteran


Joined: 20 May 2005
Posts: 1498
Location: Dobre Miasto, Poland

PostPosted: Wed Apr 12, 2006 11:17 am    Post subject: Reply with quote

Nightmist wrote:
I just skipped that part when I installed, actually. I am now up and running with this make.conf

Code:
# These settings were set by the catalyst build script that automatically built$
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i386-pc-linux-gnu"
CXXFLAGS="-O2 -mtune=i686 -pipe"
MAKEOPTS="-j2"
USE="-gtk -gnome qt kde dvd hal alsa cdr nvidia"

GENTOO_MIRRORS="http://ftp.rhnet.is/pub/gentoo/ ftp://ftp.rhnet.is/pub/gentoo/ $

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"


So there is no athlon-64 option? Either athlon-xp (is that 32?) or -march=k8 ?

Yeah, but compiler optimalisation is better than nothing :)

-mtune:/ do you want to run your gentoo on other hardware? IMHO you chost should be i686 otherwise you will not gain better performance :roll:
Back to top
View user's profile Send private message
olger901
l33t
l33t


Joined: 17 Mar 2005
Posts: 625

PostPosted: Wed Apr 12, 2006 11:26 am    Post subject: Reply with quote

Code:

CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i386-pc-linux-gnu"
CXXFLAGS="-O2 -mtune=i686 -pipe"
MAKEOPTS="-j2"


Above code is rather unoptimized for athlon-xp. My suggestion for your AMD Athlon 64 3700+ on x86:

Code:

CFLAGS="-march=athlon-xp -fomit-frame-pointer -O2 -pipe -msse2 -msse3"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"   
MAKEOPTS="-j2"
Back to top
View user's profile Send private message
Nightmist
n00b
n00b


Joined: 07 Apr 2006
Posts: 40

PostPosted: Wed Apr 12, 2006 11:29 am    Post subject: Reply with quote

Code:
CHOST

The CHOST variable declares the target build host for your system. This variable should already be set to the correct value. Do not edit it as that might break your system. If the CHOST variable does not look correct to you, you might be using the wrong stage3 tarball.


I didn't dare to change it after reading this in the handbook. Should I just disregard the warning and change it to 686?

Here's my new file by the way. Any more comments?

Code:
# These settings were set by the catalyst build script that automatically built$
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-march=athlon-xp -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
USE="-gtk -gnome qt kde dvd hal alsa cdr nvidia"
Back to top
View user's profile Send private message
Nightmist
n00b
n00b


Joined: 07 Apr 2006
Posts: 40

PostPosted: Wed Apr 12, 2006 11:32 am    Post subject: Reply with quote

olger901 wrote:
[code]
My suggestion for your AMD Athlon 64 3700+ on x86:

[code]
CFLAGS="-march=athlon-xp -fomit-frame-pointer -O2 -pipe -msse2 -msse3"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
[/code]


Hmm, alright. I tried to figure out what the -fomit-frame-pointer and all that was, but could you give me a quick pointer?

Thanks

EDIT: Also, it seems like I installed the x86 stage 3, and not 686. What do I have to do to make all the x86 stuff 686?
Back to top
View user's profile Send private message
sirdilznik
l33t
l33t


Joined: 28 Apr 2005
Posts: 731

PostPosted: Wed Apr 12, 2006 4:47 pm    Post subject: Reply with quote

Nightmist wrote:
olger901 wrote:

My suggestion for your AMD Athlon 64 3700+ on x86:

Code:

CFLAGS="-march=athlon-xp -fomit-frame-pointer -O2 -pipe -msse2 -msse3"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"   
MAKEOPTS="-j2"

Those flags seem fine you could also add -fno-ident to CFLAGS, to the best of my knowledge it's safe (no complaints here).

Nightmist wrote:

Hmm, alright. I tried to figure out what the -fomit-frame-pointer and all that was, but could you give me a quick pointer?

You don't need frame pointers unless you're debugging.

Nightmist wrote:

EDIT: Also, it seems like I installed the x86 stage 3, and not 686. What do I have to do to make all the x86 stuff 686?

Hmm... there's probably a faster way, but you could just run
Code:
emerge -e system && emerge -e system

This will rebuild your toolchain and system libraries with the current setup in your /etc/make.conf. The second run through emerge -e system may be unnecessary, but I'd feel safer insuring some consistency with it.
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Wed Apr 12, 2006 5:22 pm    Post subject: Reply with quote

Merged above eight posts here
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
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