summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Volynets <iluxa@gentoo.org>2004-05-31 04:53:09 +0000
committerIlya Volynets <iluxa@gentoo.org>2004-05-31 04:53:09 +0000
commit1ec51eae1efbdbd2227851c2dc2752804d2c1f9a (patch)
treef8e730c78c28451f4b79912acb4aaafebbd618c4
parentVersion bump for security bug #52434. (diff)
downloadhistorical-1ec51eae1efbdbd2227851c2dc2752804d2c1f9a.tar.gz
historical-1ec51eae1efbdbd2227851c2dc2752804d2c1f9a.tar.bz2
historical-1ec51eae1efbdbd2227851c2dc2752804d2c1f9a.zip
n32/n64 changes
-rw-r--r--sys-devel/gcc/ChangeLog8
-rw-r--r--sys-devel/gcc/Manifest5
-rw-r--r--sys-devel/gcc/files/3.4.0/gcc-3.4.0-mips-pcrel.diff23
-rw-r--r--sys-devel/gcc/gcc-3.4.0-r5.ebuild48
4 files changed, 77 insertions, 7 deletions
diff --git a/sys-devel/gcc/ChangeLog b/sys-devel/gcc/ChangeLog
index da4584eaa94e..c5f1507d17e4 100644
--- a/sys-devel/gcc/ChangeLog
+++ b/sys-devel/gcc/ChangeLog
@@ -1,11 +1,17 @@
# ChangeLog for sys-devel/gcc
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.255 2004/05/31 03:02:15 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.256 2004/05/31 04:53:09 iluxa Exp $
30 May 2004; Travis Tilley <lv@gentoo.org>
+files/3.4.0/gcc34-ppc64-typo-fix.patch, gcc-3.4.0-r5.ebuild:
added a typo fix patch for ppc64
+ 30 May 2004; Ilya A. Volynets-Evenbach <iluxa@gentoo.org>
+ +files/3.4.0/gcc-3.4.0-mips-pcrel.diff, gcc-3.4.0-r5.ebuild:
+ Add n32 & n64 use flags
+ Add n32/n64 patches and build options
+ Allow multilibs on all arches
+
28 May 2004; Tom Gall <tgall@gentoo.org> gcc-3.3.3_pre20040408-r1.ebuild:
marked as stable for ppc64
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 5bed72e0980a..8436b62cf8bd 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -23,12 +23,12 @@ MD5 c7e55fc7f4bfd637f45786c0c5fbb365 gcc-2.95.3-r8.ebuild 9095
MD5 b5f1d4d71ad38c5c5e489466ac0ad399 gcc-3.3.3-r3.ebuild 24690
MD5 9fb6a5505f97c736a3f40f84ea9c71da gcc-3.3.2-r6.ebuild 21217
MD5 e6ead3ed008a1fe7adc73ddae996ade3 gcc-3.3.2-r1.ebuild 17965
-MD5 5ab1b5b20b99f597ed651df19b66e8de ChangeLog 53273
+MD5 d438d14021a276531995658378f9a29b ChangeLog 53498
MD5 f00b83c775e21267dcfc5c57412dc961 gcc-3.3.2.ebuild 17908
MD5 3b2fd4637666e71aae9954782cd23016 gcc-3.3.3_pre20040426.ebuild 22633
MD5 567094e03359ffc1c95af7356395228d metadata.xml 162
MD5 66229a95f7bb2856fd07dfd0d6589480 gcc-3.3.3-r5.ebuild 25326
-MD5 ce8ed3d30600a2c72bc550e7bc02fc0d gcc-3.4.0-r5.ebuild 27956
+MD5 7fb2c37eec1bfda94449e0e042910504 gcc-3.4.0-r5.ebuild 29098
MD5 d70bcc196f1d68275346f067efcb9373 files/cc 20
MD5 dcf3646d19d351cc4d95a8096c6eaf58 files/cpp 20
MD5 e962c23dd4396850f0e36424ec5596d7 files/digest-gcc-3.3.3_pre20040408-r1 138
@@ -148,6 +148,7 @@ MD5 9ba0bd0b103cf9535927ad7c482fe780 files/3.3.3/gcc333-debian-arm-getoff.patch
MD5 ff6d7b5082c5e39fab8a5d8932c1a8b7 files/3.3.3/gcc-3.3.3-uclibc-add-ssp.patch 461
MD5 4b249bff27ab6328436e6289ac9f9cfc files/3.3.3/gcc333_pre20040215-gentoo-branding.patch 839
MD5 3210d5fd70806c44d4426c3dceebd480 files/3.3.3/gcc333_pre20040408-stack-size.patch 653
+MD5 c0596752e16cfeb19b32157a3e9d1ed4 files/3.4.0/gcc-3.4.0-mips-pcrel.diff 846
MD5 02c346508a61b399952de4f8855871ff files/3.4.0/gcc-3.4.0-r3-gentoo-branding.patch 781
MD5 17872e0a3d1067207208de03985c2978 files/3.4.0/gcc34-ppc64-typo-fix.patch 299
MD5 66df5567226338b7504bbd3c25cea92c files/3.4.0/gcc-3.4-libiberty-pic.patch 370
diff --git a/sys-devel/gcc/files/3.4.0/gcc-3.4.0-mips-pcrel.diff b/sys-devel/gcc/files/3.4.0/gcc-3.4.0-mips-pcrel.diff
new file mode 100644
index 000000000000..0b5e518df73f
--- /dev/null
+++ b/sys-devel/gcc/files/3.4.0/gcc-3.4.0-mips-pcrel.diff
@@ -0,0 +1,23 @@
+? mips-pc-rel.diff
+? updt.log
+Index: gcc/config/mips/linux.h
+===================================================================
+RCS file: /cvsroot/gcc/gcc/gcc/config/mips/linux.h,v
+retrieving revision 1.75.4.2
+diff -u -r1.75.4.2 linux.h
+--- gcc/config/mips/linux.h 19 Feb 2004 21:45:21 -0000 1.75.4.2
++++ gcc/config/mips/linux.h 24 May 2004 23:02:05 -0000
+@@ -170,10 +170,13 @@
+ #undef FUNCTION_NAME_ALREADY_DECLARED
+ #define FUNCTION_NAME_ALREADY_DECLARED 1
+
++#undef ASM_PREFERRED_EH_DATA_FORMAT
++#if 0
+ #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
+ (flag_pic \
+ ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4\
+ : DW_EH_PE_absptr)
++#endif
+
+ /* The glibc _mcount stub will save $v0 for us. Don't mess with saving
+ it, since ASM_OUTPUT_REG_PUSH/ASM_OUTPUT_REG_POP do not work in the
diff --git a/sys-devel/gcc/gcc-3.4.0-r5.ebuild b/sys-devel/gcc/gcc-3.4.0-r5.ebuild
index 203c3287bccd..b3525898eb2a 100644
--- a/sys-devel/gcc/gcc-3.4.0-r5.ebuild
+++ b/sys-devel/gcc/gcc-3.4.0-r5.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.4.0-r5.ebuild,v 1.3 2004/05/31 03:02:15 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.4.0-r5.ebuild,v 1.4 2004/05/31 04:53:09 iluxa Exp $
-IUSE="static nls bootstrap java build X multilib gcj f77 objc pic hardened uclibc"
+IUSE="static nls bootstrap java build X multilib gcj f77 objc pic hardened uclibc n32 n64"
inherit eutils flag-o-matic libtool
@@ -40,6 +40,11 @@ do_filter_flags() {
# a few archs...
setting="`get-flag mcpu`"
[ ! -z "${setting}" ] && filter-flags -mcpu="${setting}"
+
+ # If we use multilib on mips, we shouldn't pass -mabi flag - it breaks
+ # build of non-default-abi libraries.
+ use mips && use multilib && filter-flags "-mabi*"
+
export GCJFLAGS="${CFLAGS/-O?/-O2}"
}
@@ -121,7 +126,7 @@ HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
LICENSE="GPL-2 LGPL-2.1"
-KEYWORDS="-* ~amd64"
+KEYWORDS="-* ~amd64 ~mips"
#KEYWORDS="amd64 ~x86 ~ppc ~sparc ~mips ~ia64 ~ppc64 ~hppa ~alpha ~s390"
# Ok, this is a hairy one again, but lets assume that we
@@ -200,6 +205,26 @@ version_patch() {
epatch ${T}/${1##*/}
}
+check_option_validity() {
+ # Must compile for mips64-linux target if we want n32/n64 support
+ case "${CCHOST}" in
+ mips64-*)
+ ;;
+ *)
+ if use n32 || use n64; then
+ eerror "n32/n64 can only be used when target host is mips64-*-linux-*";
+ die "Invalid USE flags for CCHOST ($CCHOST)";
+ fi
+ ;;
+ esac
+
+ #cannot have both n32 & n64 without multilib
+ if use n32 && use n64 && ! use multilib; then
+ eerror "Please enable multilib if you want to use both n32 & n64";
+ die "Invalid USE flag combination";
+ fi
+}
+
glibc_have_ssp() {
use uclibc || local my_libc="${ROOT}/lib/libc.so.6"
use uclibc && local my_libc="${ROOT}/lib/libc.so.0"
@@ -412,6 +437,10 @@ src_unpack() {
# corrects text relocations in libiberty.a
(use pic || use hardened) && epatch ${FILESDIR}/3.4.0/gcc-3.4-libiberty-pic.patch
+ # Prevent GCC from emitting PC-relative relocs on MIPS (according to
+ # cgd@broadcom.com it is not-really-needed hack from EABI
+ epatch ${FILESDIR}/3.4.0/gcc-3.4.0-mips-pcrel.diff
+
version_patch ${FILESDIR}/3.4.0/gcc-${PV}-r3-gentoo-branding.patch \
"${BRANCH_UPDATE} (${release_version})" || die "Failed Branding"
@@ -438,6 +467,8 @@ src_compile() {
local myconf=
local gcc_lang=
+ check_option_validity
+
if ! use build
then
myconf="${myconf} --enable-shared"
@@ -471,7 +502,7 @@ src_compile() {
fi
# Multilib not yet supported
- if [ -n "`use multilib`" -a "${ARCH}" = "amd64" ]
+ if [ -n "`use multilib`" ]
then
einfo "WARNING: Multilib support enabled. This is still experimental."
myconf="${myconf} --enable-multilib"
@@ -508,6 +539,15 @@ src_compile() {
#use x86 && myconf="${myconf} --with-arch=i586"
#use mips && myconf="${myconf} --with-arch=mips3"
+ # Add --with-abi flags to enable respective MIPS ABIs
+ case "${CCHOST}" in
+ mips*)
+ use multilib && myconf="${myconf} --with-abi=32"
+ use n32 && myconf="${myconf} --with-abi=n32"
+ use n64 && myconf="${myconf} --with-abi=n64"
+ ;;
+ esac
+
do_filter_flags
einfo "CFLAGS=\"${CFLAGS}\""
einfo "CXXFLAGS=\"${CXXFLAGS}\""