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

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
pgrdsl
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2002
Posts: 93
Location: Southampton, UK

PostPosted: Tue Jul 19, 2005 6:10 pm    Post subject: Reply with quote

m0p wrote:
I am using gcc 4.1, for external use. I am not compiling anything in portage with it. For example, I am using it to build the nightly sources of Firefox and Thunderbird, but with no good results! Here is the output of the firefox startup script after compiling the latest nightly with 4.1, and a stripped down set of CFLAGS:

Code:
joe@mopbox ~/Firefox_Source/mozilla/dist/bin $ ./firefox
./run-mozilla.sh: line 131:  2456 Segmentation fault      "$prog" ${1+"$@"}



Could you post the ldd output for the binary that the script is trying to run?
_________________
pihl
Back to top
View user's profile Send private message
luisfelipe
Guru
Guru


Joined: 09 Apr 2005
Posts: 377

PostPosted: Tue Jul 19, 2005 7:25 pm    Post subject: Reply with quote

Is there a way of having different CFLAGS for different packages ??
I mean, when portage is going to compile gcc-4.1, I want it to use a special CFLAGS.
Is there a way, or do I have to keep changing it by hand everytime.
Back to top
View user's profile Send private message
robnotts
Guru
Guru


Joined: 15 Mar 2004
Posts: 405
Location: Nottingham, UK

PostPosted: Tue Jul 19, 2005 7:34 pm    Post subject: Reply with quote

I guess you could genertate a script such as...

Code:
emerge-gcc41


that contains something like...

Code:
CFLAGS="xxxxxx" CXXFLAGS="${CFLAGS}" emerge ${1} ${2} ${3}


so that you get customised CFLAGS for the gcc41 emerged packages.

Rob.
_________________
---

