View previous topic :: View next topic |
Author |
Message |
Mr. Hahn Apprentice
Joined: 05 Apr 2003 Posts: 250
|
Posted: Wed May 14, 2003 7:34 pm Post subject: So any fixes for that march=pentium4 flag? |
|
|
any? btw, what was that work around method to get the see2 support w/ th pentium4 cflag? I think I remeber it being a combination of mpu=pentium4 & march=pentium3 |
|
Back to top |
|
|
Lovechild Advocate
Joined: 17 May 2002 Posts: 2858 Location: Århus, Denmark
|
Posted: Wed May 14, 2003 7:43 pm Post subject: |
|
|
GCC 3.3 or -march=pentium3 -mcpu=pentium4 for GCC 3.2.x |
|
Back to top |
|
|
Mr. Hahn Apprentice
Joined: 05 Apr 2003 Posts: 250
|
Posted: Wed May 14, 2003 8:00 pm Post subject: |
|
|
is the sse2 flag the same w/ the later method? (-msse2) |
|
Back to top |
|
|
Lovechild Advocate
Joined: 17 May 2002 Posts: 2858 Location: Århus, Denmark
|
Posted: Wed May 14, 2003 8:07 pm Post subject: |
|
|
Mr. Hahn wrote: | is the sse2 flag the same w/ the later method? (-msse2) |
-mnosse2 is set I think - because that's what's generating wrong code. Anyways, the problem is supposedly 100% gone in GCC 3.3 so I would advise you to try it out. |
|
Back to top |
|
|
SPo0n Tux's lil' helper
Joined: 03 May 2003 Posts: 85 Location: England
|
Posted: Wed May 14, 2003 8:54 pm Post subject: |
|
|
i always wondered why stuff was compiling with -pentium3
I've got a P4 2.53ghz processor, gcc 3.2.2, shall i leave it as is? |
|
Back to top |
|
|
Mr. Hahn Apprentice
Joined: 05 Apr 2003 Posts: 250
|
Posted: Wed May 14, 2003 9:56 pm Post subject: |
|
|
Lovechild wrote: | Mr. Hahn wrote: | is the sse2 flag the same w/ the later method? (-msse2) |
-mnosse2 is set I think - because that's what's generating wrong code. Anyways, the problem is supposedly 100% gone in GCC 3.3 so I would advise you to try it out. |
well 3.3 is still beta isn't it? |
|
Back to top |
|
|
Lovechild Advocate
Joined: 17 May 2002 Posts: 2858 Location: Århus, Denmark
|
Posted: Wed May 14, 2003 10:14 pm Post subject: |
|
|
Mr. Hahn wrote: | Lovechild wrote: | Mr. Hahn wrote: | is the sse2 flag the same w/ the later method? (-msse2) |
-mnosse2 is set I think - because that's what's generating wrong code. Anyways, the problem is supposedly 100% gone in GCC 3.3 so I would advise you to try it out. |
well 3.3 is still beta isn't it? |
Just released, I run it. |
|
Back to top |
|
|
Mr. Hahn Apprentice
Joined: 05 Apr 2003 Posts: 250
|
Posted: Wed May 14, 2003 11:17 pm Post subject: |
|
|
so I guess an emerge gcc will do the trick , or is there more to it? |
|
Back to top |
|
|
RedBeard0531 Guru
Joined: 21 Sep 2002 Posts: 415 Location: maryland
|
Posted: Thu May 15, 2003 1:24 am Post subject: |
|
|
Mr. Hahn wrote: | so I guess an emerge gcc will do the trick , or is there more to it? |
https://forums.gentoo.org/viewtopic.php?t=50679&postdays=0&postorder=asc&start=125
I run it, and some pkgs wont compile, so i just use gcc-config to switch back for those.
btw- would u happen to be a phisics teacher? _________________ OH MY GOD! Kenny just killed Kenny!
That Basterd! |
|
Back to top |
|
|
Mr. Hahn Apprentice
Joined: 05 Apr 2003 Posts: 250
|
Posted: Thu May 15, 2003 1:46 am Post subject: |
|
|
no lol, I'm a cs major @ Georgia Tech, but I took ap physics a year ago... |
|
Back to top |
|
|
Narada Guru
Joined: 12 Dec 2002 Posts: 300 Location: London, UK
|
Posted: Thu May 15, 2003 7:07 pm Post subject: |
|
|
Lovechild wrote: | GCC 3.3 or -march=pentium3 -mcpu=pentium4 for GCC 3.2.x |
Gcc 3.2.3 and 3.3 fix the pentium4 bugs so you can safely use -march=pentium4. Gcc 3.3 is not on portage yet but 3.2.3 is which can be emerged using the full absolute path to the ebuild. Then you have to inject a stub for 3.2.2 to prevent it downgrading. If you are using gcc 3.2.2 then you must use -march=pentium3 and if you don't some ebuilds will downgrade your flag for each compilation as they see fit. I'm told -march overrides -mcpu so perhaps using -march only is a better idea. My choice has been to use gcc 3.2.3 and rebuild my entire 'world' set of packages with -march=pentium4. _________________ http://dhruba.name/
Last edited by Narada on Thu May 15, 2003 9:36 pm; edited 1 time in total |
|
Back to top |
|
|
Cossins Veteran
Joined: 21 Mar 2003 Posts: 1136 Location: Copenhagen, Denmark
|
Posted: Thu May 15, 2003 9:33 pm Post subject: |
|
|
No, -march does not override -mcpu.
march generates CPU-optimized code, whereas mcpu generates CPU-specific code.
- Simon |
|
Back to top |
|
|
Ard Righ Guru
Joined: 24 Jun 2002 Posts: 337 Location: Wellington, NZ
|
Posted: Fri May 16, 2003 5:34 am Post subject: |
|
|
/jumps on Soapbox...
Well, the problem nowadays doesn't appear so much to be with the GCC 3.2+ generated code, but more delinquent packages that are not conforming to decent coding standards, and getting killed during a perfectly legitimate (IMO) -march=pentium4 compile.
I tried installing Gnome the other day, it died out on a package called gst-libs. Now I had a look through the code for this gst-lib, and it kept getting killed due to bad maths error, yet the program was set to compile with -mpu=i486 with a -ffast-math!
I have read through a fair number of ebuilds, when looking to install packages. Without going through 100 or so each time I want to install something, it becomes a pain to make sure the people generating this code are doing it properly the first time around, and save the users having to edit them to get fixed.
And it's all well and good editing an ebuild to change USE flags or CFLAGS that are being stripped. But when it's in a header or source file for the program itself, it becomes a problem with evangelising the developers to fix this stuff - and I don't think users can ever bother with such things.
Maybe it's time to start a "Pentium 4 Users Group" to lobby programmers to look into fixing their code up a bit. |
|
Back to top |
|
|
splooge l33t
Joined: 30 Aug 2002 Posts: 636
|
Posted: Fri May 16, 2003 3:27 pm Post subject: |
|
|
Actually I just built glibc with -march=pentuim4 -mcpu=pentium3 which allowed me to compile the rest of my system with these flags:
CFLAGS="-march=pentium4 -mmmx -msse -msse2 -mfpmath=sse,387 -O3 -pipe -fomit-frame-pointer -funroll-loops -frerun-cse-after-loops -frerun-loop-opt -falign-functions=4 -fschedule-insns2 -fforce-addr -fprefetch-loop-arrays -ffast-math -fexpensive-optimizations"
Everything works great so far. I just compiled KDE overnight and it works beautifully. Using the python script to check for sse errors returns nothing negative. _________________ http://get.a.clue.de |
|
Back to top |
|
|
Mr. Hahn Apprentice
Joined: 05 Apr 2003 Posts: 250
|
Posted: Fri May 16, 2003 4:14 pm Post subject: |
|
|
splooge wrote: | Actually I just built glibc with -march=pentuim4 -mcpu=pentium3 which allowed me to compile the rest of my system with these flags:
CFLAGS="-march=pentium4 -mmmx -msse -msse2 -mfpmath=sse,387 -O3 -pipe -fomit-frame-pointer -funroll-loops -frerun-cse-after-loops -frerun-loop-opt -falign-functions=4 -fschedule-insns2 -fforce-addr -fprefetch-loop-arrays -ffast-math -fexpensive-optimizations"
Everything works great so far. I just compiled KDE overnight and it works beautifully. Using the python script to check for sse errors returns nothing negative. |
wow that is a pretty hardcore cflag, I may use it, mine is :
-march=pentium3 -msse -mmmx -mfpmath=sse,387 -2 -pipe -fomit-frame-pointer
all I want to add is sse2 support, but what does all that other stuff you got in ther do? got a link to some explaination? |
|
Back to top |
|
|
Mr. Hahn Apprentice
Joined: 05 Apr 2003 Posts: 250
|
Posted: Mon May 19, 2003 6:00 pm Post subject: |
|
|
Narada wrote: | Lovechild wrote: | GCC 3.3 or -march=pentium3 -mcpu=pentium4 for GCC 3.2.x |
Gcc 3.2.3 and 3.3 fix the pentium4 bugs so you can safely use -march=pentium4. Gcc 3.3 is not on portage yet but 3.2.3 is which can be emerged using the full absolute path to the ebuild. Then you have to inject a stub for 3.2.2 to prevent it downgrading. If you are using gcc 3.2.2 then you must use -march=pentium3 and if you don't some ebuilds will downgrade your flag for each compilation as they see fit. I'm told -march overrides -mcpu so perhaps using -march only is a better idea. My choice has been to use gcc 3.2.3 and rebuild my entire 'world' set of packages with -march=pentium4. |
What do you mean by "injecting a stub"? |
|
Back to top |
|
|
Megaptera Tux's lil' helper
Joined: 29 Jul 2002 Posts: 145
|
Posted: Mon May 19, 2003 7:12 pm Post subject: |
|
|
Injecting a stub just means tricking portage into thinking something has been emerged when it hasn't been. Just do:
Code: | emerge -i sys-devel/gcc-3.2.2 |
But gcc 3.3 is in portage now. It's hardmasked (meaning it's mentioned in the package.mask file, so even ~86 won't see it), but you can go to /usr/portage/sys-devel/gcc and do
Code: | emerge gcc-3.3.ebuild |
from there. Just be sure that later you don't accidentally downgrade it, because portage will not see that the ebuild exists. _________________ It is not like the world will end if I take the day off from eating worlds. |
|
Back to top |
|
|
Mr. Hahn Apprentice
Joined: 05 Apr 2003 Posts: 250
|
Posted: Mon May 19, 2003 9:27 pm Post subject: |
|
|
Megaptera wrote: | Injecting a stub just means tricking portage into thinking something has been emerged when it hasn't been. Just do:
Code: | emerge -i sys-devel/gcc-3.2.2 |
But gcc 3.3 is in portage now. It's hardmasked (meaning it's mentioned in the package.mask file, so even ~86 won't see it), but you can go to /usr/portage/sys-devel/gcc and do
Code: | emerge gcc-3.3.ebuild |
from there. Just be sure that later you don't accidentally downgrade it, because portage will not see that the ebuild exists. |
I think I'll just use 3.2.3 for now. But thanks! |
|
Back to top |
|
|
Mr. Hahn Apprentice
Joined: 05 Apr 2003 Posts: 250
|
Posted: Tue May 20, 2003 2:38 am Post subject: |
|
|
ok got it working !
Code: |
balrog root # gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs
Configured with: /var/tmp/portage/gcc-3.2.3-r1/work/gcc-3.2.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext
Thread model: posix
gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)
balrog root #
|
but will it downgrade to 3.2.2 after I do an emerge -e world which I am in the process of right now? |
|
Back to top |
|
|
Mr. Hahn Apprentice
Joined: 05 Apr 2003 Posts: 250
|
Posted: Tue May 20, 2003 3:10 am Post subject: |
|
|
dam it , it did!
I'm into the emerge and I open another console, gcc -v, and it says 3.2.2. Will it still complete the remainder of the system compile using 3.2.3? Will it be bad if I have to emerge 3.2.3 again with the 3.2.2 compiler and the P4 flags? grrrr! |
|
Back to top |
|
|
Megaptera Tux's lil' helper
Joined: 29 Jul 2002 Posts: 145
|
Posted: Tue May 20, 2003 2:36 pm Post subject: |
|
|
What you could do to get around that is edit the ebuilds (and probably move them to your portage overlay) so that 3.2.2 and 3.2.3 have different slots. This would basically let portage up/downgrade gcc however it wants between the two, because as far as your system is concerned they're sitting in different "slots", and it won't unmerge either of them. I'm going to guess there's a better solution, though.
I've been looking at the gcc changelogs for my own machine and I haven't seen anything that says 3.2.3 fixes the p4 bug -- on the gcc website , the changelog for 3.3 says
Quote: |
Bug Fixes
...
# 8994 ICE with -O -march=pentium4
|
It's quite possible I'm missing something, but I think your best bet anyway would be to go with 3.3 -- it'll be an awful lot of work if 3.2.3 doesn't fix the problem, you know? _________________ It is not like the world will end if I take the day off from eating worlds. |
|
Back to top |
|
|
Mr. Hahn Apprentice
Joined: 05 Apr 2003 Posts: 250
|
Posted: Tue May 20, 2003 3:01 pm Post subject: |
|
|
yeah, but I thought 3.3 is still kinda buggy, I should be keeping up w/ it though, but im not. It is going to be a pain getting this system the way I want it anyways. I'm planning on getting a scsi drive and controller, so basically im gonna be installing it all over again one of these days, but hey I have all summer until school starts and I start programming on this box . |
|
Back to top |
|
|
Megaptera Tux's lil' helper
Joined: 29 Jul 2002 Posts: 145
|
Posted: Tue May 20, 2003 5:49 pm Post subject: |
|
|
My understanding of 3.3 is that it's stricter than 3.2 when it comes to what it considers workable code. There are programs out there that won't compile with it, but -- and this comes with the big caveat that I'm not the most knowledgeable of people to be saying this -- as different programs clean themselves up to work with 3.3, we'll be getting more tightly-coded stuff. I've been using 3.3 for a couple of days without problems. Of course, hehe, if you're gonna be reinstalling anyway ...
Well, with luck it'll be unmasked soon. :) _________________ It is not like the world will end if I take the day off from eating worlds. |
|
Back to top |
|
|
Mr. Hahn Apprentice
Joined: 05 Apr 2003 Posts: 250
|
Posted: Tue May 20, 2003 6:57 pm Post subject: |
|
|
with luck it'll be the default compiler when I reinstall, and I can have the sse2 action going! I swear , Athlon MPs are best for this os,not P4s |
|
Back to top |
|
|
|