Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
trouble with AMD K6-2
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
zion1459
Tux's lil' helper
Tux's lil' helper


Joined: 12 Mar 2003
Posts: 146

PostPosted: Wed Jun 11, 2003 9:34 am    Post subject: trouble with AMD K6-2 Reply with quote

I'm trying to install gentoo on a AMD K6-2.

450MHz
128MB SD-RAM.

the problem accurs when the box is bootstrapping..
first I chose what cflags I wanted.. then it failed during compilation of gcc.. then I tried the standard cflags.. and then it failed when compiling glib...

also tried with and with out cpu-march etc.

any1 have a "this will work" set of cflags I can try?

thx, regards zion1459 :)
_________________
an it harm none, do as ye will.
Back to top
View user's profile Send private message
ctford0
l33t
l33t


Joined: 25 Oct 2002
Posts: 774
Location: Lexington, KY,USA

PostPosted: Wed Jun 11, 2003 11:41 am    Post subject: Reply with quote

I have a few k62's running gentoo just using the march=k62 -O2 -pipe. Could you have some type of heat problem? The reason I ask because it fails at different points during the compile.

Be sure to set your
CHOST="i586-pc-linux-gnu"


Chris
Back to top
View user's profile Send private message
sindre
Guru
Guru


Joined: 01 Nov 2002
Posts: 315
Location: Norway

PostPosted: Wed Jun 11, 2003 3:03 pm    Post subject: Reply with quote

I actually had to underclock my k6-3 450MHz to 400MHz to get it to compile things properly. Maybe it would have helped with better cooling, and/or voltage adjustment.
Back to top
View user's profile Send private message
zion1459
Tux's lil' helper
Tux's lil' helper


Joined: 12 Mar 2003
Posts: 146

PostPosted: Thu Jun 12, 2003 7:22 pm    Post subject: Reply with quote

I think it might be the
CHOST="i586-pc-linux-gnu"
I forgot... or maybe it just overheats... I'll try again and see what happens..

thx sindre and ctford0 :)
_________________
an it harm none, do as ye will.
Back to top
View user's profile Send private message
DrkPlague
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jun 2003
Posts: 107

PostPosted: Fri Jun 13, 2003 6:28 am    Post subject: Reply with quote

my personal favorite, the cflag script: https://forums.gentoo.org/viewtopic.php?t=43648
_________________
DKP

There are 10 kinds of people in the world:
Those who understand binary and those who don't...
Back to top
View user's profile Send private message
dirk_salewski
Apprentice
Apprentice


Joined: 04 Jun 2003
Posts: 216
Location: Germany

PostPosted: Sat Jun 14, 2003 6:42 am    Post subject: CFLAGS for AMD K6-2 and K6-3 Reply with quote

Hey zion1459,

I have a similar machine now (AMD K6-2+ 500Mhz) and had the same (K6-2 450Mhz) before. I installed Gentoo several times now (still getting familiar with it) and I found out some things about CFLAGS on K6:

1) While it is possible for many programs to compile with "-fomit-frame-pointer", some builds inevitably will fail on K6-2/3 when it is enabled. You won't get anywhere near a usable system with it (at least I didn't manage to). After doing some searches, I found out that the impact of "-fomit-frame-pointer" may be negligible positive or even slightly negative. Throw it out of Your CFLAGS.

2) The -O[3|2|s] - debate: In order to test the impact of the -O-things I compiled OpenOffice.org on my machine two times. With -O2 (optimized for speed) it takes around 25 seconds to start (yawn) whereas with -Os everything was ready after 7 seconds. This is quite an improvement, and I wanted to know why. I found a newsposting from Linus Thorvalds where he goes something like:

Quote:
(This is not a verbatim, but a logical quote)
If You have a program that has to do something over and over again (e.g. a library or the kernel) then You should optimize for speed (-O2). If You, on the other hand, want to improve the speed of a GUI-Program, which sits mostly there waiting for user actions which are never the same, then it's better to optimize for size (-Os).


There is another posting somewhere on the net suggesting that this is largely dependent on the size of the processor cache: It is said there that with a on-processor-cache of more than 512kb the benefit of using "-Os" shrinks to zero, however, the K6-2 has only 32kb which makes it relevant.

Now, while recompiling gentoo with -Os I noticed that many programs (most notably the kernel itself) automatically switch to "-O2". I didn't count them, but counting on my basic understanding of programming I think that these are often programs Linus mentioned in his posting. GUI-programs normally compile with "-Os", like specified.
There is an additional benefit of using "-Os" on small machines: Compiling with "-O[3|2]" takes slightly longer than forever, with "-Os" You are a bit faster. Don't expect wonders, though.

3) Enable "-march=k6-2", "-mmmx" and "-m3dnow". Issuing "cat /proc/cpuinfo" should give the information that Your processor supports mmx and 3dnow instructions. This should cause gcc to optimize everything for Your specific hardware. "-march=k6-2" implies "-mcpu=k6-2", therefor the latter is not needed (in fact, there is a posting somewhere on the net which says that specifying both is redundant and makes gcc slower, but I don't know enough about that to decide whether it is true). With "-march=k6-2" You tell gcc that Your processor supports mmx and 3dnow instructions, with "-mmmx" and "-m3dnow" You tell gcc to actually make use of those availiable special commands.

The relevant part of my make.conf now looks like this:
Code:
CHOST="i586-pc-linux-gnu"
CFLAGS="-march=k6-3 -mmmx -m3dnow -Os -pipe"
CXXFLAGS="${CFLAGS}"

and everything compiles and runs fine and as fast as You can expect on this old hardware.

Greetings,

Dirk
Back to top
View user's profile Send private message
zion1459
Tux's lil' helper
Tux's lil' helper


Joined: 12 Mar 2003
Posts: 146

PostPosted: Sun Jun 15, 2003 3:41 pm    Post subject: Reply with quote

thx yall :D
it works now... using what dirk_salewski posted the problem was solved :)
_________________
an it harm none, do as ye will.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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