Rework gcc-version-dependent things to remove redundant calls to gcc-*-version()...
authorDonnie Berkholz <dberkholz@gentoo.org>
Thu, 4 Nov 2004 02:48:06 +0000 (02:48 +0000)
committerDonnie Berkholz <dberkholz@gentoo.org>
Thu, 4 Nov 2004 02:48:06 +0000 (02:48 +0000)
x11-base/xorg-x11/ChangeLog
x11-base/xorg-x11/Manifest
x11-base/xorg-x11/xorg-x11-6.8.0-r2.ebuild

index a67fc36aa277f5ee33d08dcc7a7a56815cdec43d..6c905f1f11c5479230d7bc190f2f8911b910a58e 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for x11-base/xorg-x11
 # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/ChangeLog,v 1.195 2004/11/03 20:40:08 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/ChangeLog,v 1.196 2004/11/04 02:48:06 spyderous Exp $
+
+  03 Nov 2004; Donnie Berkholz <spyderous@gentoo.org>;
+  xorg-x11-6.8.0-r2.ebuild:
+  Rework gcc-version-dependent things to remove redundant calls to
+  gcc-*-version(). Also, only strip -Os for <gcc-3.2.2 (#12775).
 
   03 Nov 2004; Donnie Berkholz <spyderous@gentoo.org>;
   xorg-x11-6.8.0-r2.ebuild:
index 51eb75579904509a2a0faad4dbcea69914a48f46..b7561180046b67f56b1805131081b8edce473c1c 100644 (file)
@@ -1,8 +1,8 @@
 MD5 ac1137a20503dcb8f9ba2939a2a766f6 metadata.xml 230
 MD5 9215e5f10589329a5056f366aa6820e8 xorg-x11-6.7.0-r2.ebuild 38086
 MD5 a2e1b9169dec8e5eb20d49694b6bbcf0 xorg-x11-6.8.0-r1.ebuild 41338
-MD5 f9425399096041c006b98a58bd455e4f ChangeLog 42650
-MD5 8a8aa9c68bf21de5a4328f76257dbdb1 xorg-x11-6.8.0-r2.ebuild 46931
+MD5 cfbcd6989b2c48012dbee6da4f81a279 ChangeLog 42866
+MD5 c365097e277a484ad639dd8b8d5dd249 xorg-x11-6.8.0-r2.ebuild 47315
 MD5 a3314fbdc270d7d84ea14fd477b8d048 files/digest-xorg-x11-6.7.0-r2 904
 MD5 70facbdb85b7ef2bc9b9b702442eda7e files/digest-xorg-x11-6.8.0-r1 908
 MD5 b7a56cbcde55a013564f056f87e59867 files/digest-xorg-x11-6.8.0-r2 908
index 3484f12b86ea88df97fe7198287133f4f8c84af6..111632a2c93083824f7fcd6ac2ef739716be0972 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/xorg-x11-6.8.0-r2.ebuild,v 1.49 2004/11/03 20:40:08 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-x11/xorg-x11-6.8.0-r2.ebuild,v 1.50 2004/11/04 02:48:06 spyderous Exp $
 
 # Set TDFX_RISKY to "yes" to get 16-bit, 1024x768 or higher on low-memory
 # voodoo3 cards.
@@ -144,7 +144,7 @@ cflag_setup() {
        # Set up CFLAGS
        filter-flags "-funroll-loops"
 
-       ALLOWED_FLAGS="-fstack-protector -march -mcpu -O -O1 -O2 -O3 -pipe -fomit-frame-pointer -g -gstabs+ -gstabs -ggdb"
+       ALLOWED_FLAGS="-fstack-protector -march -mcpu -O -O1 -O2 -O3 -Os -pipe -fomit-frame-pointer -g -gstabs+ -gstabs -ggdb"
        # arch-specific section added by popular demand
        case "${ARCH}" in
                mips)   ALLOWED_FLAGS="${ALLOWED_FLAGS} -mtune -mips1 -mips2 -mips3 -mips4 -mabi"
@@ -311,34 +311,47 @@ host_def_setup() {
                # Set location of DRM source to be installed
                echo "#define InstSrcDir ${ROOT}/usr/src/${PF}" >> ${HOSTCONF}
 
-               # Bug #12775 .. fails with -Os.
-               replace-flags "-Os" "-O2"
-
-               if [ "$(gcc-version)" != "2.95" ]; then
-                       # Should fix bug #4189.  gcc 3.x have problems with -march=pentium4
-                       # and -march=athlon-tbird
-                       # Seems fixed on 3.3 and higher
-
-                       if [ "$(gcc-major-version)" -eq "3" -a "$(gcc-minor-version)" -le "2" ]; then
-                               replace-cpu-flags pentium4 pentium3
-                               replace-cpu-flags athlon athlon-tbird
-                       fi
-
-                       #to fix #56702 for now, thanks Spanky
-                       [ "$(gcc-version)" == "3.4" ] && use x86 && test_flag -mno-sse2 \
-                               && append-flags -mno-sse2
+               if [ "$(gcc-major-version)" -eq "3" ]; then
+                       if use x86; then
+                               # Should fix bug #4189.  gcc 3.x have problems with
+                               # -march=pentium4 and -march=athlon-tbird
+                               # Seems fixed on 3.3 and higher
+                               if [ "$(gcc-minor-version)" -le "2" ]; then
+                                       replace-cpu-flags pentium4 pentium3
+                                       replace-cpu-flags athlon athlon-tbird
+                               fi
 
+                               #to fix #56702 for now, thanks Spanky
+                               if [ "$(gcc-minor-version)" -eq "4" ]; then
+                                       if test_flag -mno-sse2; then
+                                               append-flags -mno-sse2
+                                       fi
+                               fi
 
-                       # Try a fix for #49310, see #50931 for more info. <spyderous>
-                       if [ "$(is-flag -fomit-frame-pointer)" ]; then
-                               replace-cpu-flags k6 k6-2 k6-3 i586
+                               # Try a fix for #49310, see #50931 for more info. <spyderous>
+                               if [ "$(is-flag -fomit-frame-pointer)" ]; then
+                                       replace-cpu-flags k6 k6-2 k6-3 i586
+                               fi
                        fi
 
                        # Without this, modules breaks with gcc3
-                       if [ "$(gcc-version)" = "3.1" ]; then
+                       if [ "$(gcc-minor-version)" -eq "1" ]; then
                                append-flags "-fno-merge-constants"
                                append-flags "-fno-merge-constants"
                        fi
+
+                       if [ "$(gcc-minor-version)" -eq "2" ]; then
+                               if [ "$(gcc-micro-version)" -lt "2" ]; then
+                                       # Bug #12775 .. fails with -Os.
+                                       replace-flags "-Os" "-O2"
+                               fi
+                       elif [ "$(gcc-minor-version)" -lt "2" ]; then
+                               # Bug #12775 .. fails with -Os.
+                               replace-flags "-Os" "-O2"
+                       fi
+               elif [ "$(gcc-major-version)" -lt "3" ]; then
+                       # Bug #12775 .. fails with -Os.
+                       replace-flags "-Os" "-O2"
                fi
 
                if ( [ -e "${ROOT}/usr/src/linux" ] \