Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gcc3.1 and -march=pentium4 will not build itself
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
bishop
n00b
n00b


Joined: 27 May 2002
Posts: 21
Location: Rochester, MN

PostPosted: Tue Jun 11, 2002 3:43 am    Post subject: gcc3.1 and -march=pentium4 will not build itself Reply with quote

On a bootstrap, if you specify -pentium4 for your flags, gcc3.1 will not compile itself. It fails with a message about requiring secondary memory....

So, I had to specify -mi686 to get past the bootstrap (Yes, I tried lowering -O3 to -O2, and nothing else besides -pipe).

So, once bootstrap is over, I'll try to emerge the rest of the system with -pentium4 and -O3 to see how far I get.
Back to top
View user's profile Send private message
bishop
n00b
n00b


Joined: 27 May 2002
Posts: 21
Location: Rochester, MN

PostPosted: Thu Jun 13, 2002 10:31 am    Post subject: Reply with quote

oky doke. I had some trouble getting my reiserfs / to mount when I compiled the kernel with -pentium4 and -O3 flags. So I dropped to -O2 and now / mounts fine.

Can't wait to try it all out!
Back to top
View user's profile Send private message
bishop
n00b
n00b


Joined: 27 May 2002
Posts: 21
Location: Rochester, MN

PostPosted: Sat Jun 15, 2002 8:41 pm    Post subject: Reply with quote

Ok, after continuing to emerge the rest of the system, trying wherever possible to use the pentium4 flag and -O3, there were just a couple of packages that would not compile, and I had to switch to -mi686. The -O3 continued to work, though.

There is apparently a bug with gcc3.1 and the pentium4 flag, as it always fails on certain packages with the same error, which something about needing secondary memory or something....kdemultimedia did compile fine for me with the -mi686 and -O3. Not with -mpentium4, FYI
Back to top
View user's profile Send private message
iluvatar
n00b
n00b


Joined: 16 Jun 2002
Posts: 13

PostPosted: Sun Jun 16, 2002 8:09 pm    Post subject: Reply with quote

didn't even know gcc had any p4 optimizations yet...
_________________
Corona Extra is your friend.
Back to top
View user's profile Send private message
Safrax
Guru
Guru


Joined: 23 Apr 2002
Posts: 422

PostPosted: Sun Jun 16, 2002 8:20 pm    Post subject: Reply with quote

I had similiar problems too. However I am able to get my kernel working with -march=pentium4 -fomit-frame-pointer -O3 -mmmx -msse -msse2 -mfpmath=sse. I think out of the entire emerge system process I was able to compile all but 1 package. Oh well the pentium4 error is a compiler error but hey GCC 3.1 is still fresh and the pentium4 arch option is still fresh so I think it's pretty good considering I only had to drop the optimizations down for a few naughty packages.
Back to top
View user's profile Send private message
bishop
n00b
n00b


Joined: 27 May 2002
Posts: 21
Location: Rochester, MN

PostPosted: Sun Jun 16, 2002 11:35 pm    Post subject: Reply with quote

Safrax wrote:
However I am able to get my kernel working with -march=pentium4 -fomit-frame-pointer -O3 -mmmx -msse -msse2 -mfpmath=sse.


I'll have to try that. The kernel built fine with -mpentium4, I just couldn't mount my reiser root partition. Do you use any reiserfs partitions? It would be useful for me to know that, before I recompile. I compiled reiserfs into the kernel, so I'm not sure which made it work for me: the i686 flag, or not having it as a module....
Back to top
View user's profile Send private message
Safrax
Guru
Guru


Joined: 23 Apr 2002
Posts: 422

PostPosted: Mon Jun 17, 2002 12:24 am    Post subject: Reply with quote

Yeah everything except for boot and swap are reiserfs based on my computer. Something I've found that helps out more than anything is to automatically mount devfs at bootup. I was having various problems with things not working right till the devfs daemon started untill I did that. Now I have no problems whatsoever.
Back to top
View user's profile Send private message
bishop
n00b
n00b


Joined: 27 May 2002
Posts: 21
Location: Rochester, MN

PostPosted: Mon Jun 17, 2002 1:40 am    Post subject: Reply with quote

iluvatar wrote:
didn't even know gcc had any p4 optimizations yet...


