Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCC 3.3
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, ... 10, 11, 12  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
cyfred
Retired Dev
Retired Dev


Joined: 23 Aug 2002
Posts: 596

PostPosted: Thu May 01, 2003 12:35 pm    Post subject: Reply with quote

Definately test it with mozilla 1.4a if that works ill be up for trying it with my pentium4 :) ... you may want to try commenting out the strip-flags section, as I have compiled previous releases of mozilla without doing so and they were blazing fast to use and stable aswell (that was on my athlon xp though).
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Thu May 01, 2003 12:38 pm    Post subject: Reply with quote

been there done that... compiling with -march=athlon-xp -O3 (to see if the new inlining stuff works like it's suppose to)

I'm not optimizing glibc, binutils and gcc - I never do that, for stability.. hey remember SuSE8.2 shipped based on GCC3.3 (heavily patched I suppose), it should be fine.


-edit-

I was thinking, if someone has a few moments we might wanna flesh out the basics needed to implement the profiling GCC supports, it's supposedly more stable now, and I would love to play with it.. It would be a great feature in portage.
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Thu May 01, 2003 2:45 pm    Post subject: Reply with quote

Both glibc and mozilla compiled... glibc needed the patch mentioned earlier... so GCC 3.3 has passed the test so far..

-edit-

This by the way was posted from my newly compiled mozilla 1.4a (-march=athlon-xp -O3)
Back to top
View user's profile Send private message
AlterEgo
Veteran
Veteran


Joined: 25 Apr 2002
Posts: 1619

PostPosted: Thu May 01, 2003 2:50 pm    Post subject: Reply with quote

Lovechild wrote:

I was thinking, if someone has a few moments we might wanna flesh out the basics needed to implement the profiling GCC supports, it's supposedly more stable now, and I would love to play with it.. It would be a great feature in portage.


I feel profiling is only useful for programmers who can optimize lineair pieces of code: input->process->output.
How would you imagine using profiling in practice, for example in Mozilla?
I cannot imagine how.
Back to top
View user's profile Send private message
Gnufsh
Guru
Guru


Joined: 28 Dec 2002
Posts: 400
Location: Portland, OR

PostPosted: Thu May 01, 2003 3:05 pm    Post subject: Reply with quote

compile with -fprofile-arcs and keep the tmp dirs. Use it. A few days later, copy the files generated by the binaries made with -fprofile-arcs back into the directory, delete all the object files andcompile with -fbranch-probabilities maybe?
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Thu May 01, 2003 3:13 pm    Post subject: Reply with quote

Gnufsh wrote:
compile with -fprofile-arcs and keep the tmp dirs. Use it. A few days later, copy the files generated by the binaries made with -fprofile-arcs back into the directory, delete all the object files andcompile with -fbranch-probabilities maybe?


I was thinking the same.. keepwork FEATURE flag would help maybe.
Back to top
View user's profile Send private message
iamarug
Apprentice
Apprentice


Joined: 09 Feb 2003
Posts: 220

PostPosted: Thu May 01, 2003 5:51 pm    Post subject: Reply with quote

Okay, I could not resist. I emerge this gcc and indeed the march=pentium4 bug that was present when compiling glibc seems to have disappeared. After adding the patch mentioned earlier in this thread, glibc compiled with no problems. For more info on the sse2 glibc issue, please see:
http://forums.gentoo.org/viewtopic.php?t=43373&highlight=pentium4+glibc
next, I will try mozilla if I can find a 1.4b ebuild.

PS: what is this -O3 inlining you speak of? I cant seem to find anything about it.
Back to top
View user's profile Send private message
floam
Veteran
Veteran


Joined: 27 Oct 2002
Posts: 1067
Location: Vancouver, WA USA

PostPosted: Thu May 01, 2003 9:46 pm    Post subject: Reply with quote

emerge gcc-3.3 fails with:
Code:
case "compare-lean" in compare | compare-lean ) stage=2 ;; * ) stage=`echo compare-lean | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
for dir in tmp-foo intl cp f java objc; do \
  if [ "`echo $dir/*.o`" != "$dir/*.o" ] ; then \
    for file in $dir/*.o; do \
      tail +16c ./$file > tmp-foo1; \
      tail +16c stage$stage/$file > tmp-foo2 \
        && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $file differs >> .bad_compare) || true; \
    done; \
  else true; fi; \
done
rm -f tmp-foo*
case "compare-lean" in compare | compare-lean ) stage=2 ;; * ) stage=`echo compare-lean | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
if [ -f .bad_compare ]; then \
  echo "Bootstrap comparison failure!"; \
  cat .bad_compare; \
  exit 1; \
else \
  case "compare-lean" in \
    *-lean ) rm -rf stage$stage ;; \
    *) ;; \
  esac; true; \
fi
Bootstrap comparison failure!
f/com.o differs
make[1]: *** [compare-lean] Error 1
make[1]: Leaving directory `/var/tmp/portage/gcc-3.3/work/build/gcc'
make: *** [bootstrap-lean] Error 2
 
!!! ERROR: sys-devel/gcc-3.3 failed.
!!! Function src_compile, Line 216, Exitcode 2
!!! (no error message)
Back to top
View user's profile Send private message
cyfred
Retired Dev
Retired Dev


Joined: 23 Aug 2002
Posts: 596

PostPosted: Thu May 01, 2003 10:46 pm    Post subject: Reply with quote

Floam im under the impression that Lovechild managed to compile GCC 3.3 with out using strip-flags. But he only has a few conservative flags in use aswell. If you are like me and have flags that are a few console lines long then maybe you should try using strip-flags still.

Im going to try and not use strip-flags now before I go to uni, will report back.

EDIT: Just as a thought, if anyone does have problems compiling with out the use of strip-flags, then maybe try building GCC 3.3 first with conservative flags and then rebuild it with out using strip flags. This is what I was getting at in the note in the Ebuild.
Code:

# The issue with optimisations is supposedly getting better with this
# release of GCC but we are compiling with an older GCC and hence need
# to remove dangerous flags. Wether or not this will become uneccesary
# will require testing. If you choose to not strip flags in another
# package build please report your findings.

While GCC 3.3 may support the compilation with optimisations GCC 3.2.* which you are building it with does not.


Last edited by cyfred on Thu May 01, 2003 10:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
floam
Veteran
Veteran


Joined: 27 Oct 2002
Posts: 1067
Location: Vancouver, WA USA

PostPosted: Thu May 01, 2003 10:50 pm    Post subject: Reply with quote

yeah, your right, I turned strip-flags off and its better. I was using:

Code:
CFLAGS="-march=athlon-xp -O3 -ffast-math -mfpmath=sse,387 -pipe -fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr -fmerge-all-constants"
so im sure its possible i killed stuff
Back to top
View user's profile Send private message
cyfred
Retired Dev
Retired Dev


Joined: 23 Aug 2002
Posts: 596

PostPosted: Fri May 02, 2003 1:20 am    Post subject: Reply with quote

Well from my testing it appears that you are quite safe to build packages with GCC 3.3 and optimisations turned on. But you must first build GCC 3.3 using the strip flags option. GCC 3.2 users your building of GCC 3.3 will not work unless you do strip the flags -- i tested this by compiling with 3.2 and 3.3 on the same machine one after another, what worked on 3.3 did not on 3.2

Also I have finished building glibc, mozilla (1.3-r1 still) and gcc 3.3 on my p4 with the following CFLAGS
Code:
CFLAGS="-march=pentium4 -mmmx -msse -msse2 -mfpmath=sse -O3 -pipe -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -fschedule-insns2 -fforce-addr -fprefetch-loop-arrays -ffast-math"


Yes I know some of them are redundently implied by others but I prefer to know whats there -- I know it makes no difference.
Back to top
View user's profile Send private message
floam
Veteran
Veteran


Joined: 27 Oct 2002
Posts: 1067
Location: Vancouver, WA USA

PostPosted: Fri May 02, 2003 3:46 am    Post subject: Reply with quote

can anyone else not get epiphany-cvs to compile?

edit: adding append-flags -fno-strict-aliasing to the epiphany-cvs ebuild under the strip-flags line fixed one of the errors, but i still get a problem later.
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Fri May 02, 2003 6:35 am    Post subject: Reply with quote

epiphany can't build, it uses some C++ syntax flags that gcc now filters - I'm looking into a solution
Back to top
View user's profile Send private message
floam
Veteran
Veteran


Joined: 27 Oct 2002
Posts: 1067
Location: Vancouver, WA USA

PostPosted: Fri May 02, 2003 10:59 pm    Post subject: Reply with quote

openbox also dies during compile :(
Back to top
View user's profile Send private message
cyfred
Retired Dev
Retired Dev


Joined: 23 Aug 2002
Posts: 596

PostPosted: Sat May 03, 2003 12:54 am    Post subject: Reply with quote

Floam if you are compiling with optimizations I think it maybe the -fmerge-all-constants CFLAGS that you are using, there seems to be a few that dont work just yet im working on a -r1 ebuild currently to try and sort these things out.
Back to top
View user's profile Send private message
floam
Veteran
Veteran


Joined: 27 Oct 2002
Posts: 1067
Location: Vancouver, WA USA

PostPosted: Sat May 03, 2003 1:02 am    Post subject: Reply with quote

cyfred: i already tryed emerging epiphany without any cflags, if you're speaking of openbox, then taking out -fmerge-all-contstants doesn't help any.
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Sat May 03, 2003 7:24 am    Post subject: Reply with quote

It seems GCC is a bit more strict than previous versions - it doesn't allow this:

Code:

cc1: warning: "-Wsign-promo" is valid for C++ but not for C/ObjC
cc1: warning: "-Wsign-promo" is valid for C++ but not for C/ObjC
ephy-node-view.c: In function `ephy_node_view_get_selection':
ephy-node-view.c:897: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[2]: *** [ephy-node-view.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/epiphany-cvs-0.4.2.99-r6/work/epiphany/lib/widgets'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/epiphany-cvs-0.4.2.99-r6/work/epiphany/lib'
make: *** [install-recursive] Error 1
Back to top
View user's profile Send private message
floam
Veteran
Veteran


Joined: 27 Oct 2002
Posts: 1067
Location: Vancouver, WA USA

PostPosted: Sat May 03, 2003 8:20 am    Post subject: Reply with quote

lovechild: I already got past that error, there's another one I can't fix, to get past the first one (the one you're at) just edit the ebuild and have it add -fno-strict-aliasing to cflags with the flag-o-matic thing under where it strip-flags.
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Sat May 03, 2003 11:38 am    Post subject: Reply with quote

no worries, I got Mozilla cvs and galeon cvs merged... and Galeon has an option to block pop ups, which epiphany lacks (I haven't found it at least), so it's all good again.
Back to top
View user's profile Send private message
fca
Guru
Guru


Joined: 22 Feb 2003
Posts: 345
Location: Netherlands

PostPosted: Sat May 03, 2003 3:09 pm    Post subject: Reply with quote

OK, emerged gcc-3.3 and then recompiled it with the optimizations turned on.
Now trying kdelibs from CVS, so far, compiling well.
BTW:
Code:
CFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer -mmmx -msse -m3dnow -fforce-addr -falign-functions=64 -falign-loops=4 -falign-jumps=4 -finline-functions -fprefetch-loop-arrays -mfpmath=sse,387 -pipe"


Some redundant things there, I see, but it doesn't really matter, does it?
How do I apply the patch for glibc BTW?
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Sat May 03, 2003 3:33 pm    Post subject: Reply with quote

I just copied the patch into a file under files and used epatch in the ebuild - I'm guessing there are a geekier way of going about it - but this gets the job done.
Back to top
View user's profile Send private message
fca
Guru
Guru


Joined: 22 Feb 2003
Posts: 345
Location: Netherlands

PostPosted: Sat May 03, 2003 4:00 pm    Post subject: Reply with quote

OK, kdelibs-cvs compiled just fine, now doing glibc, and then I'll do XFree and kdebase I think, and then a development kernel I think :twisted:
Bleeding edge for sure...
Back to top
View user's profile Send private message
iamarug
Apprentice
Apprentice


Joined: 09 Feb 2003
Posts: 220

PostPosted: Sat May 03, 2003 4:09 pm    Post subject: Reply with quote

Well, I can report that the development kernel compiles successfully. However, make xconfig gives and error on one line. I am sure it is quite easy to fix but since I already had my config file, I just copied it over and compiled.
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Sat May 03, 2003 4:19 pm    Post subject: Reply with quote

2.5.68-mm4 compiled just fine... gcc 3.3 is fine so far.
Back to top
View user's profile Send private message
fca
Guru
Guru


Joined: 22 Feb 2003
Posts: 345
Location: Netherlands

PostPosted: Sat May 03, 2003 5:43 pm    Post subject: Reply with quote

XFree86 4.3.0-r1 compiled fine with strip-flags commented out, kdebase is doing fine also.
It seems quite ready, I'll do some benching to test the speed with Lame when I'm finished with kdebase.
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
Goto page Previous  1, 2, 3, ... 10, 11, 12  Next
Page 2 of 12

 
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