View previous topic :: View next topic |
Author |
Message |
bishop n00b
Joined: 27 May 2002 Posts: 21 Location: Rochester, MN
|
Posted: Tue Jun 11, 2002 3:43 am Post subject: gcc3.1 and -march=pentium4 will not build itself |
|
|
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 |
|
|
bishop n00b
Joined: 27 May 2002 Posts: 21 Location: Rochester, MN
|
Posted: Thu Jun 13, 2002 10:31 am Post subject: |
|
|
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 |
|
|
bishop n00b
Joined: 27 May 2002 Posts: 21 Location: Rochester, MN
|
Posted: Sat Jun 15, 2002 8:41 pm Post subject: |
|
|
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 |
|
|
iluvatar n00b
Joined: 16 Jun 2002 Posts: 13
|
Posted: Sun Jun 16, 2002 8:09 pm Post subject: |
|
|
didn't even know gcc had any p4 optimizations yet... _________________ Corona Extra is your friend. |
|
Back to top |
|
|
Safrax Guru
Joined: 23 Apr 2002 Posts: 422
|
Posted: Sun Jun 16, 2002 8:20 pm Post subject: |
|
|
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 |
|
|
bishop n00b
Joined: 27 May 2002 Posts: 21 Location: Rochester, MN
|
Posted: Sun Jun 16, 2002 11:35 pm Post subject: |
|
|
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 |
|
|
Safrax Guru
Joined: 23 Apr 2002 Posts: 422
|
Posted: Mon Jun 17, 2002 12:24 am Post subject: |
|
|
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 |
|
|
bishop n00b
Joined: 27 May 2002 Posts: 21 Location: Rochester, MN
|
Posted: Mon Jun 17, 2002 1:40 am Post subject: |
|
|
iluvatar wrote: | didn't even know gcc had any p4 optimizations yet... |
Yes, new in the gcc3 line. |
|
Back to top |
|
|
Ard Righ Guru
Joined: 24 Jun 2002 Posts: 337 Location: Wellington, NZ
|
Posted: Mon Jun 24, 2002 7:38 am Post subject: |
|
|
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 |
|
|
Ard Righ Guru
Joined: 24 Jun 2002 Posts: 337 Location: Wellington, NZ
|
Posted: Mon Jun 24, 2002 11:30 am Post subject: |
|
|
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 |
|
|
bishop n00b
Joined: 27 May 2002 Posts: 21 Location: Rochester, MN
|
Posted: Mon Jun 24, 2002 11:58 am Post subject: |
|
|
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 |
|
|
Jyrinx Tux's lil' helper
Joined: 03 May 2002 Posts: 92 Location: Carleton College - Northfield, MN
|
Posted: Tue Jun 25, 2002 12:10 am Post subject: |
|
|
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 |
|
|
bishop n00b
Joined: 27 May 2002 Posts: 21 Location: Rochester, MN
|
Posted: Tue Jun 25, 2002 1:22 am Post subject: |
|
|
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 |
|
|
|