Yes, new in the gcc3 line.
Back to top
View user's profile Send private message
Ard Righ
Guru
Guru


Joined: 24 Jun 2002
Posts: 337
Location: Wellington, NZ

PostPosted: Mon Jun 24, 2002 7:38 am    Post subject: Reply with quote

Safrax wrote:
I had similiar problems too. However I am able to get my kernel working with -march=pentium4 -fomit-frame-pointer -O3 -mmmx -msse -msse2 -mfpmath=sse. I think out of the entire emerge system process I was able to compile all but 1 package. Oh well the pentium4 error is a compiler error but hey GCC 3.1 is still fresh and the pentium4 arch option is still fresh so I think it's pretty good considering I only had to drop the optimizations down for a few naughty packages.


You managed to get it compile with those options ? I tried bootstrapping 1.3b with those options, without the -fomit-frame-pointer, and it failed on glibc.

I have to play around with it a bit more, but I haven't had much luck as yet.
Back to top
View user's profile Send private message
Ard Righ
Guru
Guru


Joined: 24 Jun 2002
Posts: 337
Location: Wellington, NZ

PostPosted: Mon Jun 24, 2002 11:30 am    Post subject: Reply with quote

Ok, these are the settings I was playing with when I tried running 1.3b

CHOST=i686-pc-linux-gnu
CFLAGS=march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -03 -pipe
CXXFLAGS=march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -03 -pipe

It would get to the stage of compiling glibc, then exit with "error 2". I didn't get a chance to write the full message down.

I am note 100% sure what the -pipe option does, but it was a default so I left it there. Is it better to remove it when compiling for pentium4 ?

I was using 1.3b, I had 1.3a ISO which I booted from, get to the stage of mounting /mnt/gentoo just before untarring the .bz2 file, then I mounted partition on HDD where the 1.3b file was, cp it across, untar that instead of the 1.3a file on the CD.

Everything seems to go ok, but damn there are huge long list of warnings "trying to compare signed and unsigned" about a billion times :) when trying to bootstrap.
Back to top
View user's profile Send private message
bishop
n00b
n00b


Joined: 27 May 2002
Posts: 21
Location: Rochester, MN

PostPosted: Mon Jun 24, 2002 11:58 am    Post subject: Reply with quote

Yes, warnings make me nervous.

Plus, comparing signed to unsigned means that those values are being cast at runtime, which is one more performance hit. Though not a big one, unless those functions are used all over the place.

What's worse is that there are probably a lot of explicit type-casts being done, just to clean up warnings, instead of just starting out with the correct datatype....which is the same performance hit, but you don't have the warning to point us at the problem...
Back to top
View user's profile Send private message
Jyrinx
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2002
Posts: 92
Location: Carleton College - Northfield, MN

PostPosted: Tue Jun 25, 2002 12:10 am    Post subject: Reply with quote

I'm no expert, but I'm not sure it's that simple, especially considering those casting warnings are always popping up when compiling important low-level stuff. These hackers know what they're doing, and I guess they're willing to put up with a bunch of warnings if they can squeeze out a bit more power.

(BTW, how are casts done at runtime in C? I thought that the compiler just pretends that, for instance, the signed int is unsigned (or maybe vice versa); shouldn't this just affect code generation?)

Jyrinx
jyrinx@mindspring.com
Back to top
View user's profile Send private message
bishop
n00b
n00b


Joined: 27 May 2002
Posts: 21
Location: Rochester, MN

PostPosted: Tue Jun 25, 2002 1:22 am    Post subject: Reply with quote

Jyrinx wrote:
These hackers know what they're doing, and I guess they're willing to put up with a bunch of warnings if they can squeeze out a bit more power.


Maybe. Then again, anybody can make mistakes :)

Jyrinx wrote:

(BTW, how are casts done at runtime in C? I thought that the compiler just pretends that, for instance, the signed int is unsigned (or maybe vice versa); shouldn't this just affect code generation?)


Maybe, maybe not. I suppose it depends on what is being done. I always fix my warnings, though, because they are there for a reason, right? Usually means you did something wrong, potentially wrong, or using the wrong data type. It's always faster to compare 2 like variables, rather than 2 dissimilar ones, isn't it?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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