summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Tilley <lv@gentoo.org>2004-11-21 16:58:56 +0000
committerTravis Tilley <lv@gentoo.org>2004-11-21 16:58:56 +0000
commitd43d165b7f2ecd6cb0a913cc4916027c10b74c43 (patch)
treee289deaeb23b086f121007d049a99fd00cc94449 /sys-devel
parentslotmove gcc 3.3* to have a slot of 3.3 (diff)
downloadhistorical-d43d165b7f2ecd6cb0a913cc4916027c10b74c43.tar.gz
historical-d43d165b7f2ecd6cb0a913cc4916027c10b74c43.tar.bz2
historical-d43d165b7f2ecd6cb0a913cc4916027c10b74c43.zip
removed unused versions and changed the SLOT for all gcc 3.3 ebuilds to be 3.3 instead of 3.2
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/gcc/ChangeLog11
-rw-r--r--sys-devel/gcc/Manifest38
-rw-r--r--sys-devel/gcc/files/digest-gcc-3.1.1-r22
-rw-r--r--sys-devel/gcc/files/digest-gcc-3.34
-rw-r--r--sys-devel/gcc/files/digest-gcc-3.3.1-r55
-rw-r--r--sys-devel/gcc/files/digest-gcc-3.3.2-r15
-rw-r--r--sys-devel/gcc/files/digest-gcc-3.3.2-r35
-rw-r--r--sys-devel/gcc/files/digest-gcc-3.3.2-r45
-rw-r--r--sys-devel/gcc/files/digest-gcc-3.3.35
-rw-r--r--sys-devel/gcc/files/digest-gcc-3.3.3-r57
-rw-r--r--sys-devel/gcc/gcc-3.1.1-r2.ebuild347
-rw-r--r--sys-devel/gcc/gcc-3.3.1-r5.ebuild625
-rw-r--r--sys-devel/gcc/gcc-3.3.2-r1.ebuild623
-rw-r--r--sys-devel/gcc/gcc-3.3.2-r2.ebuild8
-rw-r--r--sys-devel/gcc/gcc-3.3.2-r3.ebuild666
-rw-r--r--sys-devel/gcc/gcc-3.3.2-r4.ebuild678
-rw-r--r--sys-devel/gcc/gcc-3.3.2-r5.ebuild8
-rw-r--r--sys-devel/gcc/gcc-3.3.2-r7.ebuild8
-rw-r--r--sys-devel/gcc/gcc-3.3.2.ebuild8
-rw-r--r--sys-devel/gcc/gcc-3.3.3-r3.ebuild8
-rw-r--r--sys-devel/gcc/gcc-3.3.3-r5.ebuild815
-rw-r--r--sys-devel/gcc/gcc-3.3.3-r6.ebuild8
-rw-r--r--sys-devel/gcc/gcc-3.3.3.ebuild753
-rw-r--r--sys-devel/gcc/gcc-3.3.4-r1.ebuild8
-rw-r--r--sys-devel/gcc/gcc-3.3.4-r2.ebuild8
-rw-r--r--sys-devel/gcc/gcc-3.3.ebuild596
26 files changed, 45 insertions, 5209 deletions
diff --git a/sys-devel/gcc/ChangeLog b/sys-devel/gcc/ChangeLog
index c1050f0d1ac7..328e8d6ba932 100644
--- a/sys-devel/gcc/ChangeLog
+++ b/sys-devel/gcc/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sys-devel/gcc
# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.353 2004/11/21 16:32:47 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.354 2004/11/21 16:58:56 lv Exp $
+
+ 21 Nov 2004; Travis Tilley <lv@gentoo.org> -gcc-3.1.1-r2.ebuild,
+ -gcc-3.3.1-r5.ebuild, -gcc-3.3.2-r1.ebuild, gcc-3.3.2-r2.ebuild,
+ -gcc-3.3.2-r3.ebuild, -gcc-3.3.2-r4.ebuild, gcc-3.3.2-r5.ebuild,
+ gcc-3.3.2-r7.ebuild, gcc-3.3.2.ebuild, gcc-3.3.3-r3.ebuild,
+ -gcc-3.3.3-r5.ebuild, gcc-3.3.3-r6.ebuild, -gcc-3.3.3.ebuild,
+ gcc-3.3.4-r1.ebuild, gcc-3.3.4-r2.ebuild, -gcc-3.3.ebuild:
+ removed unused versions and changed the SLOT for all gcc 3.3 ebuilds to be
+ 3.3 instead of 3.2
21 Nov 2004; Travis Tilley <lv@gentoo.org> gcc-3.3.5.ebuild:
updated manpages and pie patches
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 3151da169d26..551a9b5c2025 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -1,44 +1,28 @@
-MD5 ccc8851dd7b9f96078c1aff96b79c1d7 gcc-3.3.2-r2.ebuild 18038
-MD5 02e3a0ef8706e5d2500d966d3affa550 gcc-3.3.2-r3.ebuild 20412
-MD5 582859af3130351807d9b7bd06e8e3ab gcc-3.3.2-r4.ebuild 20663
-MD5 57908f5553a649a65e751f518ce4bcf5 gcc-3.3.2.ebuild 16872
-MD5 7196ef2e21bcde2f5c7de114cfa5dfc2 gcc-3.3.3-r3.ebuild 23582
-MD5 840f9c25e867afe238633c890f8ad71a gcc-3.3.3-r5.ebuild 24366
-MD5 6d3c667669a40fff1625e7517d7e889b gcc-3.3.ebuild 16623
-MD5 849d93a55dc7e809cf4e3e04b8444d95 gcc-3.4.1-r3.ebuild 31292
-MD5 9451c01d4755a9f08026d9377a34eb38 gcc-3.4.2-r2.ebuild 13507
-MD5 5cb78bf6e391c11868861bd44cc36123 ChangeLog 73588
+MD5 872c3e4633f5a8414f8e2c004fa3b374 gcc-3.3.3-r3.ebuild 23468
+MD5 6aa2c523e9534517a28400c1aa55358e gcc-3.3.3-r6.ebuild 24858
+MD5 9b8536edd1111148d5a8ac9c3ab02288 gcc-3.3.4-r1.ebuild 24749
+MD5 b52666d9d366f9dd02c00cdedb65b281 gcc-3.3.4-r2.ebuild 24553
MD5 88e3f17c34499c5c82dfbbe04ed7a6fb gcc-3.4.3.ebuild 13586
+MD5 483487724c94691b62abeb1a32023e9e gcc-3.3.2.ebuild 16758
+MD5 a48f0b2b1ee2697060cb2cd31a0e963d gcc-3.3.2-r5.ebuild 21248
+MD5 2e15fb1ef6dc858d2c0d8e8ea3a5dfeb gcc-3.3.2-r7.ebuild 21653
MD5 4bcf46d8a3f5509cf09f23017408095d gcc-2.95.3-r8.ebuild 8407
-MD5 9d2f881e949534e2585b5b1e32b8edf9 gcc-3.1.1-r2.ebuild 9274
MD5 9f2b75a5738fb492bdd6a50db9b1c8a0 gcc-3.2.3-r4.ebuild 19754
-MD5 2b1318c3b19e09d2058a116a4d388c05 gcc-3.3.1-r5.ebuild 17790
-MD5 86de4539e7759ec983a62d25f4a5fde2 gcc-3.3.2-r1.ebuild 17884
-MD5 88b21c03e4ebacabcd50654779d5d80f gcc-3.3.2-r5.ebuild 21362
-MD5 bb25db362249d8150777b7209e7e416e gcc-3.3.2-r7.ebuild 21767
-MD5 27d17b57206385ba96c3c319960ebfc4 gcc-3.3.3-r6.ebuild 24972
-MD5 66089d59b528c2f119a3b525b68ecbc7 gcc-3.3.3.ebuild 22304
-MD5 638023a605f75bd0b58558ea92d8cff9 gcc-3.3.4-r1.ebuild 24863
-MD5 1011668da4153e33c8e69808381d96f4 gcc-3.3.4-r2.ebuild 24671
MD5 567094e03359ffc1c95af7356395228d metadata.xml 162
MD5 17b7e1a8fab3272beea644dacdb55b3e gcc-3.3.5.ebuild 11496
+MD5 849d93a55dc7e809cf4e3e04b8444d95 gcc-3.4.1-r3.ebuild 31292
+MD5 9451c01d4755a9f08026d9377a34eb38 gcc-3.4.2-r2.ebuild 13507
+MD5 287ae167b138e6c7acbdbae60ac8bf7a gcc-3.3.2-r2.ebuild 17924
+MD5 25f23074a92fbb78410eac59a3ef412b ChangeLog 74075
MD5 f7e7042c2ddf66e344b30cbc66ebaf73 files/cc 24
MD5 80d122265d3062847a4a1b161abe1d26 files/cpp 24
MD5 3213bd50acdbbd71ce7dd3e40710e30e files/digest-gcc-2.95.3-r8 64
-MD5 0d683280daf95e6bb9712549352a200c files/digest-gcc-3.1.1-r2 140
MD5 40e6872c09149a81973f01a78c80bbb7 files/digest-gcc-3.2.3-r4 279
-MD5 f57a9900e4d0edcae7b1e327e263d2f7 files/digest-gcc-3.3 294
-MD5 d192284727acd002cf658d4c559c2d39 files/digest-gcc-3.3.1-r5 361
MD5 cf81ae4b2da79c34a005da1182c40134 files/digest-gcc-3.3.2 130
-MD5 0d86971219ddd6dcb86f032bc2b93691 files/digest-gcc-3.3.2-r1 361
MD5 f48105f24e5c714530e66a94aa56d615 files/digest-gcc-3.3.2-r2 361
-MD5 f48105f24e5c714530e66a94aa56d615 files/digest-gcc-3.3.2-r3 361
-MD5 29b68fb9b347114baf405bf67ebca0cd files/digest-gcc-3.3.2-r4 361
MD5 01c41c9e6857eb40d402f2acb2bd96f9 files/digest-gcc-3.3.2-r5 361
MD5 e58b6c1f3122b79a5d0d273acc3c008c files/digest-gcc-3.3.2-r7 361
-MD5 35f63854b7b4d5ab1ed1489e517f8e24 files/digest-gcc-3.3.3 361
MD5 5a9db19cd5ad6ad16b0f838d525d842a files/digest-gcc-3.3.3-r3 522
-MD5 3a68d40d170427ffbfcf181b5099d693 files/digest-gcc-3.3.3-r5 528
MD5 3fd5a29d44b89f4fb220fccaa968fc05 files/digest-gcc-3.3.3-r6 442
MD5 6df16eb92245a931ecfc4cbcc73c84cf files/digest-gcc-3.3.4-r1 442
MD5 6df16eb92245a931ecfc4cbcc73c84cf files/digest-gcc-3.3.4-r2 442
diff --git a/sys-devel/gcc/files/digest-gcc-3.1.1-r2 b/sys-devel/gcc/files/digest-gcc-3.1.1-r2
deleted file mode 100644
index 4306377f63b0..000000000000
--- a/sys-devel/gcc/files/digest-gcc-3.1.1-r2
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 7269d2f24ab9188652ac17cd9545f511 gcc-3.1.1.tar.bz2 20515451
-MD5 0ff638960d988a20c1168f910059f961 gcc-3.1.1_final-patches-1.0.tbz2 29791
diff --git a/sys-devel/gcc/files/digest-gcc-3.3 b/sys-devel/gcc/files/digest-gcc-3.3
deleted file mode 100644
index 02e12d7e21fc..000000000000
--- a/sys-devel/gcc/files/digest-gcc-3.3
+++ /dev/null
@@ -1,4 +0,0 @@
-MD5 39147717455d8dba4d43d1b058ea46e2 gcc-3.3.tar.bz2 23447616
-MD5 ad23b671345a197cca3d4685e3a97d17 gcc-3.3-patches-1.1.tar.bz2 39336
-MD5 f838ebcbd0b599c0a0e8a6b6770bba75 gcc-3.3-athlon-hammer-branch-20030515.patch.bz2 227731
-MD5 d9ffc20ae7c26008b7f66fdcdce07f0f gcc-3.3-manpages.tar.bz2 136727
diff --git a/sys-devel/gcc/files/digest-gcc-3.3.1-r5 b/sys-devel/gcc/files/digest-gcc-3.3.1-r5
deleted file mode 100644
index 73ebe3a5258e..000000000000
--- a/sys-devel/gcc/files/digest-gcc-3.3.1-r5
+++ /dev/null
@@ -1,5 +0,0 @@
-MD5 1135a104e9fa36fdf7c663598fab5c40 gcc-3.3.1.tar.bz2 23544362
-MD5 6e9b3d7771758ea7591f4702eb3af9dd gcc-3.3.1-patches-1.5.tar.bz2 25784
-MD5 652d8e3d8ecec61699ce91c77d85deac gcc-3.3.1-branch-update-20030927.patch.bz2 232081
-MD5 539c7d69b7be10a3f36bebced52e918a protector-3.3-4.tar.gz 24768
-MD5 d8fc7feef6e2217dc640822c7283c6f4 gcc-3.3.1-manpages.tar.bz2 136818
diff --git a/sys-devel/gcc/files/digest-gcc-3.3.2-r1 b/sys-devel/gcc/files/digest-gcc-3.3.2-r1
deleted file mode 100644
index fb53bd37eb3b..000000000000
--- a/sys-devel/gcc/files/digest-gcc-3.3.2-r1
+++ /dev/null
@@ -1,5 +0,0 @@
-MD5 65999f654102f5438ac8562d13a6eced gcc-3.3.2.tar.bz2 23585904
-MD5 4b757459fb3d0e69031a86de80320ad9 gcc-3.3.2-patches-1.0.tar.bz2 23675
-MD5 0a2f4bfe7858f064eead2663804db6bf gcc-3.3.2-branch-update-20031022.patch.bz2 152228
-MD5 539c7d69b7be10a3f36bebced52e918a protector-3.3-4.tar.gz 24768
-MD5 cfaa61a61372f486160cdba32081fb3e gcc-3.3.2-manpages.tar.bz2 137196
diff --git a/sys-devel/gcc/files/digest-gcc-3.3.2-r3 b/sys-devel/gcc/files/digest-gcc-3.3.2-r3
deleted file mode 100644
index 97e44ed2bd42..000000000000
--- a/sys-devel/gcc/files/digest-gcc-3.3.2-r3
+++ /dev/null
@@ -1,5 +0,0 @@
-MD5 65999f654102f5438ac8562d13a6eced gcc-3.3.2.tar.bz2 23585904
-MD5 4b757459fb3d0e69031a86de80320ad9 gcc-3.3.2-patches-1.0.tar.bz2 23675
-MD5 0a2f4bfe7858f064eead2663804db6bf gcc-3.3.2-branch-update-20031022.patch.bz2 152228
-MD5 55a77f8e961808836753c7280490b110 protector-3.3-5.tar.gz 24794
-MD5 cfaa61a61372f486160cdba32081fb3e gcc-3.3.2-manpages.tar.bz2 137196
diff --git a/sys-devel/gcc/files/digest-gcc-3.3.2-r4 b/sys-devel/gcc/files/digest-gcc-3.3.2-r4
deleted file mode 100644
index f4ec19151a0c..000000000000
--- a/sys-devel/gcc/files/digest-gcc-3.3.2-r4
+++ /dev/null
@@ -1,5 +0,0 @@
-MD5 65999f654102f5438ac8562d13a6eced gcc-3.3.2.tar.bz2 23585904
-MD5 4b757459fb3d0e69031a86de80320ad9 gcc-3.3.2-patches-1.0.tar.bz2 23675
-MD5 c6e874156df8be519c3759159e98b9a7 gcc-3.3.2-branch-update-20031201.patch.bz2 358336
-MD5 55a77f8e961808836753c7280490b110 protector-3.3-5.tar.gz 24794
-MD5 cfaa61a61372f486160cdba32081fb3e gcc-3.3.2-manpages.tar.bz2 137196
diff --git a/sys-devel/gcc/files/digest-gcc-3.3.3 b/sys-devel/gcc/files/digest-gcc-3.3.3
deleted file mode 100644
index f1e8cc27cb79..000000000000
--- a/sys-devel/gcc/files/digest-gcc-3.3.3
+++ /dev/null
@@ -1,5 +0,0 @@
-MD5 3c6cfd9fcd180481063b4058cf6faff2 gcc-3.3.3.tar.bz2 23279245
-MD5 4b757459fb3d0e69031a86de80320ad9 gcc-3.3.3-patches-1.0.tar.bz2 23675
-MD5 c6f0f4baae3ef904ba8886d7ef99938d gcc-3.3.3-branch-update-20040217.patch.bz2 150987
-MD5 b62b5856753294821c4cea8bd28ffe1d protector-3.3-7.tar.gz 25068
-MD5 7bfc29747dfc5fa614b5ac366bf38224 gcc-3.3.3-manpages.tar.bz2 137822
diff --git a/sys-devel/gcc/files/digest-gcc-3.3.3-r5 b/sys-devel/gcc/files/digest-gcc-3.3.3-r5
deleted file mode 100644
index aa5484ef68cb..000000000000
--- a/sys-devel/gcc/files/digest-gcc-3.3.3-r5
+++ /dev/null
@@ -1,7 +0,0 @@
-MD5 3c6cfd9fcd180481063b4058cf6faff2 gcc-3.3.3.tar.bz2 23279245
-MD5 a5e5f8c88d29e2af3ed0ff52623e28d9 gcc-3.3.3-patches-1.3.tar.bz2 77276
-MD5 2d2cb065ecd3aa0acf4aabc646068723 gcc-3.3.3-branch-update-20040412.patch.bz2 224699
-MD5 b62b5856753294821c4cea8bd28ffe1d protector-3.3-7.tar.gz 25068
-MD5 7bfc29747dfc5fa614b5ac366bf38224 gcc-3.3.3-manpages.tar.bz2 137822
-MD5 6663c78a27913b47e314d90ea720ffa8 gcc-3.3.3-piepatches-v8.7.5.3.tar.bz2 13935
-MD5 fd6ef77953886d6ff74410188faafbb7 gcc-3.3.3-v8.7.0-gcc-ssp-exclusion.patch.bz2 316
diff --git a/sys-devel/gcc/gcc-3.1.1-r2.ebuild b/sys-devel/gcc/gcc-3.1.1-r2.ebuild
deleted file mode 100644
index bac3acef100d..000000000000
--- a/sys-devel/gcc/gcc-3.1.1-r2.ebuild
+++ /dev/null
@@ -1,347 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.1.1-r2.ebuild,v 1.4 2004/07/02 09:32:03 eradicator Exp $
-
-# NOTE TO MAINTAINER: Info pages get nuked for multiple version installs.
-# Ill fix it later if i get a chance.
-#
-# IMPORTANT: The versions of libs installed should be updated
-# in src_install() ... Ill implement auto-version detection
-# later on.
-
-inherit flag-o-matic libtool eutils
-
-do_filter_flags() {
- # Compile problems with these ...
- filter-flags -fno-exceptions
-
- # In general gcc does not like optimization, and add -O2 where
- # it is safe.
- filter-flags -O?
-}
-
-MY_PV="`echo ${PV} | cut -d. -f1,2`"
-GCC_SUFFIX=-${MY_PV}
-LOC="/usr"
-# dont install in /usr/include/g++-v3/, as it will nuke gcc-3.0.x installs
-STDCXX_INCDIR="${LOC}/include/g++-v${MY_PV/\./}"
-
-DESCRIPTION="Modern GCC C/C++ compiler"
-HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
-SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/${P}/${P}.tar.bz2
- http://www.ibiblio.org/gentoo/distfiles/${P}_final-patches-1.0.tbz2"
-
-LICENSE="GPL-2 LGPL-2.1"
-SLOT="${MY_PV}"
-KEYWORDS="x86 sparc -ppc"
-IUSE="static nls bootstrap java build"
-
-DEPEND="virtual/libc
- !build? ( >=sys-libs/ncurses-5.2-r2
- nls? ( sys-devel/gettext ) )"
-RDEPEND="virtual/libc
- >=sys-libs/zlib-1.1.4
- >=sys-apps/texinfo-4.2-r4
- !build? ( >=sys-libs/ncurses-5.2-r2 )"
-
-build_multiple() {
- #try to make sure that we should build multiple
- #versions of gcc (dual install of gcc2 and gcc3)
- profile="`readlink /etc/make.profile`"
- # [ "`gcc -dumpversion | cut -d. -f1,2`" != "`echo ${PV} | cut -d. -f1,2`" ]
- #
- # Check the major and minor versions only, and drop the micro version.
- # This is done, as compadibility only differ when major and minor differ.
- if ! use build && ! use bootstrap && \
- [ "`gcc -dumpversion | cut -d. -f1,2`" != "${MY_PV}" ] && \
- [ "${profile/gcc3}" = "${profile}" ] && \
- [ "${GCCBUILD}" != "default" ]
- then
- return 0
- else
- return 1
- fi
-}
-
-# used to patch Makefiles to install into the build dir
-FAKE_ROOT=""
-
-src_unpack() {
- unpack ${P}.tar.bz2
-
- cd ${S}
- # Fixup libtool to correctly generate .la files with portage
- elibtoolize --portage --shallow
-
- mkdir -p ${WORKDIR}/patch
- tar -jxf ${DISTDIR}/${P}_final-patches-1.0.tbz2 -C ${WORKDIR}/patch \
- || die "Could not unpack patches"
- for f in ${WORKDIR}/patch/*.patch ; do
- epatch ${f}
- done
-
- # Currently if any path is changed via the configure script, it breaks
- # installing into ${D}. We should not patch it in src_install() with
- # absolute paths, as some modules then gets rebuild with the wrong
- # paths. Thus we use $FAKE_ROOT.
- cd ${S}
- for x in $(find . -name Makefile.in)
- do
-# cp ${x} ${x}.orig
- # Fix --datadir=
-# sed -e 's:datadir = @datadir@:datadir = $(FAKE_ROOT)@datadir@:' \
-# ${x}.orig > ${x}
- cp ${x} ${x}.orig
- # Fix --with-gxx-include-dir=
- sed -e 's:gxx_include_dir = @gxx_:gxx_include_dir = $(FAKE_ROOT)@gxx_:' \
- -e 's:glibcppinstalldir = @gxx_:glibcppinstalldir = $(FAKE_ROOT)@gxx_:' \
- ${x}.orig > ${x}
- rm -f ${x}.orig
- done
-}
-
-src_compile() {
- local myconf=""
- local gcc_lang=""
- if ! use build
- then
- myconf="${myconf} --enable-shared"
- gcc_lang="c,c++,f77,objc"
- else
- gcc_lang="c"
- fi
- if ! use nls || use build
- then
- myconf="${myconf} --disable-nls"
- else
- myconf="${myconf} --enable-nls --without-included-gettext"
- fi
- if use java && ! use build
- then
- gcc_lang="${gcc_lang},java"
- fi
-
- #only build with a program suffix if it is not our
- #default compiler. Also check $GCCBUILD until we got
- #compilers sorted out.
- #
- #NOTE: for software to detirmine gcc version, it will be easier
- # if we have gcc, gcc-3.0 and gcc-3.1, and NOT gcc-3.0.4.
- if build_multiple
- then
- myconf="${myconf} --program-suffix=${GCC_SUFFIX}"
- fi
-
- # Make sure we have sane CFLAGS
- do_filter_flags
-
- #build in a separate build tree
- mkdir -p ${WORKDIR}/build
- cd ${WORKDIR}/build
-
- addwrite "/dev/zero"
- ${S}/configure --prefix=${LOC} \
- --mandir=${LOC}/share/man \
- --infodir=${LOC}/share/info \
- --enable-shared \
- --host=${CHOST} \
- --build=${CHOST} \
- --target=${CHOST} \
- --with-system-zlib \
- --enable-languages=${gcc_lang} \
- --enable-threads=posix \
- --enable-long-long \
- --disable-checking \
- --enable-cstdio=stdio \
- --enable-clocale=generic \
- --enable-version-specific-runtime-libs \
- --with-gxx-include-dir=${STDCXX_INCDIR} \
- --with-local-prefix=${LOC}/local \
- ${myconf} || die
-
- touch ${S}/gcc/c-gperf.h
-
- if ! use static
- then
- #fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake bootstrap-lean || die
- else
- S="${WORKDIR}/build" \
- emake LDFLAGS=-static bootstrap || die
- fi
-}
-
-src_install() {
- #make install from the build directory
- cd ${WORKDIR}/build
- S="${WORKDIR}/build" \
- make prefix=${D}${LOC} \
- mandir=${D}${LOC}/share/man \
- infodir=${D}${LOC}/share/info \
- FAKE_ROOT=${D} \
- install || die
-
- if ! build_multiple
- then
- GCC_SUFFIX=""
- fi
-
- [ -e ${D}${LOC}/bin/gcc${GCC_SUFFIX} ] || die "gcc not found in ${D}"
-
- FULLPATH=${LOC}/lib/gcc-lib/${CHOST}/${PV}
- FULLPATH_D=${D}${LOC}/lib/gcc-lib/${CHOST}/${PV}
- cd ${FULLPATH_D}
- dodir /lib
- dodir /etc/env.d
- echo "LDPATH=${FULLPATH}" > ${D}/etc/env.d/05gcc${GCC_SUFFIX}
- echo "CC=\"gcc\"" >> ${D}/etc/env.d/05gcc${GCC_SUFFIX}
- echo "CXX=\"g++\"" >> ${D}/etc/env.d/05gcc${GCC_SUFFIX}
- if ! build_multiple
- then
- dosym /usr/bin/cpp /lib/cpp
- dosym gcc /usr/bin/cc
- fi
-
- # gcc-3.1 have a problem with the ordering of Search Directories. For
- # instance, if you have libreadline.so in /lib, and libreadline.a in
- # /usr/lib, then it will link with libreadline.a instead of .so. As far
- # as I can see from the source, /lib should be searched before /usr/lib,
- # and this also differs from gcc-2.95.3 and possibly 3.0.4, but ill have
- # to check on 3.0.4. Thanks to Daniel Robbins for noticing this oddity,
- # bugzilla bug #4411
- #
- # Azarah - 3 Jul 2002
- #
- cd ${FULLPATH_D}
- dosed -e "s:%{L\*} %(link_libgcc):%{L\*} -L/lib %(link_libgcc):" \
- ${FULLPATH}/specs
-
- #make sure we dont have stuff lying around that
- #can nuke multiple versions of gcc
- if ! use build
- then
- cd ${FULLPATH_D}
-
- #Tell libtool files where real libraries are
- for LA in ${D}${LOC}/lib/*.la ${FULLPATH_D}/../*.la
- do
- if [ -f ${LA} ]
- then
- sed -e "s:/usr/lib:${FULLPATH}:" ${LA} > ${LA}.hacked
- mv ${LA}.hacked ${LA}
- mv ${LA} ${FULLPATH_D}
- fi
- done
-
- #move all the libraries to version specific libdir.
- for x in ${D}${LOC}/lib/*.{so,a}* ${FULLPATH_D}/../*.{so,a}*
- do
- [ -f ${x} ] && mv -f ${x} ${FULLPATH_D}
- done
-
- #move Java headers to compiler-specific dir
- for x in ${D}${LOC}/include/gc*.h ${D}${LOC}/include/j*.h
- do
- [ -f ${x} ] && mv -f ${x} ${FULLPATH_D}/include/
- done
- for x in gcj gnu java javax org
- do
- if [ -d ${D}${LOC}/include/${x} ]
- then
- mkdir -p ${FULLPATH_D}/include/${x}
- mv -f ${D}${LOC}/include/${x}/* ${FULLPATH_D}/include/${x}/
- rm -rf ${D}${LOC}/include/${x}
- fi
- done
-
- #move libgcj.spec to compiler-specific directories
- [ -f ${D}${LOC}/lib/libgcj.spec ] && \
- mv -f ${D}${LOC}/lib/libgcj.spec ${FULLPATH_D}/libgcj.spec
-
- #rename jar because it could clash with Kaffe's jar if this gcc is
- #primary compiler (aka don't have the -<version> extension)
- cd ${D}${LOC}/bin
- [ -f jar${GCC_SUFFIX} ] && mv -f jar${GCC_SUFFIX} gcj-jar${GCC_SUFFIX}
-
- #move <cxxabi.h> to compiler-specific directories
- [ -f ${D}${STDCXX_INCDIR}/cxxabi.h ] && \
- mv -f ${D}${STDCXX_INCDIR}/cxxabi.h ${FULLPATH_D}/include/
-
- if build_multiple
- then
- #now fix the manpages
- cd ${D}${LOC}/share/man/man1
- mv cpp.1 cpp${GCC_SUFFIX}.1
- mv gcov.1 gcov${GCC_SUFFIX}.1
- fi
- fi
-
- #this one comes with binutils
- if [ -f ${D}${LOC}/lib/libiberty.a ]
- then
- rm -f ${D}${LOC}/lib/libiberty.a
- fi
-
- cd ${S}
- if ! use build
- then
- cd ${S}
- docinto /
- dodoc ChangeLog LAST_UPDATED README MAINTAINERS
- cd ${S}/boehm-gc
- docinto boehm-gc
- dodoc ChangeLog doc/{README*,barrett_diagram}
- docinto boehm-gc/html
- dohtml doc/*.html
- cd ${S}/gcc
- docinto gcc
- dodoc ChangeLog* FSFChangeLog* LANGUAGES NEWS ONEWS \
- README* SERVICE
- cd ${S}/libf2c
- docinto libf2c
- dodoc ChangeLog README TODO changes.netlib disclaimer.netlib \
- permission.netlib readme.netlib
- cd ${S}/libffi
- docinto libffi
- dodoc ChangeLog* README
- cd ${S}/libiberty
- docinto libiberty
- dodoc ChangeLog README
- cd ${S}/libobjc
- docinto libobjc
- dodoc ChangeLog README* THREADS*
- cd ${S}/libstdc++-v3
- docinto libstdc++-v3
- dodoc ChangeLog* README
-
- if use java
- then
- cd ${S}/fastjar
- docinto fastjar
- dodoc AUTHORS CHANGES ChangeLog NEWS README
- cd ${S}/libjava
- docinto libjava
- dodoc ChangeLog* HACKING NEWS README THANKS
- fi
- else
- rm -rf ${D}/usr/share/{man,info}
- fi
-
- # Fix ncurses b0rking
- find ${D}/ -name '*curses.h' -exec rm -f {} \;
-}
-
-pkg_postrm() {
- if [ ! -L ${ROOT}/lib/cpp ]
- then
- ln -sf /usr/bin/cpp ${ROOT}/lib/cpp
- fi
- if [ ! -L ${ROOT}/usr/bin/cc ]
- then
- ln -sf gcc ${ROOT}/usr/bin/cc
- fi
-
- # Fix ncurses b0rking (if r5 isn't unmerged)
- find ${ROOT}/usr/lib/gcc-lib -name '*curses.h' -exec rm -f {} \;
-}
diff --git a/sys-devel/gcc/gcc-3.3.1-r5.ebuild b/sys-devel/gcc/gcc-3.3.1-r5.ebuild
deleted file mode 100644
index 0f57acfd9837..000000000000
--- a/sys-devel/gcc/gcc-3.3.1-r5.ebuild
+++ /dev/null
@@ -1,625 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.1-r5.ebuild,v 1.11 2004/10/06 22:18:48 lv Exp $
-
-inherit eutils flag-o-matic libtool versionator
-
-# Recently there has been a lot of stability problem in Gentoo-land. Many
-# things can be the cause to this, but I believe that it is due to gcc3
-# still having issues with optimizations, or with it not filtering bad
-# combinations (protecting the user maybe from himeself) yet.
-#
-# This can clearly be seen in large builds like glibc, where too aggressive
-# CFLAGS cause the tests to fail miserbly.
-#
-# Quote from Nick Jones <carpaski@gentoo.org>, who in my opinion
-# knows what he is talking about:
-#
-# People really shouldn't force code-specific options on... It's a
-# bad idea. The -march options aren't just to look pretty. They enable
-# options that are sensible (and include sse,mmx,3dnow when apropriate).
-#
-# The next command strips CFLAGS and CXXFLAGS from nearly all flags. If
-# you do not like it, comment it, but do not bugreport if you run into
-# problems.
-#
-# <azarah@gentoo.org> (13 Oct 2002)
-do_filter_flags() {
- strip-flags
-
- # In general gcc does not like optimization, and add -O2 where
- # it is safe.
- filter-flags -O?
-}
-
-# Theoretical cross compiler support
-[ ! -n "${CCHOST}" ] && export CCHOST="${CHOST}"
-
-LOC="/usr"
-#MY_PV="`echo ${PV} | awk -F. '{ gsub(/_pre.*|_alpha.*/, ""); print $1 "." $2 }'`"
-#MY_PV_FULL="`echo ${PV} | awk '{ gsub(/_pre.*|_alpha.*/, ""); print $0 }'`"
-MY_PV="$(get_version_component_range 1-2)"
-MY_PV_FULL="$(get_version_component_range 1-3)"
-
-LIBPATH="${LOC}/lib/gcc-lib/${CCHOST}/${MY_PV_FULL}"
-BINPATH="${LOC}/${CCHOST}/gcc-bin/${MY_PV}"
-DATAPATH="${LOC}/share/gcc-data/${CCHOST}/${MY_PV}"
-# Dont install in /usr/include/g++-v3/, but in gcc internal directory.
-# We will handle /usr/include/g++-v3/ with gcc-config ...
-STDCXX_INCDIR="${LIBPATH}/include/g++-v${MY_PV/\.*/}"
-
-# ProPolice version
-PP_VER="3_3"
-PP_FVER="${PP_VER//_/.}-4"
-
-# Patch tarball support ...
-#PATCH_VER="1.0"
-PATCH_VER="1.5"
-
-# Snapshot support ...
-#SNAPSHOT="2002-08-12"
-SNAPSHOT=
-
-# Branch update support ...
-MAIN_BRANCH="${PV}" # Tarball, etc used ...
-
-#BRANCH_UPDATE="20021208"
-BRANCH_UPDATE="20030927"
-
-if [ -z "${SNAPSHOT}" ]
-then
- S="${WORKDIR}/${PN}-${MAIN_BRANCH}"
- SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/${P}/${PN}-${MAIN_BRANCH}.tar.bz2"
-
- if [ -n "${PATCH_VER}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2"
- fi
-
- if [ -n "${BRANCH_UPDATE}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2"
- fi
-else
- S="${WORKDIR}/gcc-${SNAPSHOT//-}"
- SRC_URI="ftp://sources.redhat.com/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT//-}.tar.bz2"
-fi
-if [ -n "${PP_VER}" ]
-then
- SRC_URI="${SRC_URI}
- http://www.research.ibm.com/trl/projects/security/ssp/gcc${PP_VER}/protector-${PP_FVER}.tar.gz"
-fi
-SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-manpages.tar.bz2"
-
-DESCRIPTION="The GNU Compiler Collection. Includes C/C++ and java compilers"
-HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
-
-LICENSE="GPL-2 LGPL-2.1"
-KEYWORDS="-* ~x86 ~mips ~sparc amd64 ia64"
-IUSE="static nls bootstrap java build X multilib"
-
-# Ok, this is a hairy one again, but lets assume that we
-# are not cross compiling, than we want SLOT to only contain
-# $PV, as people upgrading to new gcc layout will not have
-# their old gcc unmerged ...
-if [ "${CHOST}" == "${CCHOST}" ]
-then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${MY_PV}"
- SLOT="3.2"
-else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
-fi
-
-# We need the later binutils for support of the new cleanup attribute.
-# 'make check' fails for about 10 tests (if I remember correctly) less
-# if we use later bison.
-DEPEND="virtual/libc
- >=sys-devel/binutils-2.14.90.0.6-r1
- >=sys-devel/bison-1.875
- >=sys-devel/gcc-config-1.3.1
- amd64? ( multilib? ( >=app-emulation/emul-linux-x86-baselibs-1.0 ) )
- !build? ( >=sys-libs/ncurses-5.2-r2
- nls? ( sys-devel/gettext ) )"
-
-RDEPEND="virtual/libc
- >=sys-devel/gcc-config-1.3.1
- >=sys-libs/zlib-1.1.4
- >=sys-apps/texinfo-4.2-r4
- !build? ( >=sys-libs/ncurses-5.2-r2 )"
-
-PDEPEND="sys-devel/gcc-config"
-
-
-chk_gcc_version() {
- # This next bit is for updating libtool linker scripts ...
- local OLD_GCC_VERSION="`gcc -dumpversion`"
- local OLD_GCC_CHOST="$(gcc -v 2>&1 | egrep '^Reading specs' |\
- sed -e 's:^.*/gcc-lib/\([^/]*\)/[0-9]\+.*$:\1:')"
-
- if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
- then
- echo "${OLD_GCC_VERSION}" > "${WORKDIR}/.oldgccversion"
- fi
-
- if [ -n "${OLD_GCC_CHOST}" ]
- then
- if [ "${CHOST}" = "${CCHOST}" -a "${OLD_GCC_CHOST}" != "${CHOST}" ]
- then
- echo "${OLD_GCC_CHOST}" > "${WORKDIR}/.oldgccchost"
- fi
- fi
-
- # Did we check the version ?
- touch "${WORKDIR}/.chkgccversion"
-}
-
-version_patch() {
- [ ! -f "$1" ] && return 1
- [ -z "$2" ] && return 1
-
- sed -e "s:@GENTOO@:$2:g" ${1} > ${T}/${1##*/}
- epatch ${T}/${1##*/}
-}
-
-src_unpack() {
- if [ -z "${SNAPSHOT}" ]
- then
- unpack ${PN}-${MAIN_BRANCH}.tar.bz2
-
- if [ -n "${PATCH_VER}" ]
- then
- unpack ${P}-patches-${PATCH_VER}.tar.bz2
- fi
- else
- unpack gcc-${SNAPSHOT//-}.tar.bz2
- fi
-
- if [ -n "${PP_VER}" ]
- then
- unpack protector-${PP_FVER}.tar.gz
- fi
-
- cd ${S}
- # Fixup libtool to correctly generate .la files with portage
- elibtoolize --portage --shallow
-
- echo
-
- # Branch update ...
- if [ -n "${BRANCH_UPDATE}" ]
- then
- epatch ${DISTDIR}/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2
- fi
-
- # Do bulk patches included in ${P}-patches-${PATCH_VER}.tar.bz2
- if [ -n "${PATCH_VER}" ]
- then
- mkdir -p ${WORKDIR}/patch/exclude
- # Exclude this as it is fixed in apps according to lu_zero.
- mv -f ${WORKDIR}/patch/3* ${WORKDIR}/patch/exclude/
- if use multilib && [ "$ARCH" = "amd64" ]
- then
- mv -f ${WORKDIR}/patch/06* ${WORKDIR}/patch/exclude/
- fi
- epatch ${WORKDIR}/patch
- fi
-
- if use multilib && [ "$ARCH" = "amd64" ]
- then
- epatch ${FILESDIR}/gcc331_use_multilib.amd64.patch
- fi
-
-
- if [ -z "${PP_VER}" ]
- then
- # Make gcc's version info specific to Gentoo
- version_patch ${FILESDIR}/3.3.1/gcc331-gentoo-branding.patch \
- "${BRANCH_UPDATE} (Gentoo Linux ${PVR})" || die "Failed Branding"
- fi
-
- if [ -n "${PP_VER}" ] && [ "${ARCH}" != "hppa" ]
- then
- # ProPolice Stack Smashing protection
- EPATCH_OPTS="${EPATCH_OPTS} ${WORKDIR}/protector.dif" \
- epatch ${FILESDIR}/3.3.1/gcc331-pp-fixup.patch
- epatch ${WORKDIR}/protector.dif
- cp ${WORKDIR}/protector.c ${WORKDIR}/${P}/gcc/ || die "protector.c not found"
- cp ${WORKDIR}/protector.h ${WORKDIR}/${P}/gcc/ || die "protector.h not found"
- version_patch ${FILESDIR}/3.3.1/gcc331-gentoo-branding.patch \
- "${BRANCH_UPDATE} (Gentoo Linux ${PVR}, propolice)" \
- || die "Failed Branding"
- fi
-
- # Install our pre generated manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- cd ${S}; unpack ${P}-manpages.tar.bz2
- fi
-
- # Misdesign in libstdc++ (Redhat)
- cp -a ${S}/libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
-
- cd ${S}; ./contrib/gcc_update --touch &> /dev/null
-}
-
-src_compile() {
- local myconf=
- local gcc_lang=
-
- if ! use build
- then
- myconf="${myconf} --enable-shared"
- gcc_lang="c,c++,f77,objc"
- else
- gcc_lang="c"
- fi
- if ! use nls || use build
- then
- myconf="${myconf} --disable-nls"
- else
- myconf="${myconf} --enable-nls --without-included-gettext"
- fi
- if use java && ! use build
- then
- gcc_lang="${gcc_lang},java"
- fi
-
- # Enable building of the gcj Java AWT & Swing X11 backend
- # if we have X as a use flag and are not in a build stage.
- # X11 support is still very experimental but enabling it is
- # quite innocuous... [No, gcc is *not* linked to X11...]
- # <dragon@gentoo.org> (15 May 2003)
- if use java && use X && ! use build && -f /usr/X11R6/include/X11/Xlib.h
- then
- myconf="${myconf} --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
- myconf="${myconf} --enable-interpreter --enable-java-awt=xlib --with-x"
- fi
-
- # Multilib not yet supported
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- einfo "WARNING: Multilib support enabled. This is still experimental."
- myconf="${myconf} --enable-multilib"
- else
- if [ "${ARCH}" = "amd64" ]
- then
- einfo "WARNING: Multilib not enabled. You will not be able to build 32bit binaries."
- fi
- myconf="${myconf} --disable-multilib"
- fi
-
- # In general gcc does not like optimization, and add -O2 where
- # it is safe. This is especially true for gcc-3.3 ...
- do_filter_flags
- export GCJFLAGS="${CFLAGS/-O?/-O2}"
-
- # Build in a separate build tree
- mkdir -p ${WORKDIR}/build
- cd ${WORKDIR}/build
-
- einfo "Configuring GCC..."
- addwrite "/dev/zero"
- ${S}/configure --prefix=${LOC} \
- --bindir=${BINPATH} \
- --includedir=${LIBPATH}/include \
- --datadir=${DATAPATH} \
- --mandir=${DATAPATH}/man \
- --infodir=${DATAPATH}/info \
- --enable-shared \
- --host=${CHOST} \
- --target=${CCHOST} \
- --with-system-zlib \
- --enable-languages=${gcc_lang} \
- --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=${STDCXX_INCDIR} \
- --with-local-prefix=${LOC}/local \
- ${myconf} || die
-
- touch ${S}/gcc/c-gperf.h
-
- # Do not make manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- find ${S} -name '*.[17]' -exec touch {} \; || :
- fi
-
- # Setup -j in MAKEOPTS
- get_number_of_jobs
-
- einfo "Building GCC..."
- # Only build it static if we are just building the C frontend, else
- # a lot of things break because there are not libstdc++.so ....
- if use static && [ "${gcc_lang}" = "c" ]
- then
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake LDFLAGS="-static" bootstrap \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
- # Above FLAGS optimize and speedup build, thanks
- # to Jeff Garzik <jgarzik@mandrakesoft.com>
- else
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake bootstrap-lean \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
-
- fi
-}
-
-src_install() {
- # Do allow symlinks in ${LOC}/lib/gcc-lib/${CHOST}/${PV}/include as
- # this can break the build.
- for x in cd ${WORKDIR}/build/gcc/include/*
- do
- if [ -L ${x} ]
- then
- rm -f ${x}
- fi
- done
-
- einfo "Installing GCC..."
- # Do the 'make install' from the build directory
- cd ${WORKDIR}/build
- S="${WORKDIR}/build" \
- make prefix=${LOC} \
- bindir=${BINPATH} \
- includedir=${LIBPATH}/include \
- datadir=${DATAPATH} \
- mandir=${DATAPATH}/man \
- infodir=${DATAPATH}/info \
- DESTDIR="${D}" \
- LIBPATH="${LIBPATH}" \
- install || die
-
- [ -r ${D}${BINPATH}/gcc ] || die "gcc not found in ${D}"
-
- dodir /lib /usr/bin
- dodir /etc/env.d/gcc
- echo "PATH=\"${BINPATH}\"" > ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "ROOTPATH=\"${BINPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # amd64 is a bit unique because of multilib. Add some other paths
- echo "LDPATH=\"${LIBPATH}:${LIBPATH}/32:${LIBPATH}/../lib64:${LIBPATH}/../lib32\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- else
- echo "LDPATH=\"${LIBPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- fi
- echo "MANPATH=\"${DATAPATH}/man\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "INFOPATH=\"${DATAPATH}/info\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "STDCXX_INCDIR=\"${STDCXX_INCDIR##*/}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- # Also set CC and CXX
- echo "CC=\"gcc\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "CXX=\"g++\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
-
- # Make sure we dont have stuff lying around that
- # can nuke multiple versions of gcc
- if ! use build
- then
- cd ${D}${LIBPATH}
-
- # Tell libtool files where real libraries are
- for x in ${D}${LOC}/lib/*.la ${D}${LIBPATH}/../*.la
- do
- if [ -f "${x}" ]
- then
- sed -i -e "s:/usr/lib:${LIBPATH}:" ${x}
- mv ${x} ${D}${LIBPATH}
- fi
- done
-
- # Move all the libraries to version specific libdir.
- for x in ${D}${LOC}/lib/*.{so,a}* ${D}${LIBPATH}/../*.{so,a}*
- do
- [ -f "${x}" -o -L "${x}" ] && mv -f ${x} ${D}${LIBPATH}
- done
-
- # Move Java headers to compiler-specific dir
- for x in ${D}${LOC}/include/gc*.h ${D}${LOC}/include/j*.h
- do
- [ -f "${x}" ] && mv -f ${x} ${D}${LIBPATH}/include/
- done
- for x in gcj gnu java javax org
- do
- if [ -d "${D}${LOC}/include/${x}" ]
- then
- dodir /${LIBPATH}/include/${x}
- mv -f ${D}${LOC}/include/${x}/* ${D}${LIBPATH}/include/${x}/
- rm -rf ${D}${LOC}/include/${x}
- fi
- done
-
- if [ -d "${D}${LOC}/lib/security" ]
- then
- dodir /${LIBPATH}/security
- mv -f ${D}${LOC}/lib/security/* ${D}${LIBPATH}/security
- rm -rf ${D}${LOC}/lib/security
- fi
-
- # Move libgcj.spec to compiler-specific directories
- [ -f "${D}${LOC}/lib/libgcj.spec" ] && \
- mv -f ${D}${LOC}/lib/libgcj.spec ${D}${LIBPATH}/libgcj.spec
-
- # Rename jar because it could clash with Kaffe's jar if this gcc is
- # primary compiler (aka don't have the -<version> extension)
- cd ${D}${LOC}/${CCHOST}/gcc-bin/${MY_PV}
- [ -f jar ] && mv -f jar gcj-jar
-
- # Move <cxxabi.h> to compiler-specific directories
- [ -f "${D}${STDCXX_INCDIR}/cxxabi.h" ] && \
- mv -f ${D}${STDCXX_INCDIR}/cxxabi.h ${D}${LIBPATH}/include/
-
- # These should be symlinks
- cd ${D}${BINPATH}
- for x in gcc g++ c++ g77 gcj
- do
- rm -f ${CCHOST}-${x}
- [ -f "${x}" ] && ln -sf ${x} ${CCHOST}-${x}
-
- if [ -f "${CCHOST}-${x}-${PV}" ]
- then
- rm -f ${CCHOST}-${x}-${PV}
- ln -sf ${x} ${CCHOST}-${x}-${PV}
- fi
- done
- fi
-
- # This one comes with binutils
- if [ -f "${D}${LOC}/lib/libiberty.a" ]
- then
- rm -f ${D}${LOC}/lib/libiberty.a
- fi
-
- cd ${S}
- if ! use build
- then
- cd ${S}
- docinto /${CCHOST}
- dodoc ChangeLog* FAQ MAINTAINERS README
- docinto ${CCHOST}/html
- dohtml *.html
- cd ${S}/boehm-gc
- docinto ${CCHOST}/boehm-gc
- dodoc ChangeLog doc/{README*,barrett_diagram}
- docinto ${CCHOST}/boehm-gc/html
- dohtml doc/*.html
- cd ${S}/gcc
- docinto ${CCHOST}/gcc
- dodoc ChangeLog* FSFChangeLog* LANGUAGES NEWS ONEWS README* SERVICE
- cd ${S}/libf2c
- docinto ${CCHOST}/libf2c
- dodoc ChangeLog* README TODO *.netlib
- cd ${S}/libffi
- docinto ${CCHOST}/libffi
- dodoc ChangeLog* README
- cd ${S}/libiberty
- docinto ${CCHOST}/libiberty
- dodoc ChangeLog* README
- cd ${S}/libobjc
- docinto ${CCHOST}/libobjc
- dodoc ChangeLog* README* THREADS*
- cd ${S}/libstdc++-v3
- docinto ${CCHOST}/libstdc++-v3
- dodoc ChangeLog* README
- docinto ${CCHOST}/libstdc++-v3/html
- dohtml -r -a css,diff,html,txt,xml docs/html/*
- cp -f docs/html/17_intro/[A-Z]* \
- ${D}/usr/share/doc/${PF}/${DOCDESTTREE}/17_intro/
-
- if use java
- then
- cd ${S}/fastjar
- docinto ${CCHOST}/fastjar
- dodoc AUTHORS CHANGES ChangeLog* NEWS README
- cd ${S}/libjava
- docinto ${CCHOST}/libjava
- dodoc ChangeLog* HACKING LIBGCJ_LICENSE NEWS README THANKS
- fi
-
- prepman ${DATAPATH}
- prepinfo ${DATAPATH}
- else
- rm -rf ${D}/usr/share/{man,info}
- rm -rf ${D}${DATAPATH}/{man,info}
- fi
-
- # Rather install the script, else portage with changing $FILESDIR
- # between binary and source package borks things ....
- insinto /lib/rcscripts/awk
- doins ${FILESDIR}/awk/fixlafiles.awk
- exeinto /sbin
- doexe ${FILESDIR}/fix_libtool_files.sh
-
- # Fix ncurses b0rking
- find ${D}/ -name '*curses.h' -exec rm -f {} \;
-
- if use multilib && [ "$ARCH" = "amd64" ]
- then
- # If using multilib, GCC has a bug, where it doesn't know where to find
- # -lgcc_s when linking while compiling with g++ . ${LIBPATH} is in
- # it's path though, so ln the 64bit and 32bit versions of -lgcc_s
- # to that directory.
- ln -sf ${LIBPATH}/../lib64/libgcc_s.so ${D}/${LIBPATH}/libgcc_s.so
- ln -sf ${LIBPATH}/../lib32/libgcc_s_32.so ${D}/${LIBPATH}/libgcc_s_32.so
- fi
-}
-
-pkg_preinst() {
-
- if [ ! -f "${WORKDIR}/.chkgccversion" ]
- then
- chk_gcc_version
- fi
-
- # Make again sure that the linker "should" be able to locate
- # libstdc++.so ...
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # Can't always find libgcc_s.so.1, make it find it
- export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}"
- else
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
- fi
- ${ROOT}/sbin/ldconfig
-}
-
-pkg_postinst() {
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # Can't always find libgcc_s.so.1, make it find it
- export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}"
- else
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
- fi
- if [ "${ROOT}" = "/" -a "${CHOST}" = "${CCHOST}" ]
- then
- gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL}
- fi
-
- # Update libtool linker scripts to reference new gcc version ...
- if [ "${ROOT}" = "/" ] && \
- [ -f "${WORKDIR}/.oldgccversion" -o -f "${WORKDIR}/.oldgccchost" ]
- then
- local OLD_GCC_VERSION=
- local OLD_GCC_CHOST=
-
- if [ -f "${WORKDIR}/.oldgccversion" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccversion")" ]
- then
- OLD_GCC_VERSION="$(cat "${WORKDIR}/.oldgccversion")"
- else
- OLD_GCC_VERSION="${MY_PV_FULL}"
- fi
-
- if [ -f "${WORKDIR}/.oldgccchost" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccchost")" ]
- then
- OLD_GCC_CHOST="--oldarch $(cat "${WORKDIR}/.oldgccchost")"
- fi
-
- /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION} ${OLD_GCC_CHOST}
- fi
-
- # Fix ncurses b0rking (if r5 isn't unmerged)
- find ${ROOT}/usr/lib/gcc-lib -name '*curses.h' -exec rm -f {} \;
-
- # http://dev.gentoo.org/~pappy/hardened-gcc/docs/etdyn-ssp.html
- if has_version '>=sys-devel/hardened-gcc-1.2'
- then
- [ "${ROOT}" = "/" ] && hardened-gcc -A
- fi
-}
-
diff --git a/sys-devel/gcc/gcc-3.3.2-r1.ebuild b/sys-devel/gcc/gcc-3.3.2-r1.ebuild
deleted file mode 100644
index 7d4223ada4ef..000000000000
--- a/sys-devel/gcc/gcc-3.3.2-r1.ebuild
+++ /dev/null
@@ -1,623 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.2-r1.ebuild,v 1.8 2004/10/06 22:18:48 lv Exp $
-
-IUSE="static nls bootstrap java build X multilib"
-
-inherit eutils flag-o-matic libtool versionator
-
-# Compile problems with these (bug #6641 among others)...
-#filter-flags "-fno-exceptions -fomit-frame-pointer -fforce-addr"
-
-# Recently there has been a lot of stability problem in Gentoo-land. Many
-# things can be the cause to this, but I believe that it is due to gcc3
-# still having issues with optimizations, or with it not filtering bad
-# combinations (protecting the user maybe from himeself) yet.
-#
-# This can clearly be seen in large builds like glibc, where too aggressive
-# CFLAGS cause the tests to fail miserbly.
-#
-# Quote from Nick Jones <carpaski@gentoo.org>, who in my opinion
-# knows what he is talking about:
-#
-# People really shouldn't force code-specific options on... It's a
-# bad idea. The -march options aren't just to look pretty. They enable
-# options that are sensible (and include sse,mmx,3dnow when apropriate).
-#
-# The next command strips CFLAGS and CXXFLAGS from nearly all flags. If
-# you do not like it, comment it, but do not bugreport if you run into
-# problems.
-#
-# <azarah@gentoo.org> (13 Oct 2002)
-strip-flags
-
-# Theoretical cross compiler support
-[ ! -n "${CCHOST}" ] && export CCHOST="${CHOST}"
-
-LOC="/usr"
-#MY_PV="`echo ${PV} | awk -F. '{ gsub(/_pre.*|_alpha.*/, ""); print $1 "." $2 }'`"
-#MY_PV_FULL="`echo ${PV} | awk '{ gsub(/_pre.*|_alpha.*/, ""); print $0 }'`"
-MY_PV="$(get_version_component_range 1-2)"
-MY_PV_FULL="$(get_version_component_range 1-3)"
-
-LIBPATH="${LOC}/lib/gcc-lib/${CCHOST}/${MY_PV_FULL}"
-BINPATH="${LOC}/${CCHOST}/gcc-bin/${MY_PV}"
-DATAPATH="${LOC}/share/gcc-data/${CCHOST}/${MY_PV}"
-# Dont install in /usr/include/g++-v3/, but in gcc internal directory.
-# We will handle /usr/include/g++-v3/ with gcc-config ...
-STDCXX_INCDIR="${LIBPATH}/include/g++-v${MY_PV/\.*/}"
-
-# ProPolice version
-PP_VER="3_3"
-PP_FVER="${PP_VER//_/.}-4"
-
-# Patch tarball support ...
-#PATCH_VER="1.0"
-PATCH_VER="1.0"
-
-# Snapshot support ...
-#SNAPSHOT="2002-08-12"
-SNAPSHOT=
-
-# Branch update support ...
-MAIN_BRANCH="${PV}" # Tarball, etc used ...
-
-#BRANCH_UPDATE="20021208"
-BRANCH_UPDATE="20031022"
-
-if [ -z "${SNAPSHOT}" ]
-then
- S="${WORKDIR}/${PN}-${MAIN_BRANCH}"
- SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/${P}/${PN}-${MAIN_BRANCH}.tar.bz2"
-
- if [ -n "${PATCH_VER}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2"
- fi
-
- if [ -n "${BRANCH_UPDATE}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2"
- fi
-else
- S="${WORKDIR}/gcc-${SNAPSHOT//-}"
- SRC_URI="ftp://sources.redhat.com/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT//-}.tar.bz2"
-fi
-if [ -n "${PP_VER}" ]
-then
- SRC_URI="${SRC_URI}
- http://www.research.ibm.com/trl/projects/security/ssp/gcc${PP_VER}/protector-${PP_FVER}.tar.gz"
-fi
-SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-manpages.tar.bz2"
-
-DESCRIPTION="The GNU Compiler Collection. Includes C/C++ and java compilers"
-HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
-
-LICENSE="GPL-2 LGPL-2.1"
-KEYWORDS="-* ~x86 ~mips ~sparc ~amd64 -hppa ~ia64"
-
-# Ok, this is a hairy one again, but lets assume that we
-# are not cross compiling, than we want SLOT to only contain
-# $PV, as people upgrading to new gcc layout will not have
-# their old gcc unmerged ...
-if [ "${CHOST}" == "${CCHOST}" ]
-then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${MY_PV}"
- SLOT="3.2"
-else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
-fi
-
-# We need the later binutils for support of the new cleanup attribute.
-# 'make check' fails for about 10 tests (if I remember correctly) less
-# if we use later bison.
-DEPEND="virtual/libc
- >=sys-devel/binutils-2.14.90.0.6-r1
- >=sys-devel/bison-1.875
- >=sys-devel/gcc-config-1.3.1
- amd64? ( multilib? ( >=app-emulation/emul-linux-x86-baselibs-1.0 ) )
- !build? ( >=sys-libs/ncurses-5.2-r2
- nls? ( sys-devel/gettext ) )"
-
-RDEPEND="virtual/libc
- >=sys-devel/gcc-config-1.3.1
- >=sys-libs/zlib-1.1.4
- >=sys-apps/texinfo-4.2-r4
- !build? ( >=sys-libs/ncurses-5.2-r2 )"
-
-PDEPEND="sys-devel/gcc-config"
-
-
-chk_gcc_version() {
- # This next bit is for updating libtool linker scripts ...
- local OLD_GCC_VERSION="`gcc -dumpversion`"
- local OLD_GCC_CHOST="$(gcc -v 2>&1 | egrep '^Reading specs' |\
- sed -e 's:^.*/gcc-lib/\([^/]*\)/[0-9]\+.*$:\1:')"
-
- if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
- then
- echo "${OLD_GCC_VERSION}" > "${WORKDIR}/.oldgccversion"
- fi
-
- if [ -n "${OLD_GCC_CHOST}" ]
- then
- if [ "${CHOST}" = "${CCHOST}" -a "${OLD_GCC_CHOST}" != "${CHOST}" ]
- then
- echo "${OLD_GCC_CHOST}" > "${WORKDIR}/.oldgccchost"
- fi
- fi
-
- # Did we check the version ?
- touch "${WORKDIR}/.chkgccversion"
-}
-
-version_patch() {
- [ ! -f "$1" ] && return 1
- [ -z "$2" ] && return 1
-
- sed -e "s:@GENTOO@:$2:g" ${1} > ${T}/${1##*/}
- epatch ${T}/${1##*/}
-}
-
-src_unpack() {
- if [ -z "${SNAPSHOT}" ]
- then
- unpack ${PN}-${MAIN_BRANCH}.tar.bz2
-
- if [ -n "${PATCH_VER}" ]
- then
- unpack ${P}-patches-${PATCH_VER}.tar.bz2
- fi
- else
- unpack gcc-${SNAPSHOT//-}.tar.bz2
- fi
-
- if [ -n "${PP_VER}" ]
- then
- unpack protector-${PP_FVER}.tar.gz
- fi
-
- cd ${S}
- # Fixup libtool to correctly generate .la files with portage
- elibtoolize --portage --shallow
-
- echo
-
- # Branch update ...
- if [ -n "${BRANCH_UPDATE}" ]
- then
- epatch ${DISTDIR}/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2
- fi
-
- # Do bulk patches included in ${P}-patches-${PATCH_VER}.tar.bz2
- if [ -n "${PATCH_VER}" ]
- then
- mkdir -p ${WORKDIR}/patch/exclude
- mv -f ${WORKDIR}/patch/{40,41}* ${WORKDIR}/patch/exclude/
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- mv -f ${WORKDIR}/patch/06* ${WORKDIR}/patch/exclude/
- bzip2 -c ${FILESDIR}/gcc331_use_multilib.amd64.patch > \
- ${WORKDIR}/patch/06_amd64_gcc331-use-multilib.patch.bz2
- fi
-
- epatch ${WORKDIR}/patch
- fi
-
- if [ -z "${PP_VER}" ]
- then
- # Make gcc's version info specific to Gentoo
- version_patch ${FILESDIR}/3.3.2/gcc332-gentoo-branding.patch \
- "${BRANCH_UPDATE} (Gentoo Linux ${PVR})" || die "Failed Branding"
- fi
-
- if [ -n "${PP_VER}" ] && [ "${ARCH}" != "hppa" ]
- then
- # ProPolice Stack Smashing protection
- EPATCH_OPTS="${EPATCH_OPTS} ${WORKDIR}/protector.dif" \
- epatch ${FILESDIR}/3.3.1/gcc331-pp-fixup.patch
- epatch ${WORKDIR}/protector.dif
- cp ${WORKDIR}/protector.c ${WORKDIR}/${P}/gcc/ || die "protector.c not found"
- cp ${WORKDIR}/protector.h ${WORKDIR}/${P}/gcc/ || die "protector.h not found"
- version_patch ${FILESDIR}/3.3.2/gcc332-gentoo-branding.patch \
- "${BRANCH_UPDATE} (Gentoo Linux ${PVR}, propolice)" \
- || die "Failed Branding"
- fi
-
- # Install our pre generated manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- cd ${S}; unpack ${P}-manpages.tar.bz2
- fi
-
- # Misdesign in libstdc++ (Redhat)
- cp -a ${S}/libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
-
- cd ${S}; ./contrib/gcc_update --touch &> /dev/null
-}
-
-src_compile() {
-
- local myconf=
- local gcc_lang=
-
- if ! use build
- then
- myconf="${myconf} --enable-shared"
- gcc_lang="c,c++,f77,objc"
- else
- gcc_lang="c"
- fi
- if ! use nls || use build
- then
- myconf="${myconf} --disable-nls"
- else
- myconf="${myconf} --enable-nls --without-included-gettext"
- fi
- if use java && ! use build
- then
- gcc_lang="${gcc_lang},java"
- fi
-
- # Enable building of the gcj Java AWT & Swing X11 backend
- # if we have X as a use flag and are not in a build stage.
- # X11 support is still very experimental but enabling it is
- # quite innocuous... [No, gcc is *not* linked to X11...]
- # <dragon@gentoo.org> (15 May 2003)
- if use java && use X && ! use build && [ -f /usr/X11R6/include/X11/Xlib.h ]
- then
- myconf="${myconf} --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
- myconf="${myconf} --enable-interpreter --enable-java-awt=xlib --with-x"
- fi
-
- # Multilib not yet supported
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- einfo "WARNING: Multilib support enabled. This is still experimental."
- myconf="${myconf} --enable-multilib"
- else
- if [ "${ARCH}" = "amd64" ]
- then
- einfo "WARNING: Multilib not enabled. You will not be able to build 32bit binaries."
- fi
- myconf="${myconf} --disable-multilib"
- fi
-
- # In general gcc does not like optimization, and add -O2 where
- # it is safe. This is especially true for gcc-3.3 ...
- export CFLAGS="${CFLAGS/-O?/-O2}"
- export CXXFLAGS="${CXXFLAGS/-O?/-O2}"
- export GCJFLAGS="${CFLAGS/-O?/-O2}"
-
- # Build in a separate build tree
- mkdir -p ${WORKDIR}/build
- cd ${WORKDIR}/build
-
- einfo "Configuring GCC..."
- addwrite "/dev/zero"
- ${S}/configure --prefix=${LOC} \
- --bindir=${BINPATH} \
- --includedir=${LIBPATH}/include \
- --datadir=${DATAPATH} \
- --mandir=${DATAPATH}/man \
- --infodir=${DATAPATH}/info \
- --enable-shared \
- --host=${CHOST} \
- --target=${CCHOST} \
- --with-system-zlib \
- --enable-languages=${gcc_lang} \
- --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=${STDCXX_INCDIR} \
- --with-local-prefix=${LOC}/local \
- ${myconf} || die
-
- touch ${S}/gcc/c-gperf.h
-
- # Do not make manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- find ${S} -name '*.[17]' -exec touch {} \; || :
- fi
-
- # Setup -j in MAKEOPTS
- get_number_of_jobs
-
- einfo "Building GCC..."
- # Only build it static if we are just building the C frontend, else
- # a lot of things break because there are not libstdc++.so ....
- if use static && [ "${gcc_lang}" = "c" ]
- then
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake LDFLAGS="-static" bootstrap \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
- # Above FLAGS optimize and speedup build, thanks
- # to Jeff Garzik <jgarzik@mandrakesoft.com>
- else
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake bootstrap-lean \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
-
- fi
-}
-
-src_install() {
- # Do allow symlinks in ${LOC}/lib/gcc-lib/${CHOST}/${PV}/include as
- # this can break the build.
- for x in cd ${WORKDIR}/build/gcc/include/*
- do
- if [ -L ${x} ]
- then
- rm -f ${x}
- fi
- done
-
- einfo "Installing GCC..."
- # Do the 'make install' from the build directory
- cd ${WORKDIR}/build
- S="${WORKDIR}/build" \
- make prefix=${LOC} \
- bindir=${BINPATH} \
- includedir=${LIBPATH}/include \
- datadir=${DATAPATH} \
- mandir=${DATAPATH}/man \
- infodir=${DATAPATH}/info \
- DESTDIR="${D}" \
- LIBPATH="${LIBPATH}" \
- install || die
-
- [ -r ${D}${BINPATH}/gcc ] || die "gcc not found in ${D}"
-
- dodir /lib /usr/bin
- dodir /etc/env.d/gcc
- echo "PATH=\"${BINPATH}\"" > ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "ROOTPATH=\"${BINPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # amd64 is a bit unique because of multilib. Add some other paths
- echo "LDPATH=\"${LIBPATH}:${LIBPATH}/32:${LIBPATH}/../lib64:${LIBPATH}/../lib32\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- else
- echo "LDPATH=\"${LIBPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- fi
- echo "MANPATH=\"${DATAPATH}/man\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "INFOPATH=\"${DATAPATH}/info\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "STDCXX_INCDIR=\"${STDCXX_INCDIR##*/}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- # Also set CC and CXX
- echo "CC=\"gcc\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "CXX=\"g++\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
-
- # Make sure we dont have stuff lying around that
- # can nuke multiple versions of gcc
- if ! use build
- then
- cd ${D}${LIBPATH}
-
- # Tell libtool files where real libraries are
- for x in ${D}${LOC}/lib/*.la ${D}${LIBPATH}/../*.la
- do
- if [ -f "${x}" ]
- then
- sed -i -e "s:/usr/lib:${LIBPATH}:" ${x}
- mv ${x} ${D}${LIBPATH}
- fi
- done
-
- # Move all the libraries to version specific libdir.
- for x in ${D}${LOC}/lib/*.{so,a}* ${D}${LIBPATH}/../*.{so,a}*
- do
- [ -f "${x}" -o -L "${x}" ] && mv -f ${x} ${D}${LIBPATH}
- done
-
- # Move Java headers to compiler-specific dir
- for x in ${D}${LOC}/include/gc*.h ${D}${LOC}/include/j*.h
- do
- [ -f "${x}" ] && mv -f ${x} ${D}${LIBPATH}/include/
- done
- for x in gcj gnu java javax org
- do
- if [ -d "${D}${LOC}/include/${x}" ]
- then
- dodir /${LIBPATH}/include/${x}
- mv -f ${D}${LOC}/include/${x}/* ${D}${LIBPATH}/include/${x}/
- rm -rf ${D}${LOC}/include/${x}
- fi
- done
-
- if [ -d "${D}${LOC}/lib/security" ]
- then
- dodir /${LIBPATH}/security
- mv -f ${D}${LOC}/lib/security/* ${D}${LIBPATH}/security
- rm -rf ${D}${LOC}/lib/security
- fi
-
- # Move libgcj.spec to compiler-specific directories
- [ -f "${D}${LOC}/lib/libgcj.spec" ] && \
- mv -f ${D}${LOC}/lib/libgcj.spec ${D}${LIBPATH}/libgcj.spec
-
- # Rename jar because it could clash with Kaffe's jar if this gcc is
- # primary compiler (aka don't have the -<version> extension)
- cd ${D}${LOC}/${CCHOST}/gcc-bin/${MY_PV}
- [ -f jar ] && mv -f jar gcj-jar
-
- # Move <cxxabi.h> to compiler-specific directories
- [ -f "${D}${STDCXX_INCDIR}/cxxabi.h" ] && \
- mv -f ${D}${STDCXX_INCDIR}/cxxabi.h ${D}${LIBPATH}/include/
-
- # These should be symlinks
- cd ${D}${BINPATH}
- for x in gcc g++ c++ g77 gcj
- do
- rm -f ${CCHOST}-${x}
- [ -f "${x}" ] && ln -sf ${x} ${CCHOST}-${x}
-
- if [ -f "${CCHOST}-${x}-${PV}" ]
- then
- rm -f ${CCHOST}-${x}-${PV}
- ln -sf ${x} ${CCHOST}-${x}-${PV}
- fi
- done
- fi
-
- # This one comes with binutils
- if [ -f "${D}${LOC}/lib/libiberty.a" ]
- then
- rm -f ${D}${LOC}/lib/libiberty.a
- fi
-
- cd ${S}
- if ! use build
- then
- cd ${S}
- docinto /${CCHOST}
- dodoc COPYING COPYING.LIB ChangeLog* FAQ MAINTAINERS README
- docinto ${CCHOST}/html
- dohtml *.html
- cd ${S}/boehm-gc
- docinto ${CCHOST}/boehm-gc
- dodoc ChangeLog doc/{README*,barrett_diagram}
- docinto ${CCHOST}/boehm-gc/html
- dohtml doc/*.html
- cd ${S}/gcc
- docinto ${CCHOST}/gcc
- dodoc ChangeLog* FSFChangeLog* LANGUAGES NEWS ONEWS README* SERVICE
- cd ${S}/libf2c
- docinto ${CCHOST}/libf2c
- dodoc ChangeLog* README TODO *.netlib
- cd ${S}/libffi
- docinto ${CCHOST}/libffi
- dodoc ChangeLog* LICENSE README
- cd ${S}/libiberty
- docinto ${CCHOST}/libiberty
- dodoc ChangeLog* COPYING.LIB README
- cd ${S}/libobjc
- docinto ${CCHOST}/libobjc
- dodoc ChangeLog* README* THREADS*
- cd ${S}/libstdc++-v3
- docinto ${CCHOST}/libstdc++-v3
- dodoc ChangeLog* README
- docinto ${CCHOST}/libstdc++-v3/html
- dohtml -r -a css,diff,html,txt,xml docs/html/*
- cp -f docs/html/17_intro/[A-Z]* \
- ${D}/usr/share/doc/${PF}/${DOCDESTTREE}/17_intro/
-
- if use java
- then
- cd ${S}/fastjar
- docinto ${CCHOST}/fastjar
- dodoc AUTHORS CHANGES COPYING ChangeLog* NEWS README
- cd ${S}/libjava
- docinto ${CCHOST}/libjava
- dodoc ChangeLog* COPYING HACKING LIBGCJ_LICENSE NEWS README THANKS
- fi
-
- prepman ${DATAPATH}
- prepinfo ${DATAPATH}
- else
- rm -rf ${D}/usr/share/{man,info}
- rm -rf ${D}${DATAPATH}/{man,info}
- fi
-
- # Rather install the script, else portage with changing $FILESDIR
- # between binary and source package borks things ....
- insinto /lib/rcscripts/awk
- doins ${FILESDIR}/awk/fixlafiles.awk
- exeinto /sbin
- doexe ${FILESDIR}/fix_libtool_files.sh
-
- # Fix ncurses b0rking
- find ${D}/ -name '*curses.h' -exec rm -f {} \;
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # If using multilib, GCC has a bug, where it doesn't know where to find
- # -lgcc_s when linking while compiling with g++ . ${LIBPATH} is in
- # it's path though, so ln the 64bit and 32bit versions of -lgcc_s
- # to that directory.
- ln -sf ${LIBPATH}/../lib64/libgcc_s.so ${D}/${LIBPATH}/libgcc_s.so
- ln -sf ${LIBPATH}/../lib32/libgcc_s_32.so ${D}/${LIBPATH}/libgcc_s_32.so
- fi
-}
-
-pkg_preinst() {
-
- if [ ! -f "${WORKDIR}/.chkgccversion" ]
- then
- chk_gcc_version
- fi
-
- # Make again sure that the linker "should" be able to locate
- # libstdc++.so ...
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # Can't always find libgcc_s.so.1, make it find it
- export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}"
- else
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
- fi
- ${ROOT}/sbin/ldconfig
-}
-
-pkg_postinst() {
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # Can't always find libgcc_s.so.1, make it find it
- export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}"
- else
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
- fi
- if [ "${ROOT}" = "/" -a "${CHOST}" = "${CCHOST}" ]
- then
- gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL}
- fi
-
- # Update libtool linker scripts to reference new gcc version ...
- if [ "${ROOT}" = "/" ] && \
- [ -f "${WORKDIR}/.oldgccversion" -o -f "${WORKDIR}/.oldgccchost" ]
- then
- local OLD_GCC_VERSION=
- local OLD_GCC_CHOST=
-
- if [ -f "${WORKDIR}/.oldgccversion" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccversion")" ]
- then
- OLD_GCC_VERSION="$(cat "${WORKDIR}/.oldgccversion")"
- else
- OLD_GCC_VERSION="${MY_PV_FULL}"
- fi
-
- if [ -f "${WORKDIR}/.oldgccchost" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccchost")" ]
- then
- OLD_GCC_CHOST="--oldarch $(cat "${WORKDIR}/.oldgccchost")"
- fi
-
- /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION} ${OLD_GCC_CHOST}
- fi
-
- # Fix ncurses b0rking (if r5 isn't unmerged)
- find ${ROOT}/usr/lib/gcc-lib -name '*curses.h' -exec rm -f {} \;
-
- # http://dev.gentoo.org/~pappy/hardened-gcc/docs/etdyn-ssp.html
- if has_version '>=sys-devel/hardened-gcc-1.2'
- then
- [ "${ROOT}" = "/" ] && hardened-gcc -A
- fi
-}
-
diff --git a/sys-devel/gcc/gcc-3.3.2-r2.ebuild b/sys-devel/gcc/gcc-3.3.2-r2.ebuild
index f3661e24bb62..95ec2af42ada 100644
--- a/sys-devel/gcc/gcc-3.3.2-r2.ebuild
+++ b/sys-devel/gcc/gcc-3.3.2-r2.ebuild
@@ -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/sys-devel/gcc/gcc-3.3.2-r2.ebuild,v 1.14 2004/10/06 22:18:48 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.2-r2.ebuild,v 1.15 2004/11/21 16:58:56 lv Exp $
IUSE="static nls bootstrap java build X multilib"
@@ -105,13 +105,11 @@ KEYWORDS="-* ~x86 ~mips ~sparc amd64 -hppa alpha ia64"
# their old gcc unmerged ...
if [ "${CHOST}" == "${CCHOST}" ]
then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${MY_PV}"
- SLOT="3.2"
+ SLOT="3.3"
else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
+ SLOT="${CCHOST}-3.3"
fi
# We need the later binutils for support of the new cleanup attribute.
diff --git a/sys-devel/gcc/gcc-3.3.2-r3.ebuild b/sys-devel/gcc/gcc-3.3.2-r3.ebuild
deleted file mode 100644
index 30b6758987a6..000000000000
--- a/sys-devel/gcc/gcc-3.3.2-r3.ebuild
+++ /dev/null
@@ -1,666 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.2-r3.ebuild,v 1.10 2004/10/06 22:18:48 lv Exp $
-
-IUSE="static nls bootstrap java build X multilib"
-
-inherit eutils flag-o-matic libtool versionator
-
-# Compile problems with these (bug #6641 among others)...
-#filter-flags "-fno-exceptions -fomit-frame-pointer -fforce-addr"
-
-# Recently there has been a lot of stability problem in Gentoo-land. Many
-# things can be the cause to this, but I believe that it is due to gcc3
-# still having issues with optimizations, or with it not filtering bad
-# combinations (protecting the user maybe from himeself) yet.
-#
-# This can clearly be seen in large builds like glibc, where too aggressive
-# CFLAGS cause the tests to fail miserbly.
-#
-# Quote from Nick Jones <carpaski@gentoo.org>, who in my opinion
-# knows what he is talking about:
-#
-# People really shouldn't force code-specific options on... It's a
-# bad idea. The -march options aren't just to look pretty. They enable
-# options that are sensible (and include sse,mmx,3dnow when apropriate).
-#
-# The next command strips CFLAGS and CXXFLAGS from nearly all flags. If
-# you do not like it, comment it, but do not bugreport if you run into
-# problems.
-#
-# <azarah@gentoo.org> (13 Oct 2002)
-strip-flags
-
-# gcc produce unstable binaries if compiled with a different CHOST.
-[ "${ARCH}" = "hppa" ] && export CHOST="hppa-unknown-linux-gnu"
-
-# Theoretical cross compiler support
-[ ! -n "${CCHOST}" ] && export CCHOST="${CHOST}"
-
-LOC="/usr"
-#MY_PV="`echo ${PV} | awk -F. '{ gsub(/_pre.*|_alpha.*/, ""); print $1 "." $2 }'`"
-#MY_PV_FULL="`echo ${PV} | awk '{ gsub(/_pre.*|_alpha.*/, ""); print $0 }'`"
-MY_PV="$(get_version_component_range 1-2)"
-MY_PV_FULL="$(get_version_component_range 1-3)"
-
-LIBPATH="${LOC}/lib/gcc-lib/${CCHOST}/${MY_PV_FULL}"
-BINPATH="${LOC}/${CCHOST}/gcc-bin/${MY_PV}"
-DATAPATH="${LOC}/share/gcc-data/${CCHOST}/${MY_PV}"
-# Dont install in /usr/include/g++-v3/, but in gcc internal directory.
-# We will handle /usr/include/g++-v3/ with gcc-config ...
-STDCXX_INCDIR="${LIBPATH}/include/g++-v${MY_PV/\.*/}"
-
-# ProPolice version
-PP_VER="3_3"
-PP_FVER="${PP_VER//_/.}-5"
-
-# Patch tarball support ...
-#PATCH_VER="1.0"
-PATCH_VER="1.0"
-
-# Snapshot support ...
-#SNAPSHOT="2002-08-12"
-SNAPSHOT=
-
-# Branch update support ...
-MAIN_BRANCH="${PV}" # Tarball, etc used ...
-
-#BRANCH_UPDATE="20021208"
-BRANCH_UPDATE="20031022"
-
-if [ -z "${SNAPSHOT}" ]
-then
- S="${WORKDIR}/${PN}-${MAIN_BRANCH}"
- SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/${P}/${PN}-${MAIN_BRANCH}.tar.bz2"
-
- if [ -n "${PATCH_VER}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2"
- fi
-
- if [ -n "${BRANCH_UPDATE}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2"
- fi
-else
- S="${WORKDIR}/gcc-${SNAPSHOT//-}"
- SRC_URI="ftp://sources.redhat.com/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT//-}.tar.bz2"
-fi
-if [ -n "${PP_VER}" ]
-then
- SRC_URI="${SRC_URI}
- http://www.research.ibm.com/trl/projects/security/ssp/gcc${PP_VER}/protector-${PP_FVER}.tar.gz"
-fi
-SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-manpages.tar.bz2"
-
-DESCRIPTION="The GNU Compiler Collection. Includes C/C++ and java compilers"
-HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
-
-LICENSE="GPL-2 LGPL-2.1"
-KEYWORDS="-* ~x86 ~mips ~sparc ~amd64 -hppa ~alpha ~ia64"
-
-# Ok, this is a hairy one again, but lets assume that we
-# are not cross compiling, than we want SLOT to only contain
-# $PV, as people upgrading to new gcc layout will not have
-# their old gcc unmerged ...
-if [ "${CHOST}" == "${CCHOST}" ]
-then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${MY_PV}"
- SLOT="3.2"
-else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
-fi
-
-# We need the later binutils for support of the new cleanup attribute.
-# 'make check' fails for about 10 tests (if I remember correctly) less
-# if we use later bison.
-
-# this one depends on glibc-2.3.2-r3 containing the __guard in glibc
-# we scan for Guard@@libgcc and then apply the function moving patch
-DEPEND=">=sys-libs/glibc-2.3.2-r3
- >=sys-devel/binutils-2.14.90.0.6-r1
- >=sys-devel/bison-1.875
- >=sys-devel/gcc-config-1.3.1
- amd64? ( multilib? ( >=app-emulation/emul-linux-x86-baselibs-1.0 ) )
- !build? ( >=sys-libs/ncurses-5.2-r2
- nls? ( sys-devel/gettext ) )"
-
-RDEPEND=">=sys-libs/glibc-2.3.2-r3
- >=sys-devel/gcc-config-1.3.1
- >=sys-libs/zlib-1.1.4
- >=sys-apps/texinfo-4.2-r4
- !build? ( >=sys-libs/ncurses-5.2-r2 )"
-
-PDEPEND="sys-devel/gcc-config"
-
-
-chk_gcc_version() {
- # This next bit is for updating libtool linker scripts ...
- local OLD_GCC_VERSION="`gcc -dumpversion`"
- local OLD_GCC_CHOST="$(gcc -v 2>&1 | egrep '^Reading specs' |\
- sed -e 's:^.*/gcc-lib/\([^/]*\)/[0-9]\+.*$:\1:')"
-
- if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
- then
- echo "${OLD_GCC_VERSION}" > "${WORKDIR}/.oldgccversion"
- fi
-
- if [ -n "${OLD_GCC_CHOST}" ]
- then
- if [ "${CHOST}" = "${CCHOST}" -a "${OLD_GCC_CHOST}" != "${CHOST}" ]
- then
- echo "${OLD_GCC_CHOST}" > "${WORKDIR}/.oldgccchost"
- fi
- fi
-
- # Did we check the version ?
- touch "${WORKDIR}/.chkgccversion"
-}
-
-version_patch() {
- [ ! -f "$1" ] && return 1
- [ -z "$2" ] && return 1
-
- sed -e "s:@GENTOO@:$2:g" ${1} > ${T}/${1##*/}
- epatch ${T}/${1##*/}
-}
-
-src_unpack() {
- if [ -z "${SNAPSHOT}" ]
- then
- unpack ${PN}-${MAIN_BRANCH}.tar.bz2
-
- if [ -n "${PATCH_VER}" ]
- then
- unpack ${P}-patches-${PATCH_VER}.tar.bz2
- fi
- else
- unpack gcc-${SNAPSHOT//-}.tar.bz2
- fi
-
- if [ -n "${PP_VER}" ]
- then
- unpack protector-${PP_FVER}.tar.gz
- fi
-
- cd ${S}
- # Fixup libtool to correctly generate .la files with portage
- elibtoolize --portage --shallow
-
- echo
-
- # Branch update ...
- if [ -n "${BRANCH_UPDATE}" ]
- then
- epatch ${DISTDIR}/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2
- fi
-
- # Do bulk patches included in ${P}-patches-${PATCH_VER}.tar.bz2
- if [ -n "${PATCH_VER}" ]
- then
- mkdir -p ${WORKDIR}/patch/exclude
- mv -f ${WORKDIR}/patch/{40,41}* ${WORKDIR}/patch/exclude/
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- mv -f ${WORKDIR}/patch/06* ${WORKDIR}/patch/exclude/
- bzip2 -c ${FILESDIR}/gcc331_use_multilib.amd64.patch > \
- ${WORKDIR}/patch/06_amd64_gcc331-use-multilib.patch.bz2
- fi
-
- epatch ${WORKDIR}/patch
- fi
-
- if [ -z "${PP_VER}" ]
- then
- # Make gcc's version info specific to Gentoo
- version_patch ${FILESDIR}/3.3.2/gcc332-gentoo-branding.patch \
- "${BRANCH_UPDATE} (Gentoo Linux ${PVR})" || die "Failed Branding"
- fi
-
- if [ -n "${PP_VER}" ] && [ "${ARCH}" != "hppa" ]
- then
- # ProPolice Stack Smashing protection
- EPATCH_OPTS="${EPATCH_OPTS} ${WORKDIR}/protector.dif" \
- epatch ${FILESDIR}/3.3.1/gcc331-pp-fixup.patch
- epatch ${WORKDIR}/protector.dif
- cp ${WORKDIR}/protector.c ${WORKDIR}/${P}/gcc/ || die "protector.c not found"
- cp ${WORKDIR}/protector.h ${WORKDIR}/${P}/gcc/ || die "protector.h not found"
- version_patch ${FILESDIR}/3.3.2/gcc332-gentoo-branding.patch \
- "${BRANCH_UPDATE} (Gentoo Linux ${PVR}, propolice)" \
- || die "Failed Branding"
-
- # check for the glibc to have the guard
- if [ "$(readelf -s /lib/libc.so.6 | grep GLOBAL | grep OBJECT | grep '__guard')" ] &&
- [ "$(readelf -s /lib/libc.so.6 | grep GLOBAL | grep FUNC | grep '__stack_smash_handler')" ]
- then
- ewarn "this sys-libs/glibc has __guard object and __stack_smash_handler functions"
- ewarn "scanning the system for binaries with __guard - this may take 5-10 minutes"
- ewarn "please do not press crtl-C or crtl-Z during this period - it will continue"
- SCANPATH="$(for i in $(cat /etc/ld.so.conf | grep -v '/usr/lib/gcc-lib' | grep -v '^\#'); do echo -n $i; echo -n ' '; done) $(echo ${PATH} | sed 's,:, ,g')"
- if [ "$(find ${SCANPATH} -type f -perm -1 -maxdepth 9 -exec readelf -s {} \; 2>&1 | grep "__guard\@GCC" 2>&1 1>/dev/null; echo $?)" == "0" ]
- then
- eerror "found binaries that are dynamically linked to the libgcc with __guard@@GCC"
- eerror "you need to compile these binaries without CFLAGS -fstack-protector/hcc -r"
- echo
- eerror "also you have to make sure that using ccache needs the cache to be flushed"
- eerror "wipe out /var/tmp/ccache or /root/.ccache, this will remove possible saved"
- eerror "-fstack-protector arguments that still may reside in such a compiler cache"
- echo
- eerror "when such binaries are found, gcc cannot remove libgcc propolice functions"
- eerror "leading to gcc -static -fstack-protector breaking, see gentoo bug id 25299"
- einfo "you can run 'qpkg -f' from the gentoolkit package and reemerge the program"
- einfo "to do a full scan on your system, enter this following command in a shell:"
- echo
- einfo "find / -type f -perm -1 -maxdepth 9 -exec echo -n '__guard at GCC check in: {} ' \; -exec qpkg -f {} \; -exec readelf -s {} \; 2>&1 | grep __guard | grep -B1 '__guard\@GCC'"
- echo
- exit 1
- else
- echo
- einfo "no binaries with suspicious libgcc __guard@GCC dependencies in ${SCANPATH}"
- echo
- epatch ${FILESDIR}/3.2.3/gcc-3.2.3-move-propolice-into-glibc.patch
- fi
- fi
- # end of check for the glibc to have the guard
- fi
-
- # Install our pre generated manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- cd ${S}; unpack ${P}-manpages.tar.bz2
- fi
-
- # Misdesign in libstdc++ (Redhat)
- cp -a ${S}/libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
-
- cd ${S}; ./contrib/gcc_update --touch &> /dev/null
-}
-
-src_compile() {
-
- local myconf=
- local gcc_lang=
-
- if ! use build
- then
- myconf="${myconf} --enable-shared"
- gcc_lang="c,c++,f77,objc"
- else
- gcc_lang="c"
- fi
- if ! use nls || use build
- then
- myconf="${myconf} --disable-nls"
- else
- myconf="${myconf} --enable-nls --without-included-gettext"
- fi
- if use java && ! use build
- then
- gcc_lang="${gcc_lang},java"
- fi
-
- # Enable building of the gcj Java AWT & Swing X11 backend
- # if we have X as a use flag and are not in a build stage.
- # X11 support is still very experimental but enabling it is
- # quite innocuous... [No, gcc is *not* linked to X11...]
- # <dragon@gentoo.org> (15 May 2003)
- if use java && use X && ! use build && [ -f /usr/X11R6/include/X11/Xlib.h ]
- then
- myconf="${myconf} --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
- myconf="${myconf} --enable-interpreter --enable-java-awt=xlib --with-x"
- fi
-
- # Multilib not yet supported
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- einfo "WARNING: Multilib support enabled. This is still experimental."
- myconf="${myconf} --enable-multilib"
- else
- if [ "${ARCH}" = "amd64" ]
- then
- einfo "WARNING: Multilib not enabled. You will not be able to build 32bit binaries."
- fi
- myconf="${myconf} --disable-multilib"
- fi
-
- #Fix linking problem with c++ apps which where linked agains a 3.2.2 libgcc
- [ "${ARCH}" = "hppa" ] && myconf="${myconf} --enable-sjlj-exceptions"
-
- # In general gcc does not like optimization, and add -O2 where
- # it is safe. This is especially true for gcc-3.3 ...
- export CFLAGS="${CFLAGS/-O?/-O2}"
- export CXXFLAGS="${CXXFLAGS/-O?/-O2}"
- export GCJFLAGS="${CFLAGS/-O?/-O2}"
-
- # Build in a separate build tree
- mkdir -p ${WORKDIR}/build
- cd ${WORKDIR}/build
-
- einfo "Configuring GCC..."
- addwrite "/dev/zero"
- ${S}/configure --prefix=${LOC} \
- --bindir=${BINPATH} \
- --includedir=${LIBPATH}/include \
- --datadir=${DATAPATH} \
- --mandir=${DATAPATH}/man \
- --infodir=${DATAPATH}/info \
- --enable-shared \
- --host=${CHOST} \
- --target=${CCHOST} \
- --with-system-zlib \
- --enable-languages=${gcc_lang} \
- --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=${STDCXX_INCDIR} \
- --with-local-prefix=${LOC}/local \
- ${myconf} || die
-
- touch ${S}/gcc/c-gperf.h
-
- # Do not make manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- find ${S} -name '*.[17]' -exec touch {} \; || :
- fi
-
- # Setup -j in MAKEOPTS
- get_number_of_jobs
-
- einfo "Building GCC..."
- # Only build it static if we are just building the C frontend, else
- # a lot of things break because there are not libstdc++.so ....
- if use static && [ "${gcc_lang}" = "c" ]
- then
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake LDFLAGS="-static" bootstrap \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
- # Above FLAGS optimize and speedup build, thanks
- # to Jeff Garzik <jgarzik@mandrakesoft.com>
- else
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake bootstrap-lean \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
-
- fi
-}
-
-src_install() {
- # Do allow symlinks in ${LOC}/lib/gcc-lib/${CHOST}/${PV}/include as
- # this can break the build.
- for x in cd ${WORKDIR}/build/gcc/include/*
- do
- if [ -L ${x} ]
- then
- rm -f ${x}
- fi
- done
-
- einfo "Installing GCC..."
- # Do the 'make install' from the build directory
- cd ${WORKDIR}/build
- S="${WORKDIR}/build" \
- make prefix=${LOC} \
- bindir=${BINPATH} \
- includedir=${LIBPATH}/include \
- datadir=${DATAPATH} \
- mandir=${DATAPATH}/man \
- infodir=${DATAPATH}/info \
- DESTDIR="${D}" \
- LIBPATH="${LIBPATH}" \
- install || die
-
- [ -r ${D}${BINPATH}/gcc ] || die "gcc not found in ${D}"
-
- dodir /lib /usr/bin
- dodir /etc/env.d/gcc
- echo "PATH=\"${BINPATH}\"" > ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "ROOTPATH=\"${BINPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # amd64 is a bit unique because of multilib. Add some other paths
- echo "LDPATH=\"${LIBPATH}:${LIBPATH}/32:${LIBPATH}/../lib64:${LIBPATH}/../lib32\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- else
- echo "LDPATH=\"${LIBPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- fi
- echo "MANPATH=\"${DATAPATH}/man\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "INFOPATH=\"${DATAPATH}/info\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "STDCXX_INCDIR=\"${STDCXX_INCDIR##*/}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- # Also set CC and CXX
- echo "CC=\"gcc\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "CXX=\"g++\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
-
- # Make sure we dont have stuff lying around that
- # can nuke multiple versions of gcc
- if ! use build
- then
- cd ${D}${LIBPATH}
-
- # Tell libtool files where real libraries are
- for x in ${D}${LOC}/lib/*.la ${D}${LIBPATH}/../*.la
- do
- if [ -f "${x}" ]
- then
- sed -i -e "s:/usr/lib:${LIBPATH}:" ${x}
- mv ${x} ${D}${LIBPATH}
- fi
- done
-
- # Move all the libraries to version specific libdir.
- for x in ${D}${LOC}/lib/*.{so,a}* ${D}${LIBPATH}/../*.{so,a}*
- do
- [ -f "${x}" -o -L "${x}" ] && mv -f ${x} ${D}${LIBPATH}
- done
-
- # Move Java headers to compiler-specific dir
- for x in ${D}${LOC}/include/gc*.h ${D}${LOC}/include/j*.h
- do
- [ -f "${x}" ] && mv -f ${x} ${D}${LIBPATH}/include/
- done
- for x in gcj gnu java javax org
- do
- if [ -d "${D}${LOC}/include/${x}" ]
- then
- dodir /${LIBPATH}/include/${x}
- mv -f ${D}${LOC}/include/${x}/* ${D}${LIBPATH}/include/${x}/
- rm -rf ${D}${LOC}/include/${x}
- fi
- done
-
- if [ -d "${D}${LOC}/lib/security" ]
- then
- dodir /${LIBPATH}/security
- mv -f ${D}${LOC}/lib/security/* ${D}${LIBPATH}/security
- rm -rf ${D}${LOC}/lib/security
- fi
-
- # Move libgcj.spec to compiler-specific directories
- [ -f "${D}${LOC}/lib/libgcj.spec" ] && \
- mv -f ${D}${LOC}/lib/libgcj.spec ${D}${LIBPATH}/libgcj.spec
-
- # Rename jar because it could clash with Kaffe's jar if this gcc is
- # primary compiler (aka don't have the -<version> extension)
- cd ${D}${LOC}/${CCHOST}/gcc-bin/${MY_PV}
- [ -f jar ] && mv -f jar gcj-jar
-
- # Move <cxxabi.h> to compiler-specific directories
- [ -f "${D}${STDCXX_INCDIR}/cxxabi.h" ] && \
- mv -f ${D}${STDCXX_INCDIR}/cxxabi.h ${D}${LIBPATH}/include/
-
- # These should be symlinks
- cd ${D}${BINPATH}
- for x in gcc g++ c++ g77 gcj
- do
- rm -f ${CCHOST}-${x}
- [ -f "${x}" ] && ln -sf ${x} ${CCHOST}-${x}
-
- if [ -f "${CCHOST}-${x}-${PV}" ]
- then
- rm -f ${CCHOST}-${x}-${PV}
- ln -sf ${x} ${CCHOST}-${x}-${PV}
- fi
- done
- fi
-
- # This one comes with binutils
- if [ -f "${D}${LOC}/lib/libiberty.a" ]
- then
- rm -f ${D}${LOC}/lib/libiberty.a
- fi
-
- cd ${S}
- if ! use build
- then
- cd ${S}
- docinto /${CCHOST}
- dodoc COPYING COPYING.LIB ChangeLog* FAQ MAINTAINERS README
- docinto ${CCHOST}/html
- dohtml *.html
- cd ${S}/boehm-gc
- docinto ${CCHOST}/boehm-gc
- dodoc ChangeLog doc/{README*,barrett_diagram}
- docinto ${CCHOST}/boehm-gc/html
- dohtml doc/*.html
- cd ${S}/gcc
- docinto ${CCHOST}/gcc
- dodoc ChangeLog* FSFChangeLog* LANGUAGES NEWS ONEWS README* SERVICE
- cd ${S}/libf2c
- docinto ${CCHOST}/libf2c
- dodoc ChangeLog* README TODO *.netlib
- cd ${S}/libffi
- docinto ${CCHOST}/libffi
- dodoc ChangeLog* LICENSE README
- cd ${S}/libiberty
- docinto ${CCHOST}/libiberty
- dodoc ChangeLog* COPYING.LIB README
- cd ${S}/libobjc
- docinto ${CCHOST}/libobjc
- dodoc ChangeLog* README* THREADS*
- cd ${S}/libstdc++-v3
- docinto ${CCHOST}/libstdc++-v3
- dodoc ChangeLog* README
- docinto ${CCHOST}/libstdc++-v3/html
- dohtml -r -a css,diff,html,txt,xml docs/html/*
- cp -f docs/html/17_intro/[A-Z]* \
- ${D}/usr/share/doc/${PF}/${DOCDESTTREE}/17_intro/
-
- if use java
- then
- cd ${S}/fastjar
- docinto ${CCHOST}/fastjar
- dodoc AUTHORS CHANGES COPYING ChangeLog* NEWS README
- cd ${S}/libjava
- docinto ${CCHOST}/libjava
- dodoc ChangeLog* COPYING HACKING LIBGCJ_LICENSE NEWS README THANKS
- fi
-
- prepman ${DATAPATH}
- prepinfo ${DATAPATH}
- else
- rm -rf ${D}/usr/share/{man,info}
- rm -rf ${D}${DATAPATH}/{man,info}
- fi
-
- # Rather install the script, else portage with changing $FILESDIR
- # between binary and source package borks things ....
- insinto /lib/rcscripts/awk
- doins ${FILESDIR}/awk/fixlafiles.awk
- exeinto /sbin
- doexe ${FILESDIR}/fix_libtool_files.sh
-
- # Fix ncurses b0rking
- find ${D}/ -name '*curses.h' -exec rm -f {} \;
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # If using multilib, GCC has a bug, where it doesn't know where to find
- # -lgcc_s when linking while compiling with g++ . ${LIBPATH} is in
- # it's path though, so ln the 64bit and 32bit versions of -lgcc_s
- # to that directory.
- ln -sf ${LIBPATH}/../lib64/libgcc_s.so ${D}/${LIBPATH}/libgcc_s.so
- ln -sf ${LIBPATH}/../lib32/libgcc_s_32.so ${D}/${LIBPATH}/libgcc_s_32.so
- fi
-}
-
-pkg_preinst() {
-
- if [ ! -f "${WORKDIR}/.chkgccversion" ]
- then
- chk_gcc_version
- fi
-
- # Make again sure that the linker "should" be able to locate
- # libstdc++.so ...
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # Can't always find libgcc_s.so.1, make it find it
- export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}"
- else
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
- fi
- ${ROOT}/sbin/ldconfig
-}
-
-pkg_postinst() {
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # Can't always find libgcc_s.so.1, make it find it
- export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}"
- else
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
- fi
- if [ "${ROOT}" = "/" -a "${CHOST}" = "${CCHOST}" ]
- then
- gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL}
- fi
-
- # Update libtool linker scripts to reference new gcc version ...
- if [ "${ROOT}" = "/" ] && \
- [ -f "${WORKDIR}/.oldgccversion" -o -f "${WORKDIR}/.oldgccchost" ]
- then
- local OLD_GCC_VERSION=
- local OLD_GCC_CHOST=
-
- if [ -f "${WORKDIR}/.oldgccversion" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccversion")" ]
- then
- OLD_GCC_VERSION="$(cat "${WORKDIR}/.oldgccversion")"
- else
- OLD_GCC_VERSION="${MY_PV_FULL}"
- fi
-
- if [ -f "${WORKDIR}/.oldgccchost" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccchost")" ]
- then
- OLD_GCC_CHOST="--oldarch $(cat "${WORKDIR}/.oldgccchost")"
- fi
-
- /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION} ${OLD_GCC_CHOST}
- fi
-
- # Fix ncurses b0rking (if r5 isn't unmerged)
- find ${ROOT}/usr/lib/gcc-lib -name '*curses.h' -exec rm -f {} \;
-
- # http://dev.gentoo.org/~pappy/hardened-gcc/docs/etdyn-ssp.html
- if has_version '>=sys-devel/hardened-gcc-1.2'
- then
- [ "${ROOT}" = "/" ] && hardened-gcc -A
- fi
-}
-
diff --git a/sys-devel/gcc/gcc-3.3.2-r4.ebuild b/sys-devel/gcc/gcc-3.3.2-r4.ebuild
deleted file mode 100644
index 9eb07178769a..000000000000
--- a/sys-devel/gcc/gcc-3.3.2-r4.ebuild
+++ /dev/null
@@ -1,678 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.2-r4.ebuild,v 1.8 2004/10/06 22:18:48 lv Exp $
-
-IUSE="static nls bootstrap java build X multilib"
-
-inherit eutils flag-o-matic libtool versionator
-
-# Compile problems with these (bug #6641 among others)...
-#filter-flags "-fno-exceptions -fomit-frame-pointer -fforce-addr"
-
-# Recently there has been a lot of stability problem in Gentoo-land. Many
-# things can be the cause to this, but I believe that it is due to gcc3
-# still having issues with optimizations, or with it not filtering bad
-# combinations (protecting the user maybe from himeself) yet.
-#
-# This can clearly be seen in large builds like glibc, where too aggressive
-# CFLAGS cause the tests to fail miserbly.
-#
-# Quote from Nick Jones <carpaski@gentoo.org>, who in my opinion
-# knows what he is talking about:
-#
-# People really shouldn't force code-specific options on... It's a
-# bad idea. The -march options aren't just to look pretty. They enable
-# options that are sensible (and include sse,mmx,3dnow when apropriate).
-#
-# The next command strips CFLAGS and CXXFLAGS from nearly all flags. If
-# you do not like it, comment it, but do not bugreport if you run into
-# problems.
-#
-# <azarah@gentoo.org> (13 Oct 2002)
-strip-flags
-
-# gcc produce unstable binaries if compiled with a different CHOST.
-[ "${ARCH}" = "hppa" ] && export CHOST="hppa-unknown-linux-gnu"
-
-# Theoretical cross compiler support
-[ ! -n "${CCHOST}" ] && export CCHOST="${CHOST}"
-
-LOC="/usr"
-#MY_PV="`echo ${PV} | awk -F. '{ gsub(/_pre.*|_alpha.*/, ""); print $1 "." $2 }'`"
-#MY_PV_FULL="`echo ${PV} | awk '{ gsub(/_pre.*|_alpha.*/, ""); print $0 }'`"
-MY_PV="$(get_version_component_range 1-2)"
-MY_PV_FULL="$(get_version_component_range 1-3)"
-
-LIBPATH="${LOC}/lib/gcc-lib/${CCHOST}/${MY_PV_FULL}"
-BINPATH="${LOC}/${CCHOST}/gcc-bin/${MY_PV}"
-DATAPATH="${LOC}/share/gcc-data/${CCHOST}/${MY_PV}"
-# Dont install in /usr/include/g++-v3/, but in gcc internal directory.
-# We will handle /usr/include/g++-v3/ with gcc-config ...
-STDCXX_INCDIR="${LIBPATH}/include/g++-v${MY_PV/\.*/}"
-
-# ProPolice version
-PP_VER="3_3"
-PP_FVER="${PP_VER//_/.}-5"
-
-# Patch tarball support ...
-#PATCH_VER="1.0"
-PATCH_VER="1.0"
-
-# Snapshot support ...
-#SNAPSHOT="2002-08-12"
-SNAPSHOT=
-
-# Branch update support ...
-MAIN_BRANCH="${PV}" # Tarball, etc used ...
-
-#BRANCH_UPDATE="20021208"
-BRANCH_UPDATE="20031201"
-
-if [ -z "${SNAPSHOT}" ]
-then
- S="${WORKDIR}/${PN}-${MAIN_BRANCH}"
- SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/${P}/${PN}-${MAIN_BRANCH}.tar.bz2"
-
- if [ -n "${PATCH_VER}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2"
- fi
-
- if [ -n "${BRANCH_UPDATE}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2"
- fi
-else
- S="${WORKDIR}/gcc-${SNAPSHOT//-}"
- SRC_URI="ftp://sources.redhat.com/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT//-}.tar.bz2"
-fi
-if [ -n "${PP_VER}" ]
-then
- SRC_URI="${SRC_URI}
- http://www.research.ibm.com/trl/projects/security/ssp/gcc${PP_VER}/protector-${PP_FVER}.tar.gz"
-fi
-SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-manpages.tar.bz2"
-
-DESCRIPTION="The GNU Compiler Collection. Includes C/C++ and java compilers"
-HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
-
-LICENSE="GPL-2 LGPL-2.1"
-KEYWORDS="~x86 mips ~sparc ~amd64 -hppa ~alpha ~ia64"
-
-# Ok, this is a hairy one again, but lets assume that we
-# are not cross compiling, than we want SLOT to only contain
-# $PV, as people upgrading to new gcc layout will not have
-# their old gcc unmerged ...
-if [ "${CHOST}" == "${CCHOST}" ]
-then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${MY_PV}"
- SLOT="3.2"
-else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
-fi
-
-# We need the later binutils for support of the new cleanup attribute.
-# 'make check' fails for about 10 tests (if I remember correctly) less
-# if we use later bison.
-# This one depends on glibc-2.3.2-r3 containing the __guard in glibc
-# we scan for Guard@@libgcc and then apply the function moving patch.
-# If using NPTL, we currently cannot however depend on glibc-2.3.2-r3,
-# else bootstap will break.
-DEPEND="virtual/libc
- !nptl? ( >=sys-libs/glibc-2.3.2-r3 )
- >=sys-devel/binutils-2.14.90.0.6-r1
- >=sys-devel/bison-1.875
- >=sys-devel/gcc-config-1.3.1
- amd64? ( multilib? ( >=app-emulation/emul-linux-x86-baselibs-1.0 ) )
- !build? ( >=sys-libs/ncurses-5.2-r2
- nls? ( sys-devel/gettext ) )"
-
-RDEPEND="virtual/libc
- !nptl? ( >=sys-libs/glibc-2.3.2-r3 )
- >=sys-devel/gcc-config-1.3.1
- >=sys-libs/zlib-1.1.4
- >=sys-apps/texinfo-4.2-r4
- !build? ( >=sys-libs/ncurses-5.2-r2 )"
-
-PDEPEND="sys-devel/gcc-config"
-
-
-chk_gcc_version() {
- # This next bit is for updating libtool linker scripts ...
- local OLD_GCC_VERSION="`gcc -dumpversion`"
- local OLD_GCC_CHOST="$(gcc -v 2>&1 | egrep '^Reading specs' |\
- sed -e 's:^.*/gcc-lib/\([^/]*\)/[0-9]\+.*$:\1:')"
-
- if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
- then
- echo "${OLD_GCC_VERSION}" > "${WORKDIR}/.oldgccversion"
- fi
-
- if [ -n "${OLD_GCC_CHOST}" ]
- then
- if [ "${CHOST}" = "${CCHOST}" -a "${OLD_GCC_CHOST}" != "${CHOST}" ]
- then
- echo "${OLD_GCC_CHOST}" > "${WORKDIR}/.oldgccchost"
- fi
- fi
-
- # Did we check the version ?
- touch "${WORKDIR}/.chkgccversion"
-}
-
-version_patch() {
- [ ! -f "$1" ] && return 1
- [ -z "$2" ] && return 1
-
- sed -e "s:@GENTOO@:$2:g" ${1} > ${T}/${1##*/}
- epatch ${T}/${1##*/}
-}
-
-src_unpack() {
- if [ -z "${SNAPSHOT}" ]
- then
- unpack ${PN}-${MAIN_BRANCH}.tar.bz2
-
- if [ -n "${PATCH_VER}" ]
- then
- unpack ${P}-patches-${PATCH_VER}.tar.bz2
- fi
- else
- unpack gcc-${SNAPSHOT//-}.tar.bz2
- fi
-
- if [ -n "${PP_VER}" ]
- then
- unpack protector-${PP_FVER}.tar.gz
- fi
-
- cd ${S}
- # Fixup libtool to correctly generate .la files with portage
- elibtoolize --portage --shallow
-
- echo
-
- # Branch update ...
- if [ -n "${BRANCH_UPDATE}" ]
- then
- epatch ${DISTDIR}/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2
- fi
-
- # Do bulk patches included in ${P}-patches-${PATCH_VER}.tar.bz2
- if [ -n "${PATCH_VER}" ]
- then
- mkdir -p ${WORKDIR}/patch/exclude
-# mv -f ${WORKDIR}/patch/{40,41}* ${WORKDIR}/patch/exclude/
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- mv -f ${WORKDIR}/patch/06* ${WORKDIR}/patch/exclude/
- bzip2 -c ${FILESDIR}/gcc331_use_multilib.amd64.patch > \
- ${WORKDIR}/patch/06_amd64_gcc331-use-multilib.patch.bz2
- fi
-
- epatch ${WORKDIR}/patch
- fi
-
- if [ -z "${PP_VER}" ]
- then
- # Make gcc's version info specific to Gentoo
- version_patch ${FILESDIR}/3.3.2/gcc332-gentoo-branding.patch \
- "${BRANCH_UPDATE} (Gentoo Linux ${PVR})" || die "Failed Branding"
- fi
-
- if [ -n "${PP_VER}" ] && [ "${ARCH}" != "hppa" ]
- then
- # ProPolice Stack Smashing protection
- EPATCH_OPTS="${EPATCH_OPTS} ${WORKDIR}/protector.dif" \
- epatch ${FILESDIR}/3.3.1/gcc331-pp-fixup.patch
- epatch ${WORKDIR}/protector.dif
- cp ${WORKDIR}/protector.c ${WORKDIR}/${P}/gcc/ || die "protector.c not found"
- cp ${WORKDIR}/protector.h ${WORKDIR}/${P}/gcc/ || die "protector.h not found"
- version_patch ${FILESDIR}/3.3.2/gcc332-gentoo-branding.patch \
- "${BRANCH_UPDATE} (Gentoo Linux ${PVR}, propolice)" \
- || die "Failed Branding"
-
- # check for the glibc to have the guard
- if [ "$(readelf -s /lib/libc.so.6 | grep GLOBAL | grep OBJECT | grep '__guard')" ] &&
- [ "$(readelf -s /lib/libc.so.6 | grep GLOBAL | grep FUNC | grep '__stack_smash_handler')" ]
- then
- ewarn "This sys-libs/glibc has __guard object and __stack_smash_handler functions"
- ewarn "scanning the system for binaries with __guard - this may take 5-10 minutes"
- ewarn "Please do not press crtl-C or crtl-Z during this period - it will continue"
- SCANPATH="$(for i in $(cat /etc/ld.so.conf | grep -v '/usr/lib/gcc-lib' | grep -v '^\#'); do echo -n $i; echo -n ' '; done) $(echo ${PATH} | sed 's,:, ,g')"
- if [ "$(find ${SCANPATH} -type f -perm -1 -maxdepth 9 -exec readelf -s {} \; 2>&1 | grep "__guard\@GCC" 2>&1 1>/dev/null; echo $?)" == "0" ]
- then
- echo
- eerror "Found binaries that are dynamically linked to the libgcc with __guard@@GCC"
- eerror "You need to compile these binaries without CFLAGS -fstack-protector/hcc -r"
- echo
- eerror "Also, you have to make sure that using ccache needs the cache to be flushed"
- eerror "wipe out /var/tmp/ccache or /root/.ccache. This will remove possible saved"
- eerror "-fstack-protector arguments that still may reside in such a compiler cache"
- echo
- eerror "When such binaries are found, gcc cannot remove libgcc propolice functions"
- eerror "leading to gcc -static -fstack-protector breaking, see gentoo bug id 25299"
- einfo "You can run 'qpkg -f' from the gentoolkit package and reemerge the program"
- einfo "To do a full scan on your system, enter this following command in a shell:"
- echo
- einfo "find / -type f -perm -1 -maxdepth 9 -exec echo -n '__guard at GCC check in: {} ' \; -exec qpkg -f {} \; -exec readelf -s {} \; 2>&1 | grep __guard | grep -B1 '__guard\@GCC'"
- echo
- exit 1
- else
- echo
- einfo "No binaries with suspicious libgcc __guard@GCC dependencies in ${SCANPATH}"
- echo
- epatch ${FILESDIR}/3.2.3/gcc-3.2.3-move-propolice-into-glibc.patch
- fi
- fi
- # end of check for the glibc to have the guard
- fi
-
- # Install our pre generated manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- cd ${S}; unpack ${P}-manpages.tar.bz2
- fi
-
- # Misdesign in libstdc++ (Redhat)
- cp -a ${S}/libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
-
- cd ${S}; ./contrib/gcc_update --touch &> /dev/null
-}
-
-src_compile() {
-
- local myconf=
- local gcc_lang=
-
- if ! use build
- then
- myconf="${myconf} --enable-shared"
- gcc_lang="c,c++,f77,objc"
- else
- gcc_lang="c"
- fi
- if ! use nls || use build
- then
- myconf="${myconf} --disable-nls"
- else
- myconf="${myconf} --enable-nls --without-included-gettext"
- fi
- if use java && ! use build
- then
- gcc_lang="${gcc_lang},java"
- fi
-
- # Enable building of the gcj Java AWT & Swing X11 backend
- # if we have X as a use flag and are not in a build stage.
- # X11 support is still very experimental but enabling it is
- # quite innocuous... [No, gcc is *not* linked to X11...]
- # <dragon@gentoo.org> (15 May 2003)
- if use java && use X && ! use build && [ -f /usr/X11R6/include/X11/Xlib.h ]
- then
- myconf="${myconf} --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
- myconf="${myconf} --enable-interpreter --enable-java-awt=xlib --with-x"
- fi
-
- # Multilib not yet supported
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- einfo "WARNING: Multilib support enabled. This is still experimental."
- myconf="${myconf} --enable-multilib"
- else
- if [ "${ARCH}" = "amd64" ]
- then
- einfo "WARNING: Multilib not enabled. You will not be able to build 32bit binaries."
- fi
- myconf="${myconf} --disable-multilib"
- fi
-
- # Fix linking problem with c++ apps which where linkedi
- # agains a 3.2.2 libgcc
- [ "${ARCH}" = "hppa" ] && myconf="${myconf} --enable-sjlj-exceptions"
-
- # In general gcc does not like optimization, and add -O2 where
- # it is safe. This is especially true for gcc-3.3 ...
- export CFLAGS="${CFLAGS/-O?/-O2}"
- export CXXFLAGS="${CXXFLAGS/-O?/-O2}"
- export GCJFLAGS="${CFLAGS/-O?/-O2}"
-
- # Build in a separate build tree
- mkdir -p ${WORKDIR}/build
- cd ${WORKDIR}/build
-
- einfo "Configuring GCC..."
- addwrite "/dev/zero"
- ${S}/configure --prefix=${LOC} \
- --bindir=${BINPATH} \
- --includedir=${LIBPATH}/include \
- --datadir=${DATAPATH} \
- --mandir=${DATAPATH}/man \
- --infodir=${DATAPATH}/info \
- --enable-shared \
- --host=${CHOST} \
- --target=${CCHOST} \
- --with-system-zlib \
- --enable-languages=${gcc_lang} \
- --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=${STDCXX_INCDIR} \
- --with-local-prefix=${LOC}/local \
- ${myconf} || die
-
- touch ${S}/gcc/c-gperf.h
-
- # Do not make manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- find ${S} -name '*.[17]' -exec touch {} \; || :
- fi
-
- # Setup -j in MAKEOPTS
- get_number_of_jobs
-
- einfo "Building GCC..."
- # Only build it static if we are just building the C frontend, else
- # a lot of things break because there are not libstdc++.so ....
- if use static && [ "${gcc_lang}" = "c" ]
- then
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake LDFLAGS="-static" bootstrap \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
- # Above FLAGS optimize and speedup build, thanks
- # to Jeff Garzik <jgarzik@mandrakesoft.com>
- else
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake bootstrap-lean \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
-
- fi
-}
-
-src_install() {
- local x=
-
- # Do allow symlinks in ${LOC}/lib/gcc-lib/${CHOST}/${PV}/include as
- # this can break the build.
- for x in ${WORKDIR}/build/gcc/include/*
- do
- if [ -L ${x} ]
- then
- rm -f ${x}
- continue
- fi
- done
- # Remove generated headers, as they can cause things to break
- # (ncurses, openssl, etc).
- for x in `find ${WORKDIR}/build/gcc/include/ -name '*.h'`
- do
- if grep -q 'It has been auto-edited by fixincludes from' ${x}
- then
- rm -f ${x}
- fi
- done
-
- einfo "Installing GCC..."
- # Do the 'make install' from the build directory
- cd ${WORKDIR}/build
- S="${WORKDIR}/build" \
- make prefix=${LOC} \
- bindir=${BINPATH} \
- includedir=${LIBPATH}/include \
- datadir=${DATAPATH} \
- mandir=${DATAPATH}/man \
- infodir=${DATAPATH}/info \
- DESTDIR="${D}" \
- LIBPATH="${LIBPATH}" \
- install || die
-
- [ -r ${D}${BINPATH}/gcc ] || die "gcc not found in ${D}"
-
- dodir /lib /usr/bin
- dodir /etc/env.d/gcc
- echo "PATH=\"${BINPATH}\"" > ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "ROOTPATH=\"${BINPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # amd64 is a bit unique because of multilib. Add some other paths
- echo "LDPATH=\"${LIBPATH}:${LIBPATH}/32:${LIBPATH}/../lib64:${LIBPATH}/../lib32\"" >> \
- ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- else
- echo "LDPATH=\"${LIBPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- fi
- echo "MANPATH=\"${DATAPATH}/man\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "INFOPATH=\"${DATAPATH}/info\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "STDCXX_INCDIR=\"${STDCXX_INCDIR##*/}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- # Also set CC and CXX
- echo "CC=\"gcc\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "CXX=\"g++\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
-
- # Make sure we dont have stuff lying around that
- # can nuke multiple versions of gcc
- if ! use build
- then
- cd ${D}${LIBPATH}
-
- # Tell libtool files where real libraries are
- for x in ${D}${LOC}/lib/*.la ${D}${LIBPATH}/../*.la
- do
- if [ -f "${x}" ]
- then
- sed -i -e "s:/usr/lib:${LIBPATH}:" ${x}
- mv ${x} ${D}${LIBPATH}
- fi
- done
-
- # Move all the libraries to version specific libdir.
- for x in ${D}${LOC}/lib/*.{so,a}* ${D}${LIBPATH}/../*.{so,a}*
- do
- [ -f "${x}" -o -L "${x}" ] && mv -f ${x} ${D}${LIBPATH}
- done
-
- # Move Java headers to compiler-specific dir
- for x in ${D}${LOC}/include/gc*.h ${D}${LOC}/include/j*.h
- do
- [ -f "${x}" ] && mv -f ${x} ${D}${LIBPATH}/include/
- done
- for x in gcj gnu java javax org
- do
- if [ -d "${D}${LOC}/include/${x}" ]
- then
- dodir /${LIBPATH}/include/${x}
- mv -f ${D}${LOC}/include/${x}/* ${D}${LIBPATH}/include/${x}/
- rm -rf ${D}${LOC}/include/${x}
- fi
- done
-
- if [ -d "${D}${LOC}/lib/security" ]
- then
- dodir /${LIBPATH}/security
- mv -f ${D}${LOC}/lib/security/* ${D}${LIBPATH}/security
- rm -rf ${D}${LOC}/lib/security
- fi
-
- # Move libgcj.spec to compiler-specific directories
- [ -f "${D}${LOC}/lib/libgcj.spec" ] && \
- mv -f ${D}${LOC}/lib/libgcj.spec ${D}${LIBPATH}/libgcj.spec
-
- # Rename jar because it could clash with Kaffe's jar if this gcc is
- # primary compiler (aka don't have the -<version> extension)
- cd ${D}${LOC}/${CCHOST}/gcc-bin/${MY_PV}
- [ -f jar ] && mv -f jar gcj-jar
-
- # Move <cxxabi.h> to compiler-specific directories
- [ -f "${D}${STDCXX_INCDIR}/cxxabi.h" ] && \
- mv -f ${D}${STDCXX_INCDIR}/cxxabi.h ${D}${LIBPATH}/include/
-
- # These should be symlinks
- cd ${D}${BINPATH}
- for x in gcc g++ c++ g77 gcj
- do
- rm -f ${CCHOST}-${x}
- [ -f "${x}" ] && ln -sf ${x} ${CCHOST}-${x}
-
- if [ -f "${CCHOST}-${x}-${PV}" ]
- then
- rm -f ${CCHOST}-${x}-${PV}
- ln -sf ${x} ${CCHOST}-${x}-${PV}
- fi
- done
- fi
-
- # This one comes with binutils
- if [ -f "${D}${LOC}/lib/libiberty.a" ]
- then
- rm -f ${D}${LOC}/lib/libiberty.a
- fi
-
- cd ${S}
- if ! use build
- then
- cd ${S}
- docinto /${CCHOST}
- dodoc COPYING COPYING.LIB ChangeLog* FAQ MAINTAINERS README
- docinto ${CCHOST}/html
- dohtml *.html
- cd ${S}/boehm-gc
- docinto ${CCHOST}/boehm-gc
- dodoc ChangeLog doc/{README*,barrett_diagram}
- docinto ${CCHOST}/boehm-gc/html
- dohtml doc/*.html
- cd ${S}/gcc
- docinto ${CCHOST}/gcc
- dodoc ChangeLog* FSFChangeLog* LANGUAGES NEWS ONEWS README* SERVICE
- cd ${S}/libf2c
- docinto ${CCHOST}/libf2c
- dodoc ChangeLog* README TODO *.netlib
- cd ${S}/libffi
- docinto ${CCHOST}/libffi
- dodoc ChangeLog* LICENSE README
- cd ${S}/libiberty
- docinto ${CCHOST}/libiberty
- dodoc ChangeLog* COPYING.LIB README
- cd ${S}/libobjc
- docinto ${CCHOST}/libobjc
- dodoc ChangeLog* README* THREADS*
- cd ${S}/libstdc++-v3
- docinto ${CCHOST}/libstdc++-v3
- dodoc ChangeLog* README
- docinto ${CCHOST}/libstdc++-v3/html
- dohtml -r -a css,diff,html,txt,xml docs/html/*
- cp -f docs/html/17_intro/[A-Z]* \
- ${D}/usr/share/doc/${PF}/${DOCDESTTREE}/17_intro/
-
- if use java
- then
- cd ${S}/fastjar
- docinto ${CCHOST}/fastjar
- dodoc AUTHORS CHANGES COPYING ChangeLog* NEWS README
- cd ${S}/libjava
- docinto ${CCHOST}/libjava
- dodoc ChangeLog* COPYING HACKING LIBGCJ_LICENSE NEWS README THANKS
- fi
-
- prepman ${DATAPATH}
- prepinfo ${DATAPATH}
- else
- rm -rf ${D}/usr/share/{man,info}
- rm -rf ${D}${DATAPATH}/{man,info}
- fi
-
- # Rather install the script, else portage with changing $FILESDIR
- # between binary and source package borks things ....
- insinto /lib/rcscripts/awk
- doins ${FILESDIR}/awk/fixlafiles.awk
- exeinto /sbin
- doexe ${FILESDIR}/fix_libtool_files.sh
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # If using multilib, GCC has a bug, where it doesn't know where to find
- # -lgcc_s when linking while compiling with g++ . ${LIBPATH} is in
- # it's path though, so ln the 64bit and 32bit versions of -lgcc_s
- # to that directory.
- ln -sf ${LIBPATH}/../lib64/libgcc_s.so ${D}/${LIBPATH}/libgcc_s.so
- ln -sf ${LIBPATH}/../lib32/libgcc_s_32.so ${D}/${LIBPATH}/libgcc_s_32.so
- fi
-}
-
-pkg_preinst() {
-
- if [ ! -f "${WORKDIR}/.chkgccversion" ]
- then
- chk_gcc_version
- fi
-
- # Make again sure that the linker "should" be able to locate
- # libstdc++.so ...
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # Can't always find libgcc_s.so.1, make it find it
- export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}"
- else
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
- fi
- ${ROOT}/sbin/ldconfig
-}
-
-pkg_postinst() {
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # Can't always find libgcc_s.so.1, make it find it
- export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}"
- else
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
- fi
- if [ "${ROOT}" = "/" -a "${CHOST}" = "${CCHOST}" ]
- then
- gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL}
- fi
-
- # Update libtool linker scripts to reference new gcc version ...
- if [ "${ROOT}" = "/" ] && \
- [ -f "${WORKDIR}/.oldgccversion" -o -f "${WORKDIR}/.oldgccchost" ]
- then
- local OLD_GCC_VERSION=
- local OLD_GCC_CHOST=
-
- if [ -f "${WORKDIR}/.oldgccversion" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccversion")" ]
- then
- OLD_GCC_VERSION="$(cat "${WORKDIR}/.oldgccversion")"
- else
- OLD_GCC_VERSION="${MY_PV_FULL}"
- fi
-
- if [ -f "${WORKDIR}/.oldgccchost" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccchost")" ]
- then
- OLD_GCC_CHOST="--oldarch $(cat "${WORKDIR}/.oldgccchost")"
- fi
-
- /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION} ${OLD_GCC_CHOST}
- fi
-
- # http://dev.gentoo.org/~pappy/hardened-gcc/docs/etdyn-ssp.html
- if has_version '>=sys-devel/hardened-gcc-1.2'
- then
- [ "${ROOT}" = "/" ] && hardened-gcc -A
- fi
-}
-
diff --git a/sys-devel/gcc/gcc-3.3.2-r5.ebuild b/sys-devel/gcc/gcc-3.3.2-r5.ebuild
index 4bf76aecc347..b8bea52aae46 100644
--- a/sys-devel/gcc/gcc-3.3.2-r5.ebuild
+++ b/sys-devel/gcc/gcc-3.3.2-r5.ebuild
@@ -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/sys-devel/gcc/gcc-3.3.2-r5.ebuild,v 1.21 2004/10/06 22:18:48 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.2-r5.ebuild,v 1.22 2004/11/21 16:58:56 lv Exp $
IUSE="static nls bootstrap java build X multilib gcj"
@@ -109,13 +109,11 @@ KEYWORDS="x86 mips ~sparc ~amd64 -hppa alpha -ia64 ppc64"
# their old gcc unmerged ...
if [ "${CHOST}" == "${CCHOST}" ]
then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${MY_PV}"
- SLOT="3.2"
+ SLOT="3.3"
else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
+ SLOT="${CCHOST}-3.3"
fi
# We need the later binutils for support of the new cleanup attribute.
diff --git a/sys-devel/gcc/gcc-3.3.2-r7.ebuild b/sys-devel/gcc/gcc-3.3.2-r7.ebuild
index 375c6b6414ea..a6b1409ee9a8 100644
--- a/sys-devel/gcc/gcc-3.3.2-r7.ebuild
+++ b/sys-devel/gcc/gcc-3.3.2-r7.ebuild
@@ -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/sys-devel/gcc/gcc-3.3.2-r7.ebuild,v 1.12 2004/10/06 22:18:48 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.2-r7.ebuild,v 1.13 2004/11/21 16:58:56 lv Exp $
IUSE="static nls bootstrap java build X multilib gcj"
@@ -109,13 +109,11 @@ KEYWORDS="~x86 ~mips ~sparc ~amd64 -hppa ~alpha ~ia64 ~ppc64"
# their old gcc unmerged ...
if [ "${CHOST}" == "${CCHOST}" ]
then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${MY_PV}"
- SLOT="3.2"
+ SLOT="3.3"
else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
+ SLOT="${CCHOST}-3.3"
fi
# We need the later binutils for support of the new cleanup attribute.
diff --git a/sys-devel/gcc/gcc-3.3.2.ebuild b/sys-devel/gcc/gcc-3.3.2.ebuild
index dc1be6ae2cbb..fdcdaf81a607 100644
--- a/sys-devel/gcc/gcc-3.3.2.ebuild
+++ b/sys-devel/gcc/gcc-3.3.2.ebuild
@@ -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/sys-devel/gcc/gcc-3.3.2.ebuild,v 1.15 2004/10/06 22:18:48 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.2.ebuild,v 1.16 2004/11/21 16:58:56 lv Exp $
inherit eutils flag-o-matic libtool versionator
@@ -92,13 +92,11 @@ IUSE="static nls bootstrap java build X multilib"
# their old gcc unmerged ...
if [ "${CHOST}" == "${CCHOST}" ]
then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${MY_PV}"
- SLOT="3.2"
+ SLOT="3.3"
else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
+ SLOT="${CCHOST}-3.3"
fi
# We need the later binutils for support of the new cleanup attribute.
diff --git a/sys-devel/gcc/gcc-3.3.3-r3.ebuild b/sys-devel/gcc/gcc-3.3.3-r3.ebuild
index 9f1e8efb15e8..0ceb64a1c1c0 100644
--- a/sys-devel/gcc/gcc-3.3.3-r3.ebuild
+++ b/sys-devel/gcc/gcc-3.3.3-r3.ebuild
@@ -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/sys-devel/gcc/gcc-3.3.3-r3.ebuild,v 1.19 2004/11/08 00:27:48 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.3-r3.ebuild,v 1.20 2004/11/21 16:58:56 lv Exp $
inherit eutils flag-o-matic libtool versionator
@@ -102,13 +102,11 @@ IUSE="static nls bootstrap java build X multilib gcj fortran objc hardened uclib
# their old gcc unmerged ...
if [ "${CHOST}" == "${CCHOST}" ]
then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${MY_PV}"
- SLOT="3.2"
+ SLOT="3.3"
else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
+ SLOT="${CCHOST}-3.3"
fi
# We need the later binutils for support of the new cleanup attribute.
diff --git a/sys-devel/gcc/gcc-3.3.3-r5.ebuild b/sys-devel/gcc/gcc-3.3.3-r5.ebuild
deleted file mode 100644
index 0050216eaf95..000000000000
--- a/sys-devel/gcc/gcc-3.3.3-r5.ebuild
+++ /dev/null
@@ -1,815 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.3-r5.ebuild,v 1.12 2004/11/08 00:27:48 lv Exp $
-
-inherit eutils flag-o-matic libtool versionator
-
-# The next command strips most flags from CFLAGS/CXXFLAGS. If you do
-# not like it, comment it out, but do not file bugreports if you run into
-# problems.
-do_filter_flags() {
- strip-flags
-
- # In general gcc does not like optimization ... we'll add -O2 where safe
- filter-flags -O?
-
- # Compile problems with these (bug #6641 among others)...
- #filter-flags -fno-exceptions -fomit-frame-pointer -fforce-addr
-}
-
-# gcc produce unstable binaries if compiled with a different CHOST.
-[ "${ARCH}" = "hppa" ] && export CHOST="hppa-unknown-linux-gnu"
-
-# Theoretical cross compiler support
-[ ! -n "${CCHOST}" ] && export CCHOST="${CHOST}"
-
-LOC="/usr"
-#MY_PV="`echo ${PV} | awk -F. '{ gsub(/_pre.*|_alpha.*/, ""); print $1 "." $2 }'`"
-#MY_PV_FULL="`echo ${PV} | awk '{ gsub(/_pre.*|_alpha.*/, ""); print $0 }'`"
-MY_PV="$(get_version_component_range 1-2)"
-MY_PV_FULL="$(get_version_component_range 1-3)"
-
-LIBPATH="${LOC}/lib/gcc-lib/${CCHOST}/${MY_PV_FULL}"
-BINPATH="${LOC}/${CCHOST}/gcc-bin/${MY_PV}"
-DATAPATH="${LOC}/share/gcc-data/${CCHOST}/${MY_PV}"
-# Dont install in /usr/include/g++-v3/, but in gcc internal directory.
-# We will handle /usr/include/g++-v3/ with gcc-config ...
-STDCXX_INCDIR="${LIBPATH}/include/g++-v${MY_PV/\.*/}"
-
-# PIE support
-PIE_VER="8.7.5.3"
-
-# ProPolice version
-PP_VER="3_3"
-PP_FVER="${PP_VER//_/.}-7"
-
-# Patch tarball support ...
-#PATCH_VER="1.0"
-PATCH_VER="1.3"
-
-# Snapshot support ...
-#SNAPSHOT="2002-08-12"
-SNAPSHOT=
-
-# Branch update support ...
-MAIN_BRANCH="${PV}" # Tarball, etc used ...
-
-#BRANCH_UPDATE="20021208"
-BRANCH_UPDATE="20040412"
-
-if [ -z "${SNAPSHOT}" ]
-then
- S="${WORKDIR}/${PN}-${MAIN_BRANCH}"
- SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/${P}/${PN}-${MAIN_BRANCH}.tar.bz2"
-
- if [ -n "${PATCH_VER}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2"
- fi
-
- if [ -n "${BRANCH_UPDATE}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2"
- fi
-else
- S="${WORKDIR}/gcc-${SNAPSHOT//-}"
- SRC_URI="ftp://sources.redhat.com/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT//-}.tar.bz2"
-fi
-if [ -n "${PP_VER}" ]
-then
- SRC_URI="${SRC_URI}
- http://www.research.ibm.com/trl/projects/security/ssp/gcc${PP_VER}/protector-${PP_FVER}.tar.gz"
-fi
-SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-manpages.tar.bz2"
-
-# bug #6148 - the bounds checking patch interferes with gcc.c
-PIE_BASE_URI="mirror://gentoo/"
-PIE_CORE="gcc-3.3.3-piepatches-v${PIE_VER}.tar.bz2"
-SSP_EXCLUSION_PATCH="gcc-3.3.3-v8.7.0-gcc-ssp-exclusion.patch.bz2"
-SRC_URI="${SRC_URI} ${PIE_BASE_URI}${PIE_CORE} ${PIE_BASE_URI}${SSP_EXCLUSION_PATCH}"
-
-DESCRIPTION="The GNU Compiler Collection. Includes C/C++, java compilers, pie and ssp extensions"
-HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
-
-LICENSE="GPL-2 LGPL-2.1"
-# SpanKY says hppa is a no go with any 3.3.x
-KEYWORDS="-* -hppa arm ~x86 ~sparc ~amd64"
-IUSE="static nls bootstrap java build X multilib gcj fortran objc hardened uclibc debug"
-
-# Ok, this is a hairy one again, but lets assume that we
-# are not cross compiling, than we want SLOT to only contain
-# $PV, as people upgrading to new gcc layout will not have
-# their old gcc unmerged ...
-if [ "${CHOST}" == "${CCHOST}" ]
-then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${MY_PV}"
- SLOT="3.2"
-else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
-fi
-
-# We need the later binutils for support of the new cleanup attribute.
-# 'make check' fails for about 10 tests (if I remember correctly) less
-# if we use later bison.
-# This one depends on glibc-2.3.2-r3 containing the __guard in glibc
-# we scan for Guard@@libgcc and then apply the function moving patch.
-# If using NPTL, we currently cannot however depend on glibc-2.3.2-r3,
-# else bootstap will break.
-
-# we need a proper glibc version for the Scrt1.o provided to the pie-ssp specs
-DEPEND="virtual/libc
- !nptl? ( >=sys-libs/glibc-2.3.2-r3 )
- ( !sys-devel/hardened-gcc )
- >=sys-devel/binutils-2.14.90.0.6-r1
- >=sys-devel/bison-1.875
- >=sys-devel/gcc-config-1.3.1
- amd64? ( multilib? ( >=app-emulation/emul-linux-x86-baselibs-1.0 ) )
- !build? ( >=sys-libs/ncurses-5.2-r2
- nls? ( sys-devel/gettext ) )"
-
-RDEPEND="virtual/libc
- !nptl? ( >=sys-libs/glibc-2.3.2-r3 )
- >=sys-devel/gcc-config-1.3.1
- >=sys-libs/zlib-1.1.4
- >=sys-apps/texinfo-4.2-r4
- !build? ( >=sys-libs/ncurses-5.2-r2 )"
-
-PDEPEND="sys-devel/gcc-config"
-
-
-chk_gcc_version() {
- # This next bit is for updating libtool linker scripts ...
- local OLD_GCC_VERSION="`gcc -dumpversion`"
- local OLD_GCC_CHOST="$(gcc -v 2>&1 | egrep '^Reading specs' |\
- sed -e 's:^.*/gcc-lib/\([^/]*\)/[0-9]\+.*$:\1:')"
-
- if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
- then
- echo "${OLD_GCC_VERSION}" > "${WORKDIR}/.oldgccversion"
- fi
-
- if [ -n "${OLD_GCC_CHOST}" ]
- then
- if [ "${CHOST}" = "${CCHOST}" -a "${OLD_GCC_CHOST}" != "${CHOST}" ]
- then
- echo "${OLD_GCC_CHOST}" > "${WORKDIR}/.oldgccchost"
- fi
- fi
-
- # Did we check the version ?
- touch "${WORKDIR}/.chkgccversion"
-}
-
-version_patch() {
- [ ! -f "$1" ] && return 1
- [ -z "$2" ] && return 1
-
- sed -e "s:@GENTOO@:$2:g" ${1} > ${T}/${1##*/}
- epatch ${T}/${1##*/}
-}
-
-glibc_have_ssp() {
- local my_libc="${ROOT}/lib/libc.so.6"
-
-# Not necessary. lib64 is a symlink to /lib. -- avenj@gentoo.org 3 Apr 04
-# case "${ARCH}" in
-# "amd64")
-# my_libc="${ROOT}/lib64/libc.so.?"
-# ;;
-# esac
-
- # Check for the glibc to have the __guard symbols
- if [ "$(readelf -s "${my_libc}" 2>/dev/null | \
- grep GLOBAL | grep OBJECT | grep '__guard')" ] && \
- [ "$(readelf -s "${my_libc}" 2>/dev/null | \
- grep GLOBAL | grep FUNC | grep '__stack_smash_handler')" ]
- then
- return 0
- else
- return 1
- fi
-}
-
-check_glibc_ssp() {
- if glibc_have_ssp
- then
- if [ -n "${GLIBC_SSP_CHECKED}" ] && \
- [ -z "$(readelf -s "${ROOT}/$(gcc-config -L)/libgcc_s.so" 2>/dev/null | \
- grep 'GLOBAL' | grep 'OBJECT' | grep '__guard')" ]
- then
- # No need to check again ...
- return 0
- fi
-
- echo
- ewarn "This sys-libs/glibc has __guard object and __stack_smash_handler functions"
- ewarn "scanning the system for binaries with __guard - this may take 5-10 minutes"
- ewarn "Please do not press ctrl-C or ctrl-Z during this period - it will continue"
- echo
- if ! bash ${FILESDIR}/scan_libgcc_linked_ssp.sh
- then
- echo
- eerror "Found binaries that are dynamically linked to the libgcc with __guard@@GCC"
- eerror "You need to compile these binaries without CFLAGS -fstack-protector/hcc -r"
- echo
- eerror "Also, you have to make sure that using ccache needs the cache to be flushed"
- eerror "wipe out /var/tmp/ccache or /root/.ccache. This will remove possible saved"
- eerror "-fstack-protector arguments that still may reside in such a compiler cache"
- echo
- eerror "When such binaries are found, gcc cannot remove libgcc propolice functions"
- eerror "leading to gcc -static -fstack-protector breaking, see gentoo bug #25299"
- echo
- einfo "To do a full scan on your system, enter this following command in a shell"
- einfo "(Please keep running and remerging broken packages until it do not report"
- einfo " any breakage anymore!):"
- echo
- einfo " # ${FILESDIR}/scan_libgcc_linked_ssp.sh"
- echo
- die "Binaries with libgcc __guard@GCC dependencies detected!"
- else
- echo
- einfo "No binaries with suspicious libgcc __guard@GCC dependencies detected"
- echo
- fi
- fi
-
- return 0
-}
-
-update_gcc_for_libc_ssp() {
- if glibc_have_ssp
- then
- einfo "Updating gcc to use SSP from glibc..."
- sed -e 's|^\(LIBGCC2_CFLAGS.*\)$|\1 -D_LIBC_PROVIDES_SSP_|' \
- -i ${S}/gcc/Makefile.in || die "Failed to update gcc!"
- fi
-}
-
-src_unpack() {
- local release_version="Gentoo Linux ${PVR}"
-
- if [ -n "${PP_VER}" ] && [ "${ARCH}" != "hppa" ]
- then
- # the guard check should be very early in the unpack process
- check_glibc_ssp
- fi
-
- if [ -z "${SNAPSHOT}" ]
- then
- unpack ${PN}-${MAIN_BRANCH}.tar.bz2
-
- if [ -n "${PATCH_VER}" ]
- then
- unpack ${P}-patches-${PATCH_VER}.tar.bz2
- fi
- else
- unpack gcc-${SNAPSHOT//-}.tar.bz2
- fi
-
- if [ -n "${PP_VER}" ]
- then
- unpack protector-${PP_FVER}.tar.gz
- fi
-
- if [ -n "${PIE_VER}" ]
- then
- unpack ${PIE_CORE}
- fi
-
- cd ${S}
-
- # Branch update ...
- if [ -n "${BRANCH_UPDATE}" ]
- then
- epatch ${DISTDIR}/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2
- fi
-
- # Do bulk patches included in ${P}-patches-${PATCH_VER}.tar.bz2
- if [ -n "${PATCH_VER}" ]
- then
- mkdir -p ${WORKDIR}/patch/exclude
-# mv -f ${WORKDIR}/patch/{40,41}* ${WORKDIR}/patch/exclude/
- mv -f ${WORKDIR}/patch/41* ${WORKDIR}/patch/exclude/
-
- # do not enable it, the pie patches won't apply
- #use uclibc || mv -f ${WORKDIR}/patch/8?_* ${WORKDIR}/patch/exclude/
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- mv -f ${WORKDIR}/patch/06* ${WORKDIR}/patch/exclude/
- bzip2 -c ${FILESDIR}/gcc331_use_multilib.amd64.patch > \
- ${WORKDIR}/patch/06_amd64_gcc331-use-multilib.patch.bz2
- fi
-
- epatch ${WORKDIR}/patch
- use uclibc && epatch ${FILESDIR}/3.3.3/gcc-uclibc-3.3-loop.patch
- fi
-
- if [ -n "${PIE_VER}" ]
- then
- # corrects startfile/endfile selection and shared/static/pie flag usage
- epatch ${WORKDIR}/piepatch/upstream
- # adds non-default pie support (for now only rs6000)
- epatch ${WORKDIR}/piepatch/nondef
- # adds default pie support for all archs less rs6000 if DEFAULT_PIE[_SSP] is defined
- epatch ${WORKDIR}/piepatch/def
- fi
-
- if [ "${ARCH}" = "ppc" -o "${ARCH}" = "ppc64" ]
- then
- epatch ${FILESDIR}/3.3.2/gcc332-altivec-fix.patch
- fi
-
- if [ "${ARCH}" = "arm" ]
- then
- epatch ${FILESDIR}/3.3.3/gcc333-debian-arm-getoff.patch
- epatch ${FILESDIR}/3.3.3/gcc333-debian-arm-ldm.patch
- fi
-
- # non-default SSP support.
- if [ "${ARCH}" != "hppa" -a "${ARCH}" != "hppa64" -a -n "${PP_VER}" ]
- then
- # ProPolice Stack Smashing protection
- EPATCH_OPTS="${EPATCH_OPTS} ${WORKDIR}/protector.dif" \
- epatch ${FILESDIR}/3.3.1/gcc331-pp-fixup.patch
-
- EPATCH_OPTS="${EPATCH_OPTS} ${WORKDIR}/protector.dif" \
- epatch ${FILESDIR}/3.3.3/gcc333-ssp-3.3_7-fixup.patch
-
- epatch ${WORKDIR}/protector.dif
-
- cp ${WORKDIR}/protector.c ${WORKDIR}/${P}/gcc/ || die "protector.c not found"
- cp ${WORKDIR}/protector.h ${WORKDIR}/${P}/gcc/ || die "protector.h not found"
-
- use uclibc && epatch ${FILESDIR}/3.3.3/gcc-3.3.3-uclibc-add-ssp.patch
-
- release_version="${release_version}, ssp-${PP_FVER}"
-
- update_gcc_for_libc_ssp
- fi
-
- cd ${WORKDIR}/${P}
-
- # ARM was having issues with static linking as the spec file
- # calls for crtbeginT.o vs crtbeginS.o. SpanKY looked through
- # the gcc/config/arm/t-* files, it's appears that it's not meant
- # to build crtbeginT.o (May 2 2004)
- # Testing arm again (May 3 2004)
- # solved hopefully as of pie/ssp v8.7.1
-
- # it is not really uclibc's dependency
- # only for those having problems building gcc itself (known on P4)
- #use uclibc || epatch ${DISTDIR}/${SSP_EXCLUSION_PATCH}
-
- release_version="${release_version}, pie-${PIE_VER}"
- if use hardened && ( use x86 || use sparc || use amd64 )
- then
- einfo "Updating gcc to use automatic PIE + SSP building ..."
- sed -e 's|^ALL_CFLAGS = |ALL_CFLAGS = -DEFAULT_PIE_SSP |' \
- -i ${S}/gcc/Makefile.in || die "Failed to update gcc!"
-
- # rebrand to make bug reports easier
- release_version="${release_version/Gentoo/Gentoo Hardened}"
- fi
-
- version_patch ${FILESDIR}/3.3.3/gcc333-gentoo-branding.patch \
- "${BRANCH_UPDATE} (${release_version})" || die "Failed Branding"
-
- # TODO: on arches where we lack a Scrt1.o (like parisc) we still need unpack, compile and install logic
- # TODO: for the crt1Snocsu.o provided by a custom gcc-pie-ssp.tgz which can also be included in SRC_URI
-
- # Install our pre generated manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- cd ${S}; unpack ${P}-manpages.tar.bz2
- fi
-
- # Misdesign in libstdc++ (Redhat)
- cp -a ${S}/libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
-
- # disable --as-needed from being compiled into gcc specs
- # natively when using >=sys-devel/binutils-2.15.90.0.1 this is
- # done to keep our gcc backwards compatible with binutils.
- # gcc 3.4.1 cvs has patches that need back porting..
- # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14992 (May 3 2004)
- sed -i -e s/HAVE_LD_AS_NEEDED/USE_LD_AS_NEEDED/g ${S}/gcc/config.in
-
- cd ${S}
- # Fixup libtool to correctly generate .la files with portage
- elibtoolize --portage --shallow
-
- gnuconfig_update
-
- cd ${S}; ./contrib/gcc_update --touch &> /dev/null
-}
-
-src_compile() {
- local myconf=
- local gcc_lang=
-
- if ! use build
- then
- myconf="${myconf} --enable-shared"
- gcc_lang="c,c++"
- use fortran && gcc_lang="${gcc_lang},f77"
- use objc && gcc_lang="${gcc_lang},objc"
- use java && use gcj && gcc_lang="${gcc_lang},java"
- # We do NOT want 'ADA support' in here!
- # use ada && gcc_lang="${gcc_lang},ada"
- else
- gcc_lang="c"
- fi
- if ! use nls || use build
- then
- myconf="${myconf} --disable-nls"
- else
- myconf="${myconf} --enable-nls --without-included-gettext"
- fi
-
- # Enable building of the gcj Java AWT & Swing X11 backend
- # if we have X as a use flag and are not in a build stage.
- # X11 support is still very experimental but enabling it is
- # quite innocuous... [No, gcc is *not* linked to X11...]
- # <dragon@gentoo.org> (15 May 2003)
- if use java && use gcj && use X && ! use build && [ -f /usr/X11R6/include/X11/Xlib.h ]
- then
- myconf="${myconf} --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
- myconf="${myconf} --enable-interpreter --enable-java-awt=xlib --with-x"
- fi
-
- # Multilib not yet supported
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- einfo "WARNING: Multilib support enabled. This is still experimental."
- myconf="${myconf} --enable-multilib"
- else
- if [ "${ARCH}" = "amd64" ]
- then
- einfo "WARNING: Multilib not enabled. You will not be able to build 32bit binaries."
- fi
- myconf="${myconf} --disable-multilib"
- fi
-
- # Fix linking problem with c++ apps which where linked
- # agains a 3.2.2 libgcc
- [ "${ARCH}" = "hppa" ] && myconf="${myconf} --enable-sjlj-exceptions"
-
- use hardened && append-flags -fPIC
-
- # --with-gnu-ld needed for cross-compiling
- # --enable-sjlj-exceptions : currently the unwind stuff seems to work
- # for statically linked apps but not dynamic
- # so use setjmp/longjmp exceptions by default
- # --disable-libunwind-exceptions needed till unwind sections get fixed. see ps.m for details
-
- if ! use uclibc
- then
- # it's getting close to a time where we are going to need USE=glibc, uclibc, bsdlibc -solar
- myconf="${myconf} --enable-__cxa_atexit --enable-clocale=generic"
- else
- myconf="${myconf} --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --enable-sjlj-exceptions"
- fi
-
- # Make sure we have sane CFLAGS
- do_filter_flags
-
- # Build in a separate build tree
- mkdir -p ${WORKDIR}/build
- cd ${WORKDIR}/build
-
- einfo "Configuring GCC..."
- addwrite "/dev/zero"
- ${S}/configure --prefix=${LOC} \
- --bindir=${BINPATH} \
- --includedir=${LIBPATH}/include \
- --datadir=${DATAPATH} \
- --mandir=${DATAPATH}/man \
- --infodir=${DATAPATH}/info \
- --enable-shared \
- --host=${CHOST} \
- --target=${CCHOST} \
- --with-system-zlib \
- --enable-languages=${gcc_lang} \
- --enable-threads=posix \
- --enable-long-long \
- --disable-checking \
- --disable-libunwind-exceptions \
- --enable-cstdio=stdio \
- --enable-version-specific-runtime-libs \
- --with-gxx-include-dir=${STDCXX_INCDIR} \
- --with-local-prefix=${LOC}/local \
- ${myconf} || die
-
- touch ${S}/gcc/c-gperf.h
-
- # Do not make manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- find ${S} -name '*.[17]' -exec touch {} \; || :
- fi
-
- # Setup -j in MAKEOPTS
- get_number_of_jobs
-
- einfo "Building GCC..."
- # Only build it static if we are just building the C frontend, else
- # a lot of things break because there are not libstdc++.so ....
- if use static && [ "${gcc_lang}" = "c" ]
- then
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake LDFLAGS="-static" bootstrap \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
- # Above FLAGS optimize and speedup build, thanks
- # to Jeff Garzik <jgarzik@mandrakesoft.com>
- else
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake bootstrap-lean \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
-
- fi
-}
-
-src_install() {
- local x=
-
- # Do allow symlinks in ${LOC}/lib/gcc-lib/${CHOST}/${PV}/include as
- # this can break the build.
- for x in ${WORKDIR}/build/gcc/include/*
- do
- if [ -L ${x} ]
- then
- rm -f ${x}
- continue
- fi
- done
- # Remove generated headers, as they can cause things to break
- # (ncurses, openssl, etc).
- for x in `find ${WORKDIR}/build/gcc/include/ -name '*.h'`
- do
- if grep -q 'It has been auto-edited by fixincludes from' ${x}
- then
- rm -f ${x}
- fi
- done
-
- einfo "Installing GCC..."
- # Do the 'make install' from the build directory
- cd ${WORKDIR}/build
- S="${WORKDIR}/build" \
- make prefix=${LOC} \
- bindir=${BINPATH} \
- includedir=${LIBPATH}/include \
- datadir=${DATAPATH} \
- mandir=${DATAPATH}/man \
- infodir=${DATAPATH}/info \
- DESTDIR="${D}" \
- LIBPATH="${LIBPATH}" \
- install || die
-
- [ -r ${D}${BINPATH}/gcc ] || die "gcc not found in ${D}"
-
- dodir /lib /usr/bin
- dodir /etc/env.d/gcc
- echo "PATH=\"${BINPATH}\"" > ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "ROOTPATH=\"${BINPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # amd64 is a bit unique because of multilib. Add some other paths
- echo "LDPATH=\"${LIBPATH}:${LIBPATH}/32:${LIBPATH}/../lib64:${LIBPATH}/../lib32\"" >> \
- ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- else
- echo "LDPATH=\"${LIBPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- fi
- echo "MANPATH=\"${DATAPATH}/man\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "INFOPATH=\"${DATAPATH}/info\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "STDCXX_INCDIR=\"${STDCXX_INCDIR##*/}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- # Also set CC and CXX
- echo "CC=\"gcc\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "CXX=\"g++\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- # Make sure we do not check glibc for SSP again, as we did already
- if glibc_have_ssp || \
- [ -f "${ROOT}/etc/env.d/99glibc_ssp" ]
- then
- echo "GLIBC_SSP_CHECKED=1" > ${D}/etc/env.d/99glibc_ssp
- fi
-
- # Make sure we dont have stuff lying around that
- # can nuke multiple versions of gcc
- if ! use build
- then
- cd ${D}${LIBPATH}
-
- # Tell libtool files where real libraries are
- for x in ${D}${LOC}/lib/*.la ${D}${LIBPATH}/../*.la
- do
- if [ -f "${x}" ]
- then
- sed -i -e "s:/usr/lib:${LIBPATH}:" ${x}
- mv ${x} ${D}${LIBPATH}
- fi
- done
-
- # Move all the libraries to version specific libdir.
- for x in ${D}${LOC}/lib/*.{so,a}* ${D}${LIBPATH}/../*.{so,a}*
- do
- [ -f "${x}" -o -L "${x}" ] && mv -f ${x} ${D}${LIBPATH}
- done
-
- # Move Java headers to compiler-specific dir
- for x in ${D}${LOC}/include/gc*.h ${D}${LOC}/include/j*.h
- do
- [ -f "${x}" ] && mv -f ${x} ${D}${LIBPATH}/include/
- done
- for x in gcj gnu java javax org
- do
- if [ -d "${D}${LOC}/include/${x}" ]
- then
- dodir /${LIBPATH}/include/${x}
- mv -f ${D}${LOC}/include/${x}/* ${D}${LIBPATH}/include/${x}/
- rm -rf ${D}${LOC}/include/${x}
- fi
- done
-
- if [ -d "${D}${LOC}/lib/security" ]
- then
- dodir /${LIBPATH}/security
- mv -f ${D}${LOC}/lib/security/* ${D}${LIBPATH}/security
- rm -rf ${D}${LOC}/lib/security
- fi
-
- # Move libgcj.spec to compiler-specific directories
- [ -f "${D}${LOC}/lib/libgcj.spec" ] && \
- mv -f ${D}${LOC}/lib/libgcj.spec ${D}${LIBPATH}/libgcj.spec
-
- # Rename jar because it could clash with Kaffe's jar if this gcc is
- # primary compiler (aka don't have the -<version> extension)
- cd ${D}${LOC}/${CCHOST}/gcc-bin/${MY_PV}
- [ -f jar ] && mv -f jar gcj-jar
-
- # Move <cxxabi.h> to compiler-specific directories
- [ -f "${D}${STDCXX_INCDIR}/cxxabi.h" ] && \
- mv -f ${D}${STDCXX_INCDIR}/cxxabi.h ${D}${LIBPATH}/include/
-
- # These should be symlinks
- cd ${D}${BINPATH}
- for x in gcc g++ c++ g77 gcj
- do
- rm -f ${CCHOST}-${x}
- [ -f "${x}" ] && ln -sf ${x} ${CCHOST}-${x}
-
- if [ -f "${CCHOST}-${x}-${PV}" ]
- then
- rm -f ${CCHOST}-${x}-${PV}
- ln -sf ${x} ${CCHOST}-${x}-${PV}
- fi
- done
- fi
-
- # This one comes with binutils
- [ -f "${D}${LOC}/lib/libiberty.a" ] && rm -f ${D}${LOC}/lib/libiberty.a
-
- cd ${S}
- if ! use build
- then
- cd ${S}
- docinto /${CCHOST}
- dodoc COPYING COPYING.LIB ChangeLog* FAQ MAINTAINERS README
- docinto ${CCHOST}/html
- dohtml *.html
- cd ${S}/boehm-gc
- docinto ${CCHOST}/boehm-gc
- dodoc ChangeLog doc/{README*,barrett_diagram}
- docinto ${CCHOST}/boehm-gc/html
- dohtml doc/*.html
- cd ${S}/gcc
- docinto ${CCHOST}/gcc
- dodoc ChangeLog* FSFChangeLog* LANGUAGES NEWS ONEWS README* SERVICE
- if use fortran
- then
- cd ${S}/libf2c
- docinto ${CCHOST}/libf2c
- dodoc ChangeLog* README TODO *.netlib
- fi
- cd ${S}/libffi
- docinto ${CCHOST}/libffi
- dodoc ChangeLog* LICENSE README
- cd ${S}/libiberty
- docinto ${CCHOST}/libiberty
- dodoc ChangeLog* COPYING.LIB README
- if use objc
- then
- cd ${S}/libobjc
- docinto ${CCHOST}/libobjc
- dodoc ChangeLog* README* THREADS*
- fi
- cd ${S}/libstdc++-v3
- docinto ${CCHOST}/libstdc++-v3
- dodoc ChangeLog* README
- docinto ${CCHOST}/libstdc++-v3/html
- dohtml -r -a css,diff,html,txt,xml docs/html/*
- cp -f docs/html/17_intro/[A-Z]* \
- ${D}/usr/share/doc/${PF}/${DOCDESTTREE}/17_intro/
-
- if use java && use gcj
- then
- cd ${S}/fastjar
- docinto ${CCHOST}/fastjar
- dodoc AUTHORS CHANGES COPYING ChangeLog* NEWS README
- cd ${S}/libjava
- docinto ${CCHOST}/libjava
- dodoc ChangeLog* COPYING HACKING LIBGCJ_LICENSE NEWS README THANKS
- fi
-
- prepman ${DATAPATH}
- prepinfo ${DATAPATH}
- else
- rm -rf ${D}/usr/share/{man,info}
- rm -rf ${D}${DATAPATH}/{man,info}
- fi
-
- # Rather install the script, else portage with changing $FILESDIR
- # between binary and source package borks things ....
- insinto /lib/rcscripts/awk
- doins ${FILESDIR}/awk/fixlafiles.awk
- exeinto /sbin
- doexe ${FILESDIR}/fix_libtool_files.sh
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # If using multilib, GCC has a bug, where it doesn't know where to find
- # -lgcc_s when linking while compiling with g++ . ${LIBPATH} is in
- # it's path though, so ln the 64bit and 32bit versions of -lgcc_s
- # to that directory.
- ln -sf ${LIBPATH}/../lib64/libgcc_s.so ${D}/${LIBPATH}/libgcc_s.so
- ln -sf ${LIBPATH}/../lib32/libgcc_s_32.so ${D}/${LIBPATH}/libgcc_s_32.so
- fi
-}
-
-pkg_preinst() {
-
- if [ ! -f "${WORKDIR}/.chkgccversion" ]
- then
- chk_gcc_version
- fi
-
- # Make again sure that the linker "should" be able to locate
- # libstdc++.so ...
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # Can't always find libgcc_s.so.1, make it find it
- export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}"
- else
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
- fi
- ${ROOT}/sbin/ldconfig
-}
-
-pkg_postinst() {
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # Can't always find libgcc_s.so.1, make it find it
- export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}"
- else
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
- fi
- if [ "${ROOT}" = "/" -a "${CHOST}" = "${CCHOST}" ]
- then
- gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL}
- fi
-
- # Update libtool linker scripts to reference new gcc version ...
- if [ "${ROOT}" = "/" ] && \
- [ -f "${WORKDIR}/.oldgccversion" -o -f "${WORKDIR}/.oldgccchost" ]
- then
- local OLD_GCC_VERSION=
- local OLD_GCC_CHOST=
-
- if [ -f "${WORKDIR}/.oldgccversion" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccversion")" ]
- then
- OLD_GCC_VERSION="$(cat "${WORKDIR}/.oldgccversion")"
- else
- OLD_GCC_VERSION="${MY_PV_FULL}"
- fi
-
- if [ -f "${WORKDIR}/.oldgccchost" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccchost")" ]
- then
- OLD_GCC_CHOST="--oldarch $(cat "${WORKDIR}/.oldgccchost")"
- fi
-
- /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION} ${OLD_GCC_CHOST}
- fi
-}
-
diff --git a/sys-devel/gcc/gcc-3.3.3-r6.ebuild b/sys-devel/gcc/gcc-3.3.3-r6.ebuild
index f3351bbb37fd..afd26dbdb4f1 100644
--- a/sys-devel/gcc/gcc-3.3.3-r6.ebuild
+++ b/sys-devel/gcc/gcc-3.3.3-r6.ebuild
@@ -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/sys-devel/gcc/gcc-3.3.3-r6.ebuild,v 1.20 2004/11/08 00:27:48 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.3-r6.ebuild,v 1.21 2004/11/21 16:58:56 lv Exp $
inherit eutils flag-o-matic libtool gnuconfig versionator
@@ -106,13 +106,11 @@ IUSE="static nls bootstrap java build X multilib gcj fortran objc pic hardened u
# their old gcc unmerged ...
if [ "${CHOST}" == "${CCHOST}" ]
then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${MY_PV}"
- SLOT="3.2"
+ SLOT="3.3"
else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
+ SLOT="${CCHOST}-3.3"
fi
# We need the later binutils for support of the new cleanup attribute.
diff --git a/sys-devel/gcc/gcc-3.3.3.ebuild b/sys-devel/gcc/gcc-3.3.3.ebuild
deleted file mode 100644
index 54b3f29f5767..000000000000
--- a/sys-devel/gcc/gcc-3.3.3.ebuild
+++ /dev/null
@@ -1,753 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.3.ebuild,v 1.15 2004/10/06 22:23:29 lv Exp $
-
-IUSE="static nls bootstrap java build X multilib gcj"
-
-inherit eutils flag-o-matic libtool versionator
-
-# Compile problems with these (bug #6641 among others)...
-#filter-flags "-fno-exceptions -fomit-frame-pointer -fforce-addr"
-
-# Recently there has been a lot of stability problem in Gentoo-land. Many
-# things can be the cause to this, but I believe that it is due to gcc3
-# still having issues with optimizations, or with it not filtering bad
-# combinations (protecting the user maybe from himeself) yet.
-#
-# This can clearly be seen in large builds like glibc, where too aggressive
-# CFLAGS cause the tests to fail miserbly.
-#
-# Quote from Nick Jones <carpaski@gentoo.org>, who in my opinion
-# knows what he is talking about:
-#
-# People really shouldn't force code-specific options on... It's a
-# bad idea. The -march options aren't just to look pretty. They enable
-# options that are sensible (and include sse,mmx,3dnow when apropriate).
-#
-# The next command strips CFLAGS and CXXFLAGS from nearly all flags. If
-# you do not like it, comment it, but do not bugreport if you run into
-# problems.
-#
-# <azarah@gentoo.org> (13 Oct 2002)
-strip-flags
-
-# gcc produce unstable binaries if compiled with a different CHOST.
-[ "${ARCH}" = "hppa" ] && export CHOST="hppa-unknown-linux-gnu"
-
-# Theoretical cross compiler support
-[ ! -n "${CCHOST}" ] && export CCHOST="${CHOST}"
-
-LOC="/usr"
-#MY_PV="`echo ${PV} | awk -F. '{ gsub(/_pre.*|_alpha.*/, ""); print $1 "." $2 }'`"
-#MY_PV_FULL="`echo ${PV} | awk '{ gsub(/_pre.*|_alpha.*/, ""); print $0 }'`"
-MY_PV="$(get_version_component_range 1-2)"
-MY_PV_FULL="$(get_version_component_range 1-3)"
-
-LIBPATH="${LOC}/lib/gcc-lib/${CCHOST}/${MY_PV_FULL}"
-BINPATH="${LOC}/${CCHOST}/gcc-bin/${MY_PV}"
-DATAPATH="${LOC}/share/gcc-data/${CCHOST}/${MY_PV}"
-# Dont install in /usr/include/g++-v3/, but in gcc internal directory.
-# We will handle /usr/include/g++-v3/ with gcc-config ...
-STDCXX_INCDIR="${LIBPATH}/include/g++-v${MY_PV/\.*/}"
-
-# ProPolice version
-PP_VER="3_3"
-PP_FVER="${PP_VER//_/.}-7"
-
-# Patch tarball support ...
-#PATCH_VER="1.0"
-PATCH_VER="1.0"
-
-# Snapshot support ...
-#SNAPSHOT="2002-08-12"
-SNAPSHOT=
-
-# Branch update support ...
-MAIN_BRANCH="${PV}" # Tarball, etc used ...
-
-#BRANCH_UPDATE="20021208"
-BRANCH_UPDATE="20040217"
-
-if [ -z "${SNAPSHOT}" ]
-then
- S="${WORKDIR}/${PN}-${MAIN_BRANCH}"
- SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/${P}/${PN}-${MAIN_BRANCH}.tar.bz2"
-
- if [ -n "${PATCH_VER}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2"
- fi
-
- if [ -n "${BRANCH_UPDATE}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2"
- fi
-else
- S="${WORKDIR}/gcc-${SNAPSHOT//-}"
- SRC_URI="ftp://sources.redhat.com/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT//-}.tar.bz2"
-fi
-if [ -n "${PP_VER}" ]
-then
- SRC_URI="${SRC_URI}
- http://www.research.ibm.com/trl/projects/security/ssp/gcc${PP_VER}/protector-${PP_FVER}.tar.gz"
-fi
-SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-manpages.tar.bz2"
-
-DESCRIPTION="The GNU Compiler Collection. Includes C/C++ and java compilers"
-HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
-
-LICENSE="GPL-2 LGPL-2.1"
-
-KEYWORDS="~x86 mips sparc amd64 -hppa ~alpha -ia64 ~ppc64 s390"
-
-# Ok, this is a hairy one again, but lets assume that we
-# are not cross compiling, than we want SLOT to only contain
-# $PV, as people upgrading to new gcc layout will not have
-# their old gcc unmerged ...
-if [ "${CHOST}" == "${CCHOST}" ]
-then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${MY_PV}"
- SLOT="3.2"
-else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
-fi
-
-# We need the later binutils for support of the new cleanup attribute.
-# 'make check' fails for about 10 tests (if I remember correctly) less
-# if we use later bison.
-# This one depends on glibc-2.3.2-r3 containing the __guard in glibc
-# we scan for Guard@@libgcc and then apply the function moving patch.
-# If using NPTL, we currently cannot however depend on glibc-2.3.2-r3,
-# else bootstap will break.
-DEPEND="virtual/libc
- !nptl? ( >=sys-libs/glibc-2.3.2-r3 )
- >=sys-devel/binutils-2.14.90.0.6-r1
- >=sys-devel/bison-1.875
- >=sys-devel/gcc-config-1.3.1
- amd64? ( multilib? ( >=app-emulation/emul-linux-x86-baselibs-1.0 ) )
- !build? ( >=sys-libs/ncurses-5.2-r2
- nls? ( sys-devel/gettext ) )"
-
-RDEPEND="virtual/libc
- !nptl? ( >=sys-libs/glibc-2.3.2-r3 )
- >=sys-devel/gcc-config-1.3.1
- >=sys-libs/zlib-1.1.4
- >=sys-apps/texinfo-4.2-r4
- !build? ( >=sys-libs/ncurses-5.2-r2 )"
-
-PDEPEND="sys-devel/gcc-config"
-
-
-chk_gcc_version() {
- # This next bit is for updating libtool linker scripts ...
- local OLD_GCC_VERSION="`gcc -dumpversion`"
- local OLD_GCC_CHOST="$(gcc -v 2>&1 | egrep '^Reading specs' |\
- sed -e 's:^.*/gcc-lib/\([^/]*\)/[0-9]\+.*$:\1:')"
-
- if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
- then
- echo "${OLD_GCC_VERSION}" > "${WORKDIR}/.oldgccversion"
- fi
-
- if [ -n "${OLD_GCC_CHOST}" ]
- then
- if [ "${CHOST}" = "${CCHOST}" -a "${OLD_GCC_CHOST}" != "${CHOST}" ]
- then
- echo "${OLD_GCC_CHOST}" > "${WORKDIR}/.oldgccchost"
- fi
- fi
-
- # Did we check the version ?
- touch "${WORKDIR}/.chkgccversion"
-}
-
-version_patch() {
- [ ! -f "$1" ] && return 1
- [ -z "$2" ] && return 1
-
- sed -e "s:@GENTOO@:$2:g" ${1} > ${T}/${1##*/}
- epatch ${T}/${1##*/}
-}
-
-glibc_have_ssp() {
- local my_libc="${ROOT}/lib/libc.so.6"
-
-# Not necessary. lib64 is a symlink to /lib.
-# case "${ARCH}" in
-# "amd64")
-# my_libc="${ROOT}/lib64/libc.so.?"
-# ;;
-# esac
-
- # Check for the glibc to have the __guard symbols
- if [ "$(readelf -s "${my_libc}" 2>/dev/null | \
- grep GLOBAL | grep OBJECT | grep '__guard')" ] && \
- [ "$(readelf -s "${my_libc}" 2>/dev/null | \
- grep GLOBAL | grep FUNC | grep '__stack_smash_handler')" ]
- then
- return 0
- else
- return 1
- fi
-}
-
-check_glibc_ssp() {
- if glibc_have_ssp
- then
- if [ -n "${GLIBC_SSP_CHECKED}" ] && \
- [ -z "$(readelf -s "${ROOT}/$(gcc-config -L)/libgcc_s.so" 2>/dev/null | \
- grep 'GLOBAL' | grep 'OBJECT' | grep '__guard')" ]
- then
- # No need to check again ...
- return 0
- fi
-
- echo
- ewarn "This sys-libs/glibc has __guard object and __stack_smash_handler functions"
- ewarn "scanning the system for binaries with __guard - this may take 5-10 minutes"
- ewarn "Please do not press ctrl-C or ctrl-Z during this period - it will continue"
- echo
- if ! bash ${FILESDIR}/scan_libgcc_linked_ssp.sh
- then
- echo
- eerror "Found binaries that are dynamically linked to the libgcc with __guard@@GCC"
- eerror "You need to compile these binaries without CFLAGS -fstack-protector/hcc -r"
- echo
- eerror "Also, you have to make sure that using ccache needs the cache to be flushed"
- eerror "wipe out /var/tmp/ccache or /root/.ccache. This will remove possible saved"
- eerror "-fstack-protector arguments that still may reside in such a compiler cache"
- echo
- eerror "When such binaries are found, gcc cannot remove libgcc propolice functions"
- eerror "leading to gcc -static -fstack-protector breaking, see gentoo bug #25299"
- echo
- einfo "To do a full scan on your system, enter this following command in a shell"
- einfo "(Please keep running and remerging broken packages until it do not report"
- einfo " any breakage anymore!):"
- echo
- einfo " # ${FILESDIR}/scan_libgcc_linked_ssp.sh"
- echo
- die "Binaries with libgcc __guard@GCC dependencies detected!"
- else
- echo
- einfo "No binaries with suspicious libgcc __guard@GCC dependencies detected"
- echo
- fi
- fi
-
- return 0
-}
-
-update_gcc_for_libc_ssp() {
- if glibc_have_ssp
- then
- einfo "Updating gcc to use SSP from glibc..."
- sed -e 's|^\(LIBGCC2_CFLAGS.*\)$|\1 -D_LIBC_PROVIDES_SSP_|' \
- -i ${S}/gcc/Makefile.in || die "Failed to update gcc!"
- fi
-}
-
-src_unpack() {
- if [ -n "${PP_VER}" ] && [ "${ARCH}" != "hppa" ]
- then
- # Check for the glibc to have the guard
- check_glibc_ssp
- fi
-
- if [ -z "${SNAPSHOT}" ]
- then
- unpack ${PN}-${MAIN_BRANCH}.tar.bz2
-
- if [ -n "${PATCH_VER}" ]
- then
- unpack ${P}-patches-${PATCH_VER}.tar.bz2
- fi
- else
- unpack gcc-${SNAPSHOT//-}.tar.bz2
- fi
-
- if [ -n "${PP_VER}" ]
- then
- unpack protector-${PP_FVER}.tar.gz
- fi
-
- cd ${S}
- # Fixup libtool to correctly generate .la files with portage
- elibtoolize --portage --shallow
-
- echo
-
- # Branch update ...
- if [ -n "${BRANCH_UPDATE}" ]
- then
- epatch ${DISTDIR}/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2
- fi
-
- # Do bulk patches included in ${P}-patches-${PATCH_VER}.tar.bz2
- if [ -n "${PATCH_VER}" ]
- then
- mkdir -p ${WORKDIR}/patch/exclude
-# mv -f ${WORKDIR}/patch/{40,41}* ${WORKDIR}/patch/exclude/
- mv -f ${WORKDIR}/patch/41* ${WORKDIR}/patch/exclude/
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- mv -f ${WORKDIR}/patch/06* ${WORKDIR}/patch/exclude/
- bzip2 -c ${FILESDIR}/gcc331_use_multilib.amd64.patch > \
- ${WORKDIR}/patch/06_amd64_gcc331-use-multilib.patch.bz2
- fi
-
- epatch ${WORKDIR}/patch
- fi
-
- if [ "${ARCH}" = "ppc" -o "${ARCH}" = "ppc64" ]
- then
- epatch ${FILESDIR}/3.3.2/gcc332-altivec-fix.patch
- fi
-
- if [ -z "${PP_VER}" ]
- then
- # Make gcc's version info specific to Gentoo
- version_patch ${FILESDIR}/3.3.3/gcc333-gentoo-branding.patch \
- "${BRANCH_UPDATE} (Gentoo Linux ${PVR})" || die "Failed Branding"
- fi
-
- if [ -n "${PP_VER}" ] && [ "${ARCH}" != "hppa" ]
- then
- # ProPolice Stack Smashing protection
- EPATCH_OPTS="${EPATCH_OPTS} ${WORKDIR}/protector.dif" \
- epatch ${FILESDIR}/3.3.1/gcc331-pp-fixup.patch
- EPATCH_OPTS="${EPATCH_OPTS} ${WORKDIR}/protector.dif" \
- epatch ${FILESDIR}/3.3.3/gcc333-ssp-3.3_7-fixup.patch
- epatch ${WORKDIR}/protector.dif
- cp ${WORKDIR}/protector.c ${WORKDIR}/${P}/gcc/ || die "protector.c not found"
- cp ${WORKDIR}/protector.h ${WORKDIR}/${P}/gcc/ || die "protector.h not found"
- version_patch ${FILESDIR}/3.3.3/gcc333-gentoo-branding.patch \
- "${BRANCH_UPDATE} (Gentoo Linux ${PVR}, propolice-${PP_FVER})" \
- || die "Failed Branding"
-
- # Update build to use SSP in glibc if glibc have it ...
- update_gcc_for_libc_ssp
- fi
-
- # Install our pre generated manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- cd ${S}; unpack ${P}-manpages.tar.bz2
- fi
-
- # Misdesign in libstdc++ (Redhat)
- cp -a ${S}/libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
-
- # disable --as-needed from being compiled into gcc specs
- # natively when using >=sys-devel/binutils-2.15.90.0.3 this is
- # done to keep our gcc backwards compatible with binutils.
- # gcc 3.4.1 cvs has patches that need back porting..
- # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14992 (May 3 2004)
- sed -i -e s/HAVE_LD_AS_NEEDED/USE_LD_AS_NEEDED/g ${S}/gcc/config.in
-
- cd ${S}; ./contrib/gcc_update --touch &> /dev/null
-}
-
-src_compile() {
-
- local myconf=
- local gcc_lang=
-
- if ! use build
- then
- myconf="${myconf} --enable-shared"
- gcc_lang="c,c++,f77,objc"
- else
- gcc_lang="c"
- fi
- if ! use nls || use build
- then
- myconf="${myconf} --disable-nls"
- else
- myconf="${myconf} --enable-nls --without-included-gettext"
- fi
- if use java && use gcj && ! use build
- then
- gcc_lang="${gcc_lang},java"
- fi
-
- # Enable building of the gcj Java AWT & Swing X11 backend
- # if we have X as a use flag and are not in a build stage.
- # X11 support is still very experimental but enabling it is
- # quite innocuous... [No, gcc is *not* linked to X11...]
- # <dragon@gentoo.org> (15 May 2003)
- if use java && use gcj && use X && ! use build && [ -f /usr/X11R6/include/X11/Xlib.h ]
- then
- myconf="${myconf} --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
- myconf="${myconf} --enable-interpreter --enable-java-awt=xlib --with-x"
- fi
-
- # Multilib not yet supported
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- einfo "WARNING: Multilib support enabled. This is still experimental."
- myconf="${myconf} --enable-multilib"
- else
- if [ "${ARCH}" = "amd64" ]
- then
- einfo "WARNING: Multilib not enabled. You will not be able to build 32bit binaries."
- fi
- myconf="${myconf} --disable-multilib"
- fi
-
- # Fix linking problem with c++ apps which where linkedi
- # agains a 3.2.2 libgcc
- [ "${ARCH}" = "hppa" ] && myconf="${myconf} --enable-sjlj-exceptions"
-
- # In general gcc does not like optimization, and add -O2 where
- export CFLAGS="$(echo "${CFLAGS}" | sed -e 's|-O[0-9s]\?|-O2|g')"
- einfo "CFLAGS=\"${CFLAGS}\""
- export CXXFLAGS="$(echo "${CXXFLAGS}" | sed -e 's|-O[0-9s]\?|-O2|g')"
- einfo "CXXFLAGS=\"${CXXFLAGS}\""
- export GCJFLAGS="$(echo "${GCJFLAGS}" | sed -e 's|-O[0-9s]\?|-O2|g')"
- einfo "GCJFLAGS=\"${GCJFLAGS}\""
-
- # Build in a separate build tree
- mkdir -p ${WORKDIR}/build
- cd ${WORKDIR}/build
-
- einfo "Configuring GCC..."
- addwrite "/dev/zero"
- ${S}/configure --prefix=${LOC} \
- --bindir=${BINPATH} \
- --includedir=${LIBPATH}/include \
- --datadir=${DATAPATH} \
- --mandir=${DATAPATH}/man \
- --infodir=${DATAPATH}/info \
- --enable-shared \
- --host=${CHOST} \
- --target=${CCHOST} \
- --with-system-zlib \
- --enable-languages=${gcc_lang} \
- --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=${STDCXX_INCDIR} \
- --with-local-prefix=${LOC}/local \
- ${myconf} || die
-
- touch ${S}/gcc/c-gperf.h
-
- # Do not make manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- find ${S} -name '*.[17]' -exec touch {} \; || :
- fi
-
- # Setup -j in MAKEOPTS
- get_number_of_jobs
-
- einfo "Building GCC..."
- # Only build it static if we are just building the C frontend, else
- # a lot of things break because there are not libstdc++.so ....
- if use static && [ "${gcc_lang}" = "c" ]
- then
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake LDFLAGS="-static" bootstrap \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
- # Above FLAGS optimize and speedup build, thanks
- # to Jeff Garzik <jgarzik@mandrakesoft.com>
- else
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake bootstrap-lean \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
-
- fi
-}
-
-src_install() {
- local x=
-
- # Do allow symlinks in ${LOC}/lib/gcc-lib/${CHOST}/${PV}/include as
- # this can break the build.
- for x in ${WORKDIR}/build/gcc/include/*
- do
- if [ -L ${x} ]
- then
- rm -f ${x}
- continue
- fi
- done
- # Remove generated headers, as they can cause things to break
- # (ncurses, openssl, etc).
- for x in `find ${WORKDIR}/build/gcc/include/ -name '*.h'`
- do
- if grep -q 'It has been auto-edited by fixincludes from' ${x}
- then
- rm -f ${x}
- fi
- done
-
- einfo "Installing GCC..."
- # Do the 'make install' from the build directory
- cd ${WORKDIR}/build
- S="${WORKDIR}/build" \
- make prefix=${LOC} \
- bindir=${BINPATH} \
- includedir=${LIBPATH}/include \
- datadir=${DATAPATH} \
- mandir=${DATAPATH}/man \
- infodir=${DATAPATH}/info \
- DESTDIR="${D}" \
- LIBPATH="${LIBPATH}" \
- install || die
-
- [ -r ${D}${BINPATH}/gcc ] || die "gcc not found in ${D}"
-
- dodir /lib /usr/bin
- dodir /etc/env.d/gcc
- echo "PATH=\"${BINPATH}\"" > ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "ROOTPATH=\"${BINPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # amd64 is a bit unique because of multilib. Add some other paths
- echo "LDPATH=\"${LIBPATH}:${LIBPATH}/32:${LIBPATH}/../lib64:${LIBPATH}/../lib32\"" >> \
- ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- else
- echo "LDPATH=\"${LIBPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- fi
- echo "MANPATH=\"${DATAPATH}/man\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "INFOPATH=\"${DATAPATH}/info\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "STDCXX_INCDIR=\"${STDCXX_INCDIR##*/}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- # Also set CC and CXX
- echo "CC=\"gcc\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "CXX=\"g++\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- # Make sure we do not check glibc for SSP again, as we did already
- if glibc_have_ssp || \
- [ -f "${ROOT}/etc/env.d/99glibc_ssp" ]
- then
- echo "GLIBC_SSP_CHECKED=1" > ${D}/etc/env.d/99glibc_ssp
- fi
-
- # Make sure we dont have stuff lying around that
- # can nuke multiple versions of gcc
- if ! use build
- then
- cd ${D}${LIBPATH}
-
- # Tell libtool files where real libraries are
- for x in ${D}${LOC}/lib/*.la ${D}${LIBPATH}/../*.la
- do
- if [ -f "${x}" ]
- then
- sed -i -e "s:/usr/lib:${LIBPATH}:" ${x}
- mv ${x} ${D}${LIBPATH}
- fi
- done
-
- # Move all the libraries to version specific libdir.
- for x in ${D}${LOC}/lib/*.{so,a}* ${D}${LIBPATH}/../*.{so,a}*
- do
- [ -f "${x}" -o -L "${x}" ] && mv -f ${x} ${D}${LIBPATH}
- done
-
- # Move Java headers to compiler-specific dir
- for x in ${D}${LOC}/include/gc*.h ${D}${LOC}/include/j*.h
- do
- [ -f "${x}" ] && mv -f ${x} ${D}${LIBPATH}/include/
- done
- for x in gcj gnu java javax org
- do
- if [ -d "${D}${LOC}/include/${x}" ]
- then
- dodir /${LIBPATH}/include/${x}
- mv -f ${D}${LOC}/include/${x}/* ${D}${LIBPATH}/include/${x}/
- rm -rf ${D}${LOC}/include/${x}
- fi
- done
-
- if [ -d "${D}${LOC}/lib/security" ]
- then
- dodir /${LIBPATH}/security
- mv -f ${D}${LOC}/lib/security/* ${D}${LIBPATH}/security
- rm -rf ${D}${LOC}/lib/security
- fi
-
- # Move libgcj.spec to compiler-specific directories
- [ -f "${D}${LOC}/lib/libgcj.spec" ] && \
- mv -f ${D}${LOC}/lib/libgcj.spec ${D}${LIBPATH}/libgcj.spec
-
- # Rename jar because it could clash with Kaffe's jar if this gcc is
- # primary compiler (aka don't have the -<version> extension)
- cd ${D}${LOC}/${CCHOST}/gcc-bin/${MY_PV}
- [ -f jar ] && mv -f jar gcj-jar
-
- # Move <cxxabi.h> to compiler-specific directories
- [ -f "${D}${STDCXX_INCDIR}/cxxabi.h" ] && \
- mv -f ${D}${STDCXX_INCDIR}/cxxabi.h ${D}${LIBPATH}/include/
-
- # These should be symlinks
- cd ${D}${BINPATH}
- for x in gcc g++ c++ g77 gcj
- do
- rm -f ${CCHOST}-${x}
- [ -f "${x}" ] && ln -sf ${x} ${CCHOST}-${x}
-
- if [ -f "${CCHOST}-${x}-${PV}" ]
- then
- rm -f ${CCHOST}-${x}-${PV}
- ln -sf ${x} ${CCHOST}-${x}-${PV}
- fi
- done
- fi
-
- # This one comes with binutils
- if [ -f "${D}${LOC}/lib/libiberty.a" ]
- then
- rm -f ${D}${LOC}/lib/libiberty.a
- fi
-
- cd ${S}
- if ! use build
- then
- cd ${S}
- docinto /${CCHOST}
- dodoc COPYING COPYING.LIB ChangeLog* FAQ MAINTAINERS README
- docinto ${CCHOST}/html
- dohtml *.html
- cd ${S}/boehm-gc
- docinto ${CCHOST}/boehm-gc
- dodoc ChangeLog doc/{README*,barrett_diagram}
- docinto ${CCHOST}/boehm-gc/html
- dohtml doc/*.html
- cd ${S}/gcc
- docinto ${CCHOST}/gcc
- dodoc ChangeLog* FSFChangeLog* LANGUAGES NEWS ONEWS README* SERVICE
- cd ${S}/libf2c
- docinto ${CCHOST}/libf2c
- dodoc ChangeLog* README TODO *.netlib
- cd ${S}/libffi
- docinto ${CCHOST}/libffi
- dodoc ChangeLog* LICENSE README
- cd ${S}/libiberty
- docinto ${CCHOST}/libiberty
- dodoc ChangeLog* COPYING.LIB README
- cd ${S}/libobjc
- docinto ${CCHOST}/libobjc
- dodoc ChangeLog* README* THREADS*
- cd ${S}/libstdc++-v3
- docinto ${CCHOST}/libstdc++-v3
- dodoc ChangeLog* README
- docinto ${CCHOST}/libstdc++-v3/html
- dohtml -r -a css,diff,html,txt,xml docs/html/*
- cp -f docs/html/17_intro/[A-Z]* \
- ${D}/usr/share/doc/${PF}/${DOCDESTTREE}/17_intro/
-
- if use java && use gcj
- then
- cd ${S}/fastjar
- docinto ${CCHOST}/fastjar
- dodoc AUTHORS CHANGES COPYING ChangeLog* NEWS README
- cd ${S}/libjava
- docinto ${CCHOST}/libjava
- dodoc ChangeLog* COPYING HACKING LIBGCJ_LICENSE NEWS README THANKS
- fi
-
- prepman ${DATAPATH}
- prepinfo ${DATAPATH}
- else
- rm -rf ${D}/usr/share/{man,info}
- rm -rf ${D}${DATAPATH}/{man,info}
- fi
-
- # Rather install the script, else portage with changing $FILESDIR
- # between binary and source package borks things ....
- insinto /lib/rcscripts/awk
- doins ${FILESDIR}/awk/fixlafiles.awk
- exeinto /sbin
- doexe ${FILESDIR}/fix_libtool_files.sh
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # If using multilib, GCC has a bug, where it doesn't know where to find
- # -lgcc_s when linking while compiling with g++ . ${LIBPATH} is in
- # it's path though, so ln the 64bit and 32bit versions of -lgcc_s
- # to that directory.
- ln -sf ${LIBPATH}/../lib64/libgcc_s.so ${D}/${LIBPATH}/libgcc_s.so
- ln -sf ${LIBPATH}/../lib32/libgcc_s_32.so ${D}/${LIBPATH}/libgcc_s_32.so
- fi
-}
-
-pkg_preinst() {
-
- if [ ! -f "${WORKDIR}/.chkgccversion" ]
- then
- chk_gcc_version
- fi
-
- # Make again sure that the linker "should" be able to locate
- # libstdc++.so ...
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # Can't always find libgcc_s.so.1, make it find it
- export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}"
- else
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
- fi
- ${ROOT}/sbin/ldconfig
-}
-
-pkg_postinst() {
-
- if use multilib && [ "${ARCH}" = "amd64" ]
- then
- # Can't always find libgcc_s.so.1, make it find it
- export LD_LIBRARY_PATH="${LIBPATH}:${LIBPATH}/../lib64:${LIBPATH}/../lib32:${LD_LIBRARY_PATH}"
- else
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
- fi
- if [ "${ROOT}" = "/" -a "${CHOST}" = "${CCHOST}" ]
- then
- gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL}
- fi
-
- # Update libtool linker scripts to reference new gcc version ...
- if [ "${ROOT}" = "/" ] && \
- [ -f "${WORKDIR}/.oldgccversion" -o -f "${WORKDIR}/.oldgccchost" ]
- then
- local OLD_GCC_VERSION=
- local OLD_GCC_CHOST=
-
- if [ -f "${WORKDIR}/.oldgccversion" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccversion")" ]
- then
- OLD_GCC_VERSION="$(cat "${WORKDIR}/.oldgccversion")"
- else
- OLD_GCC_VERSION="${MY_PV_FULL}"
- fi
-
- if [ -f "${WORKDIR}/.oldgccchost" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccchost")" ]
- then
- OLD_GCC_CHOST="--oldarch $(cat "${WORKDIR}/.oldgccchost")"
- fi
-
- /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION} ${OLD_GCC_CHOST}
- fi
-
- # http://dev.gentoo.org/~pappy/hardened-gcc/docs/etdyn-ssp.html
- if has_version '>=sys-devel/hardened-gcc-1.2'
- then
- [ "${ROOT}" = "/" ] && hardened-gcc -A
- fi
-}
-
diff --git a/sys-devel/gcc/gcc-3.3.4-r1.ebuild b/sys-devel/gcc/gcc-3.3.4-r1.ebuild
index abda122c16f9..aedb6a0fa3fc 100644
--- a/sys-devel/gcc/gcc-3.3.4-r1.ebuild
+++ b/sys-devel/gcc/gcc-3.3.4-r1.ebuild
@@ -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/sys-devel/gcc/gcc-3.3.4-r1.ebuild,v 1.19 2004/11/08 00:27:48 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.4-r1.ebuild,v 1.20 2004/11/21 16:58:56 lv Exp $
inherit eutils flag-o-matic libtool gnuconfig versionator
@@ -110,13 +110,11 @@ IUSE="static nls bootstrap build X multilib gcj fortran objc pic hardened uclibc
# their old gcc unmerged ...
if [ "${CHOST}" == "${CCHOST}" ]
then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${MY_PV}"
- SLOT="3.2"
+ SLOT="3.3"
else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
+ SLOT="${CCHOST}-3.3"
fi
# We need the later binutils for support of the new cleanup attribute.
diff --git a/sys-devel/gcc/gcc-3.3.4-r2.ebuild b/sys-devel/gcc/gcc-3.3.4-r2.ebuild
index deedc9c04c19..8125b3ce4617 100644
--- a/sys-devel/gcc/gcc-3.3.4-r2.ebuild
+++ b/sys-devel/gcc/gcc-3.3.4-r2.ebuild
@@ -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/sys-devel/gcc/gcc-3.3.4-r2.ebuild,v 1.6 2004/11/17 15:26:34 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.4-r2.ebuild,v 1.7 2004/11/21 16:58:56 lv Exp $
inherit eutils flag-o-matic libtool gnuconfig versionator
@@ -110,13 +110,11 @@ IUSE="static nls bootstrap build X multilib gcj fortran objc pic hardened uclibc
# their old gcc unmerged ...
if [ "${CHOST}" == "${CCHOST}" ]
then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${MY_PV}"
- SLOT="3.2"
+ SLOT="3.3"
else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
+ SLOT="${CCHOST}-3.3"
fi
# We need the later binutils for support of the new cleanup attribute.
diff --git a/sys-devel/gcc/gcc-3.3.ebuild b/sys-devel/gcc/gcc-3.3.ebuild
deleted file mode 100644
index dbdf0a60b473..000000000000
--- a/sys-devel/gcc/gcc-3.3.ebuild
+++ /dev/null
@@ -1,596 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.ebuild,v 1.18 2004/10/06 22:18:48 lv Exp $
-
-IUSE="static nls bootstrap java build X"
-
-inherit eutils flag-o-matic libtool versionator
-
-# Compile problems with these (bug #6641 among others)...
-#filter-flags "-fno-exceptions -fomit-frame-pointer -fforce-addr"
-
-# Recently there has been a lot of stability problem in Gentoo-land. Many
-# things can be the cause to this, but I believe that it is due to gcc3
-# still having issues with optimizations, or with it not filtering bad
-# combinations (protecting the user maybe from himeself) yet.
-#
-# This can clearly be seen in large builds like glibc, where too aggressive
-# CFLAGS cause the tests to fail miserbly.
-#
-# Quote from Nick Jones <carpaski@gentoo.org>, who in my opinion
-# knows what he is talking about:
-#
-# People really shouldn't force code-specific options on... It's a
-# bad idea. The -march options aren't just to look pretty. They enable
-# options that are sensible (and include sse,mmx,3dnow when apropriate).
-#
-# The next command strips CFLAGS and CXXFLAGS from nearly all flags. If
-# you do not like it, comment it, but do not bugreport if you run into
-# problems.
-#
-# <azarah@gentoo.org> (13 Oct 2002)
-strip-flags
-
-# Theoretical cross compiler support
-[ ! -n "${CCHOST}" ] && export CCHOST="${CHOST}"
-
-LOC="/usr"
-#MY_PV="`echo ${PV} | awk -F. '{ gsub(/_pre.*|_alpha.*/, ""); print $1 "." $2 }'`"
-#MY_PV_FULL="`echo ${PV} | awk '{ gsub(/_pre.*|_alpha.*/, ""); print $0 }'`"
-MY_PV="$(get_version_component_range 1-2)"
-MY_PV_FULL="$(get_version_component_range 1-3)"
-
-LIBPATH="${LOC}/lib/gcc-lib/${CCHOST}/${MY_PV_FULL}"
-BINPATH="${LOC}/${CCHOST}/gcc-bin/${MY_PV}"
-DATAPATH="${LOC}/share/gcc-data/${CCHOST}/${MY_PV}"
-# Dont install in /usr/include/g++-v3/, but in gcc internal directory.
-# We will handle /usr/include/g++-v3/ with gcc-config ...
-STDCXX_INCDIR="${LIBPATH}/include/g++-v${MY_PV/\.*/}"
-
-# ProPolice version
-#PP_VER="3_2_2"
-PP_VER=
-#PP_FVER="${PP_VER//_/.}-7"
-PP_FVER=
-
-# Patch tarball support ...
-#PATCH_VER="1.0"
-PATCH_VER="1.1"
-
-# Snapshot support ...
-#SNAPSHOT="2002-08-12"
-SNAPSHOT=
-
-# Branch update support ...
-MAIN_BRANCH="${PV}" # Tarball, etc used ...
-
-#BRANCH_UPDATE="20021208"
-BRANCH_UPDATE=
-
-if [ -z "${SNAPSHOT}" ]
-then
- S="${WORKDIR}/${PN}-${MAIN_BRANCH}"
- SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/${P}/${PN}-${MAIN_BRANCH}.tar.bz2"
-
- if [ -n "${PATCH_VER}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2"
- fi
-
- if [ -n "${BRANCH_UPDATE}" ]
- then
- SRC_URI="${SRC_URI}
- mirror://gentoo/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2"
- fi
-else
- S="${WORKDIR}/gcc-${SNAPSHOT//-}"
- SRC_URI="ftp://sources.redhat.com/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT//-}.tar.bz2"
-fi
-if [ -n "${PP_VER}" ]
-then
- SRC_URI="${SRC_URI}
- http://www.trl.ibm.com/projects/security/ssp/gcc${PP_VER}/protector-${PP_FVER}.tar.gz"
-fi
-SRC_URI="${SRC_URI}
- mirror://gentoo/${P}-athlon-hammer-branch-20030515.patch.bz2
- mirror://gentoo/${P}-manpages.tar.bz2"
-
-DESCRIPTION="The GNU Compiler Collection. Includes C/C++ and java compilers"
-HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
-
-LICENSE="GPL-2 LGPL-2.1"
-KEYWORDS="-* amd64 ~ia64"
-
-# Ok, this is a hairy one again, but lets assume that we
-# are not cross compiling, than we want SLOT to only contain
-# $PV, as people upgrading to new gcc layout will not have
-# their old gcc unmerged ...
-if [ "${CHOST}" == "${CCHOST}" ]
-then
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${MY_PV}"
- SLOT="3.2"
-else
-# GCC-3.3 is supposed to be binary compatible with 3.2..
-# SLOT="${CCHOST}-${MY_PV}"
- SLOT="${CCHOST}-3.2"
-fi
-
-DEPEND="virtual/libc
- mips? ( >=sys-devel/binutils-2.13.90.0.16 )
- !mips? ( >=sys-devel/binutils-2.13.90.0.18 )
- >=sys-devel/gcc-config-1.3.1
- !build? ( >=sys-libs/ncurses-5.2-r2
- nls? ( sys-devel/gettext ) )"
-
-RDEPEND="virtual/libc
- >=sys-devel/gcc-config-1.3.1
- >=sys-libs/zlib-1.1.4
- >=sys-apps/texinfo-4.2-r4
- !build? ( >=sys-libs/ncurses-5.2-r2 )"
-
-PDEPEND="sys-devel/gcc-config"
-
-
-chk_gcc_version() {
- # This next bit is for updating libtool linker scripts ...
- local OLD_GCC_VERSION="`gcc -dumpversion`"
- local OLD_GCC_CHOST="$(gcc -v 2>&1 | egrep '^Reading specs' |\
- sed -e 's:^.*/gcc-lib/\([^/]*\)/[0-9]\+.*$:\1:')"
-
- if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
- then
- echo "${OLD_GCC_VERSION}" > "${WORKDIR}/.oldgccversion"
- fi
-
- if [ -n "${OLD_GCC_CHOST}" ]
- then
- if [ "${CHOST}" = "${CCHOST}" -a "${OLD_GCC_CHOST}" != "${CHOST}" ]
- then
- echo "${OLD_GCC_CHOST}" > "${WORKDIR}/.oldgccchost"
- fi
- fi
-
- # Did we check the version ?
- touch "${WORKDIR}/.chkgccversion"
-}
-
-version_patch() {
- [ ! -f "$1" ] && return 1
-
- sed -e "s:@PV@:${PVR}:g" ${1} > ${T}/${1##*/}
- epatch ${T}/${1##*/}
-}
-
-src_unpack() {
- if [ -z "${SNAPSHOT}" ]
- then
- unpack ${PN}-${MAIN_BRANCH}.tar.bz2
-
- if [ -n "${PATCH_VER}" ]
- then
- unpack ${P}-patches-${PATCH_VER}.tar.bz2
- fi
- else
- unpack gcc-${SNAPSHOT//-}.tar.bz2
- fi
-
- if [ -n "${PP_VER}" ]
- then
- unpack protector-${PP_FVER}.tar.gz
- fi
-
- cd ${S}
- # Fixup libtool to correctly generate .la files with portage
- elibtoolize --portage --shallow
-
- echo
-
- # Branch update ...
- if [ -n "${BRANCH_UPDATE}" ]
- then
- epatch ${DISTDIR}/${PN}-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2
- fi
-
- # Merge Athlon/X86_64 Branch
- # This patch is based upon the differences in gcc cvs between
- # hammer-3_3-branch and gcc-3_3-branches and contains many
- # enhancements for regular Athlons as well as support for the
- # new Opteron chip. Also included is a backport of the gcc-3.4
- # DFA schedular, which should provide further enhancements for
- # all platforms. See ChangeLog.hammer for more info.
- # <dragon@gentoo.org> (15 May 2003)
- epatch ${DISTDIR}/${P}-athlon-hammer-branch-20030515.patch.bz2
-
- # Do bulk patches included in ${P}-patches-${PATCH_VER}.tar.bz2
- if [ -n "${PATCH_VER}" ]
- then
- epatch ${WORKDIR}/patch
- fi
-
- # Make gcc's version info specific to Gentoo
- version_patch ${FILESDIR}/3.3/gcc33-gentoo-branding.patch
-
- if [ -n "${PP_VER}" ]
- then
- # ProPolice Stack Smashing protection - protector-3.2.2-7
- epatch ${WORKDIR}/protector.dif
- cp ${WORKDIR}/protector.c ${WORKDIR}/${P}/gcc/ || die "protector.c not found"
- cp ${WORKDIR}/protector.h ${WORKDIR}/${P}/gcc/ || die "protector.h not found"
- version_patch ${FILESDIR}/3.3/gcc33-propolice-version.patch
- fi
-
- # Patches from Mandrake/Suse ...
- epatch ${FILESDIR}/3.2.3/gcc32-mklibgcc-serialize-crtfiles.patch
-
- # Get gcc to decreases the number of times the collector has to be run
- # by increasing its memory workspace, bug #16548.
- #
- # Updated for 3.3, change only one const now...
- # <dragon@gentoo.org> (15 May 2003)
-# epatch ${FILESDIR}/3.3/gcc33-ggc_page-speedup.patch
-
- # Patches from debian-arm
- if use arm
- then
-# epatch ${FILESDIR}/3.2.1/gcc32-arm-disable-mathf.patch
- epatch ${FILESDIR}/3.2.1/gcc32-arm-reload1-fix.patch
- fi
-
- # Install our pre generated manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- cd ${S}; unpack ${P}-manpages.tar.bz2
- fi
-
- if [ "$ARCH" = "amd64" ]
- then
- epatch ${FILESDIR}/3.3/gcc33-no-multilib-amd64.patch
- fi
-}
-
-src_compile() {
-
- local myconf=
- local gcc_lang=
-
- if ! use build
- then
- myconf="${myconf} --enable-shared"
- gcc_lang="c,c++,f77,objc"
- else
- gcc_lang="c"
- fi
- if ! use nls || use build
- then
- myconf="${myconf} --disable-nls"
- else
- myconf="${myconf} --enable-nls --without-included-gettext"
- fi
- if use java && ! use build
- then
- gcc_lang="${gcc_lang},java"
- fi
-
- # Enable building of the gcj Java AWT & Swing X11 backend
- # if we have X as a use flag and are not in a build stage.
- # X11 support is still very experimental but enabling it is
- # quite innocuous... [No, gcc is *not* linked to X11...]
- # <dragon@gentoo.org> (15 May 2003)
- if use java && use X && ! use build && [ -f /usr/X11R6/include/X11/Xlib.h ]
- then
- myconf="${myconf} --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
- myconf="${myconf} --enable-interpreter --enable-java-awt=xlib --with-x"
- fi
-
- # Multilib not yet supported
- myconf="${myconf} --disable-multilib"
-
- # In general gcc does not like optimization, and add -O2 where
- # it is safe. This is especially true for gcc-3.3 ...
- export CFLAGS="${CFLAGS/-O?/-O2}"
- export CXXFLAGS="${CXXFLAGS/-O?/-O2}"
- export GCJFLAGS="${CFLAGS/-O?/-O2}"
-
- # Build in a separate build tree
- mkdir -p ${WORKDIR}/build
- cd ${WORKDIR}/build
-
- einfo "Configuring GCC..."
- addwrite "/dev/zero"
- ${S}/configure --prefix=${LOC} \
- --bindir=${BINPATH} \
- --includedir=${LIBPATH}/include \
- --datadir=${DATAPATH} \
- --mandir=${DATAPATH}/man \
- --infodir=${DATAPATH}/info \
- --enable-shared \
- --host=${CHOST} \
- --target=${CCHOST} \
- --with-system-zlib \
- --enable-languages=${gcc_lang} \
- --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=${STDCXX_INCDIR} \
- --with-local-prefix=${LOC}/local \
- ${myconf} || die
-
- touch ${S}/gcc/c-gperf.h
-
- # Do not make manpages if we do not have perl ...
- if [ ! -x /usr/bin/perl ]
- then
- find ${S} -name '*.[17]' -exec touch {} \; || :
- fi
-
- # Setup -j in MAKEOPTS
- get_number_of_jobs
-
- einfo "Building GCC..."
- # Only build it static if we are just building the C frontend, else
- # a lot of things break because there are not libstdc++.so ....
- if use static && [ "${gcc_lang}" = "c" ]
- then
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake LDFLAGS="-static" bootstrap \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
- # Above FLAGS optimize and speedup build, thanks
- # to Jeff Garzik <jgarzik@mandrakesoft.com>
- else
- # Fix for our libtool-portage.patch
- S="${WORKDIR}/build" \
- emake bootstrap-lean \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die
-
- fi
-}
-
-src_install() {
- # Do allow symlinks in ${LOC}/lib/gcc-lib/${CHOST}/${PV}/include as
- # this can break the build.
- for x in cd ${WORKDIR}/build/gcc/include/*
- do
- if [ -L ${x} ]
- then
- rm -f ${x}
- fi
- done
-
- einfo "Installing GCC..."
- # Do the 'make install' from the build directory
- cd ${WORKDIR}/build
- S="${WORKDIR}/build" \
- make prefix=${LOC} \
- bindir=${BINPATH} \
- includedir=${LIBPATH}/include \
- datadir=${DATAPATH} \
- mandir=${DATAPATH}/man \
- infodir=${DATAPATH}/info \
- DESTDIR="${D}" \
- LIBPATH="${LIBPATH}" \
- install || die
-
- [ -r ${D}${BINPATH}/gcc ] || die "gcc not found in ${D}"
-
- dodir /lib /usr/bin
- dodir /etc/env.d/gcc
- echo "PATH=\"${BINPATH}\"" > ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "ROOTPATH=\"${BINPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "LDPATH=\"${LIBPATH}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "MANPATH=\"${DATAPATH}/man\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "INFOPATH=\"${DATAPATH}/info\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "STDCXX_INCDIR=\"${STDCXX_INCDIR##*/}\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- # Also set CC and CXX
- echo "CC=\"gcc\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
- echo "CXX=\"g++\"" >> ${D}/etc/env.d/gcc/${CCHOST}-${MY_PV_FULL}
-
-
- # Make sure we dont have stuff lying around that
- # can nuke multiple versions of gcc
- if ! use build
- then
- cd ${D}${LIBPATH}
-
- # Tell libtool files where real libraries are
- for LA in ${D}${LOC}/lib/*.la ${D}${LIBPATH}/../*.la
- do
- if [ -f ${LA} ]
- then
- sed -e "s:/usr/lib:${LIBPATH}:" ${LA} > ${LA}.hacked
- mv ${LA}.hacked ${LA}
- mv ${LA} ${D}${LIBPATH}
- fi
- done
-
- # Move all the libraries to version specific libdir.
- for x in ${D}${LOC}/lib/*.{so,a}* ${D}${LIBPATH}/../*.{so,a}*
- do
- [ -f ${x} -o -L ${x} ] && mv -f ${x} ${D}${LIBPATH}
- done
-
- # Move Java headers to compiler-specific dir
- for x in ${D}${LOC}/include/gc*.h ${D}${LOC}/include/j*.h
- do
- [ -f ${x} ] && mv -f ${x} ${D}${LIBPATH}/include/
- done
- for x in gcj gnu java javax org
- do
- if [ -d ${D}${LOC}/include/${x} ]
- then
- dodir /${LIBPATH}/include/${x}
- mv -f ${D}${LOC}/include/${x}/* ${D}${LIBPATH}/include/${x}/
- rm -rf ${D}${LOC}/include/${x}
- fi
- done
-
- if [ -d ${D}${LOC}/lib/security ]
- then
- dodir /${LIBPATH}/security
- mv -f ${D}${LOC}/lib/security/* ${D}${LIBPATH}/security
- rm -rf ${D}${LOC}/lib/security
- fi
-
- # Move libgcj.spec to compiler-specific directories
- [ -f ${D}${LOC}/lib/libgcj.spec ] && \
- mv -f ${D}${LOC}/lib/libgcj.spec ${D}${LIBPATH}/libgcj.spec
-
- # Rename jar because it could clash with Kaffe's jar if this gcc is
- # primary compiler (aka don't have the -<version> extension)
- cd ${D}${LOC}/${CCHOST}/gcc-bin/${MY_PV}
- [ -f jar ] && mv -f jar gcj-jar
-
- # Move <cxxabi.h> to compiler-specific directories
- [ -f ${D}${STDCXX_INCDIR}/cxxabi.h ] && \
- mv -f ${D}${STDCXX_INCDIR}/cxxabi.h ${D}${LIBPATH}/include/
-
- # These should be symlinks
- cd ${D}${BINPATH}
- for x in gcc g++ c++ g77 gcj
- do
- rm -f ${CCHOST}-${x}
- [ -f ${x} ] && ln -sf ${x} ${CCHOST}-${x}
-
- if [ -f ${CCHOST}-${x}-${PV} ]
- then
- rm -f ${CCHOST}-${x}-${PV}
- ln -sf ${x} ${CCHOST}-${x}-${PV}
- fi
- done
- fi
-
- # This one comes with binutils
- if [ -f ${D}${LOC}/lib/libiberty.a ]
- then
- rm -f ${D}${LOC}/lib/libiberty.a
- fi
-
- cd ${S}
- if ! use build
- then
- cd ${S}
- docinto /${CCHOST}
- dodoc COPYING COPYING.LIB ChangeLog* FAQ GNATS MAINTAINERS README
- docinto ${CCHOST}/html
- dohtml *.html
- cd ${S}/boehm-gc
- docinto ${CCHOST}/boehm-gc
- dodoc ChangeLog doc/{README*,barrett_diagram}
- docinto ${CCHOST}/boehm-gc/html
- dohtml doc/*.html
- cd ${S}/gcc
- docinto ${CCHOST}/gcc
- dodoc ChangeLog* FSFChangeLog* LANGUAGES NEWS ONEWS README* SERVICE
- cd ${S}/libf2c
- docinto ${CCHOST}/libf2c
- dodoc ChangeLog* README TODO *.netlib
- cd ${S}/libffi
- docinto ${CCHOST}/libffi
- dodoc ChangeLog* LICENSE README
- cd ${S}/libiberty
- docinto ${CCHOST}/libiberty
- dodoc ChangeLog* COPYING.LIB README
- cd ${S}/libobjc
- docinto ${CCHOST}/libobjc
- dodoc ChangeLog* README* THREADS*
- cd ${S}/libstdc++-v3
- docinto ${CCHOST}/libstdc++-v3
- dodoc ChangeLog* README
- docinto ${CCHOST}/libstdc++-v3/html
- dohtml -r -a css,diff,html,txt,xml docs/html/*
- cp -f docs/html/17_intro/[A-Z]* \
- ${D}/usr/share/doc/${PF}/${DOCDESTTREE}/17_intro/
-
- if use java
- then
- cd ${S}/fastjar
- docinto ${CCHOST}/fastjar
- dodoc AUTHORS CHANGES COPYING ChangeLog* NEWS README
- cd ${S}/libjava
- docinto ${CCHOST}/libjava
- dodoc ChangeLog* COPYING HACKING LIBGCJ_LICENSE NEWS README THANKS
- fi
-
- prepman ${DATAPATH}
- prepinfo ${DATAPATH}
- else
- rm -rf ${D}/usr/share/{man,info}
- rm -rf ${D}${DATAPATH}/{man,info}
- fi
-
- # Rather install the script, else portage with changing $FILESDIR
- # between binary and source package borks things ....
- insinto /lib/rcscripts/awk
- doins ${FILESDIR}/awk/fixlafiles.awk
- exeinto /sbin
- doexe ${FILESDIR}/fix_libtool_files.sh
-
- # Fix ncurses b0rking
- find ${D}/ -name '*curses.h' -exec rm -f {} \;
-
-}
-
-pkg_preinst() {
-
- if [ ! -f "${WORKDIR}/.chkgccversion" ]
- then
- chk_gcc_version
- fi
-
- # Make again sure that the linker "should" be able to locate
- # libstdc++.so ...
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
- ${ROOT}/sbin/ldconfig
-}
-
-pkg_postinst() {
-
- export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
-
- if [ "${ROOT}" = "/" -a "${CHOST}" = "${CCHOST}" ]
- then
- gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL}
- fi
-
- # Update libtool linker scripts to reference new gcc version ...
- if [ "${ROOT}" = "/" ] && \
- [ -f "${WORKDIR}/.oldgccversion" -o -f "${WORKDIR}/.oldgccchost" ]
- then
- local OLD_GCC_VERSION=
- local OLD_GCC_CHOST=
-
- if [ -f "${WORKDIR}/.oldgccversion" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccversion")" ]
- then
- OLD_GCC_VERSION="$(cat "${WORKDIR}/.oldgccversion")"
- else
- OLD_GCC_VERSION="${MY_PV_FULL}"
- fi
-
- if [ -f "${WORKDIR}/.oldgccchost" ] && \
- [ -n "$(cat "${WORKDIR}/.oldgccchost")" ]
- then
- OLD_GCC_CHOST="--oldarch $(cat "${WORKDIR}/.oldgccchost")"
- fi
-
- /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION} ${OLD_GCC_CHOST}
- fi
-
- # Fix ncurses b0rking (if r5 isn't unmerged)
- find ${ROOT}/usr/lib/gcc-lib -name '*curses.h' -exec rm -f {} \;
-
- # http://dev.gentoo.org/~pappy/hardened-gcc/docs/etdyn-ssp.html
- if has_version '>=sys-devel/hardened-gcc-1.2'
- then
- [ "${ROOT}" = "/" ] && hardened-gcc -A
- fi
-}
-