Gentoo Phenom][ X4 955 on AMD790 + Geforce 220GT 8GB/1.75TB (Desktop)
+ MythTV (3xFreeview,1xFreesat HD) on 1080p
Gentoo Turion64 X2 Geforce 6150 2GB/120GB (Laptop)
Back to top
View user's profile Send private message
m0p
Apprentice
Apprentice


Joined: 20 Jun 2005
Posts: 205
Location: en_GB

PostPosted: Tue Jul 19, 2005 7:36 pm    Post subject: Reply with quote

Wait, I know what broke Firefox. My CFLAGS were set as -O2! afaik, anything above -O1 is broken in 4.1 right?
Back to top
View user's profile Send private message
Tiger683
Veteran
Veteran


Joined: 08 Jan 2005
Posts: 1347
Location: Heffner's House

PostPosted: Tue Jul 19, 2005 7:56 pm    Post subject: Reply with quote

luisfelipe wrote:
Is there a way of having different CFLAGS for different packages ??
I mean, when portage is going to compile gcc-4.1, I want it to use a special CFLAGS.
Is there a way, or do I have to keep changing it by hand everytime.


gcc ebuilds filter all custom cflags afaik.

forcing the usage of such is also a __REALLY__BAD__IDEA___
_________________
Retired gentoo user
Back to top
View user's profile Send private message
whitesouls
Guru
Guru


Joined: 19 Nov 2004
Posts: 358
Location: In Front of My Laptop

PostPosted: Tue Jul 19, 2005 8:05 pm    Post subject: Reply with quote

luisfelipe wrote:
Is there a way of having different CFLAGS for different packages ??
I mean, when portage is going to compile gcc-4.1, I want it to use a special CFLAGS.
Is there a way, or do I have to keep changing it by hand everytime.


I think this guy is asking about /etc/portage/package.cflags where you can set which package compiled using which cflags

Sorry if i'm wrong.
_________________
whitesouls

Please insert the [SOLVED] tag if your problem is solved in your respective thread.
Back to top
View user's profile Send private message
pgrdsl
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2002
Posts: 93
Location: Southampton, UK

PostPosted: Fri Jul 22, 2005 5:17 pm    Post subject: Reply with quote

Tiger683 wrote:
gcc ebuilds filter all custom cflags afaik.


Indeed. Not everything, just some select ones...

I have so far completely failed to stop the ebuild using -O2 and use -O1 regardless of command line CFLAGS, or whatever is set in make.conf (actually, having just read the eclass I now know why).
It is all because of this (in eclasses/toolchain.eclass):
Code:
gcc_do_filter_flags() {
        strip-flags

        # In general gcc does not like optimization, and add -O2 where
        # it is safe.  This is especially true for gcc 3.3 + 3.4
        replace-flags -O? -O2

So, -O1gets replaced by -O2. Which is really helpful...
If I'd been thinking, I might have used -O in the first place :roll: ...
_________________
pihl
Back to top
View user's profile Send private message
Martin.Jansa
n00b
n00b


Joined: 09 Mar 2004
Posts: 55
Location: Prague

PostPosted: Wed Jul 27, 2005 4:08 pm    Post subject: Reply with quote

Hi,

I cannot emerge gcc newer then 4.1.0-beta20050625, everytime I try to emerge newer snapshot or cvs from fluidportage I get weird errors about profile like:

Code:

/var/tmp/portage/gcc-4.1.0_beta20050723/work/gcc-4.1-20050723/gcc/tree-ssa-operands.c:616: error: corrupted profile info: number of executions for edge 50-51 thought to be -3882


I have tried to compile with gcc profiles (3.4.4, 4.0.1 and 4.1.0-beta20050625) and without any [CL]FLAGS, but still no success. I know its experimental release but maybe its a bug worth to be reported.
Back to top
View user's profile Send private message
ericxx2005
Apprentice
Apprentice


Joined: 05 Apr 2005
Posts: 231
Location: 10 square miles surrounded by reality

PostPosted: Wed Jul 27, 2005 7:25 pm    Post subject: Reply with quote

Quote:
/var/tmp/portage/gcc-4.1.0_beta20050723/work/gcc-4.1-20050723/gcc/tree-ssa-operands.c:616: error: corrupted profile info: number of executions for edge 50-51 thought to be -3882




I'm about here right now. I'm going to wait until I get out of work and see if I can get around it somehow. Is the error from gcc itself, or from binutils, glibc, etc.?
Back to top
View user's profile Send private message
ericxx2005
Apprentice
Apprentice


Joined: 05 Apr 2005
Posts: 231
Location: 10 square miles surrounded by reality

PostPosted: Thu Jul 28, 2005 1:43 am    Post subject: Reply with quote

I had sucess with -O1 and without -pipe, -O3 didn't work. I'm doing an emerge -e system now (5 of 107).
Back to top
View user's profile Send private message
Martin.Jansa
n00b
n00b


Joined: 09 Mar 2004
Posts: 55
Location: Prague

PostPosted: Thu Jul 28, 2005 9:57 am    Post subject: Reply with quote

ericxx2005 wrote:
I had sucess with -O1 and without -pipe, -O3 didn't work. I'm doing an emerge -e system now (5 of 107).


CFLAGS="march=i686 -O1" and still no success ;-(

What USE flags have you used?

I'm using:

Code:
sys-devel/gcc-4.1.0_beta20050723 [4.1.0_beta20050625] (-altivec) -bootstrap -build -fortran +gcj +gtk -hardened -ip28 (-multilib) -multislot (-n32) (-n64) +nls -nocxx -objc -static
Back to top
View user's profile Send private message
ericxx2005
Apprentice
Apprentice


Joined: 05 Apr 2005
Posts: 231
Location: 10 square miles surrounded by reality

PostPosted: Thu Jul 28, 2005 4:45 pm    Post subject: Reply with quote

I had it set with no -O flag, my bad.

My use flags:

Code:
-arts -cups -debug -kde -gnome -sdk apic mtrr mmx mmxext sse 3dnow 3dnowext nptl opengl X gtk2 gtk qt imlib2 alsa oss dvd dvdr cdr


Hope that helps.
Back to top
View user's profile Send private message
Martin.Jansa
n00b
n00b


Joined: 09 Mar 2004
Posts: 55
Location: Prague

PostPosted: Fri Jul 29, 2005 10:47 am    Post subject: Reply with quote

ericxx2005 wrote:
I had it set with no -O flag, my bad.


Still not working, maybe the problem is with really used CFLAGS during emerge.

If I have CFLAGS="-O1" or no -O flag in /etc/make.conf, xgcc is still using -O2.

I have looked to /usr/portage/eclass/gcc.eclass, but nothing interesting found. Maybe I should look better today.
Back to top
View user's profile Send private message
SimedonMyrrho
n00b
n00b


Joined: 15 Jul 2005
Posts: 23

PostPosted: Fri Jul 29, 2005 1:11 pm    Post subject: Reply with quote

Quote:
Still not working, maybe the problem is with really used CFLAGS during emerge.

If I have CFLAGS="-O1" or no -O flag in /etc/make.conf, xgcc is still using -O2.


See above

Quote:
gcc_do_filter_flags() {
strip-flags

# In general gcc does not like optimization, and add -O 2where
# it is safe. This is especially true for gcc3 . 3+3 .4
replace-flags -O? -O2


Maybe you should edit toolchain.eclass in your overlay, and add line(s) that say
Code:
 replace flags -O3 -O2
replace flags -Os -O2

or whatever suits you.

I also had the problem wit gcc-4.1, the latest snapshot also compiled only with -O0, and it would even compile itself later only with -O0. -pipe had no effect.

Using this compiler worked fine so far, i only compiled kmplayer-0.9.0a, and had only minor issues with it.
Back to top
View user's profile Send private message
Martin.Jansa
n00b
n00b


Joined: 09 Mar 2004
Posts: 55
Location: Prague

PostPosted: Fri Jul 29, 2005 8:15 pm    Post subject: Reply with quote

SimedonMyrrho wrote:

gcc_do_filter_flags() {
strip-flags

# In general gcc does not like optimization, and add -O 2where
# it is safe. This is especially true for gcc3 . 3+3 .4
replace-flags -O? -O2


That's it. Now it's done and I can sleep more peacefully. ;-)

Thanks to both.
Back to top
View user's profile Send private message
Martin.Jansa
n00b
n00b


Joined: 09 Mar 2004
Posts: 55
Location: Prague

PostPosted: Tue Aug 02, 2005 8:35 pm    Post subject: Reply with quote

And now, newer snapshot 4.1.0-beta20050730 emerged sucessfully even with -O2 in CFLAGS and standart toolchain.
8O
Back to top
View user's profile Send private message
SimedonMyrrho
n00b
n00b


Joined: 15 Jul 2005
Posts: 23

PostPosted: Thu Aug 04, 2005 1:30 pm    Post subject: Reply with quote

Quote:
And now, newer snapshot 4.1.0-beta20050730 emerged sucessfully even with -O2 in CFLAGS and standart toolchain.


This snapshot leaves a good impression with me, too. With it i compiled qt, kdelibs-3.4.2 and several kdebase-meta packages, and do not have issues with them. At first KDE had some problems with window sizing (negative values), but not anymore.

amarok 1.3_beta3 had also a major issue with the size of it's windows, making the playlist unusable. But now it is solved, however.
Back to top
View user's profile Send private message
nxsty
Veteran
Veteran


Joined: 23 Jun 2004
Posts: 1556
Location: .se

PostPosted: Mon Sep 05, 2005 11:53 am    Post subject: Reply with quote

Has anyone been able to compile the recent snapshots on amd64? For me it always fails with a ice. I can post the error later if anyone wants.

EDIT:
It's profiledbootstrap that makes it crash. Using bootstrap-lean instead works, even with -O2.
Back to top
View user's profile Send private message
nxsty
Veteran
Veteran


Joined: 23 Jun 2004
Posts: 1556
Location: .se

PostPosted: Mon Sep 05, 2005 2:45 pm    Post subject: Reply with quote

nxsty wrote:
Has anyone been able to compile the recent snapshots on amd64? For me it always fails with a ice. I can post the error later if anyone wants.

EDIT:
It's profiledbootstrap that makes it crash. Using bootstrap-lean instead works, even with -O2.


But it wont run. :( It always fail with "cannot find -lgcc_s":

configure:2400: gcc -O2 conftest.c >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
Back to top
View user's profile Send private message
thersites
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2004
Posts: 101
Location: South West China

PostPosted: Fri Sep 09, 2005 4:07 am    Post subject: Reply with quote

I've been using

Code:
CFLAGS/CXXFLAGS="-march=i686 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -pipe"


and after a complete successful emerge -e world with gcc-4.1.0-200509006, I decided to try

Code:
 -march=i686 -O1 -pipe


emerge -e gcc got as far as gcc, and then ICE!
Also the compile times were a lot slower. Any ideas on which of the extre flags that -O1 turns on might be the guilty party?

Code:
-fdefer-pop
-fdelayed-branch
-fguess-branch-probabilty
-fcrop-registers
-floop-conversion
-floop-conversion2
-fmerge-constants
-fomit-frame-pointers


This is on x86 with a Pentium 3-M
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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