Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 25614 - Compiling with GCC 3.x XFree breaks module support
Summary: Compiling with GCC 3.x XFree breaks module support
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-31 00:39 UTC by Pete
Modified: 2003-07-31 15:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pete 2003-07-31 00:39:37 UTC
As stated in the ebuild, unfortunately it only enables the compile flag to fix
if gcc-version is 3.1....now 3.2 is in stable, and I'm assuming it was a prob in
3.0 and will be in 3.3, so xfree-4.3.0-r3.ebuild should be modified as follows:

--- xfree-4.3.0-r3.ebuild.dist  2003-07-31 18:32:49.000000000 +1000
+++ xfree-4.3.0-r3.ebuild       2003-08-01 03:38:54.000000000 +1000
@@ -322,11 +322,7 @@
                replace-flags "-march=athlon-tbird" "-march=athlon"
 
                # Without this, modules breaks with gcc3
-               if [ "`gcc-version`" = "3.1" ]
-               then
-                       append-flags "-fno-merge-constants"
-                       append-flags "-fno-merge-constants"
-               fi
+                       append-flags "-fno-merge-constants"
        fi
 
        if [ "`uname -r | cut -d. -f1,2`" != "2.2" ]
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2003-07-31 00:52:56 UTC
Should probably still do a check for gcc-version = 3 since I'm guessing gcc 2.95 was the main difference.
Comment 2 Pete 2003-07-31 01:36:26 UTC
Well, yes - gcc-version >= 3, but since the whole code-block is:

---------------------------------------------------------------------- 
        if [ "`gcc-version`" != "2.95" ]
        then
                # Should fix bug #4189.  gcc-3.x have problems with -march=pentium4
                # and -march=athlon-tbird
                replace-flags "-march=pentium4" "-march=pentium3"
                replace-flags "-march=athlon-tbird" "-march=athlon"

                # Without this, modules breaks with gcc3
                if [ "`gcc-version`" = "3.1" ]
                then
                        append-flags "-fno-merge-constants"
                        append-flags "-fno-merge-constants"
                fi
        fi
---------------------------------------------------------------------- 

And the replace-flags "-march... are specific to gcc 3 then either the whole block should really be determined by gcc-version >= 3 or the gcc-version = 3.1 should be removed...I went for the latter since it shouldn't hurt anything.... the former is probably more apt though
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2003-07-31 13:51:13 UTC
No, it was only an issue with 3.1.  As for the other issue - it should only
really work with -march=pentium4 from 3.2.2 (maybe), definately 3.2.3 if
I remember correctly - seperate issue though, file a new bug.

Comment 4 Pete 2003-07-31 15:50:03 UTC
I really beg to differ - I just built a new box up from scratch, so gcc 3.2.3-r2 was in before xfree was compiled...spent 2 days trying to work out why my nvidia module wasn't being detected by X, then found the -fno-merge-constants in the ebuild, recompiled with that and it works like a charm now...