summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-04-12 16:00:05 +0200
committerMichał Górny <mgorny@gentoo.org>2015-04-12 16:00:05 +0200
commite3442972f033a50c39ce9c406489449c010b87a2 (patch)
treee0e7ff1c8b042d9b1157832bb66255d0f736a3e9
parentdev-python/pypy-binpackage: clean old (diff)
downloadmgorny-e3442972f033a50c39ce9c406489449c010b87a2.tar.gz
mgorny-e3442972f033a50c39ce9c406489449c010b87a2.tar.bz2
mgorny-e3442972f033a50c39ce9c406489449c010b87a2.zip
Drop the gcc fork
-rw-r--r--sys-devel/gcc/Manifest5
-rw-r--r--sys-devel/gcc/files/gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch21
-rw-r--r--sys-devel/gcc/files/gcc-configure-texinfo.patch16
-rw-r--r--sys-devel/gcc/files/gcc-spec-env-r1.patch87
-rw-r--r--sys-devel/gcc/gcc-4.9.2-r100.ebuild643
-rw-r--r--sys-devel/gcc/metadata.xml26
6 files changed, 0 insertions, 798 deletions
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
deleted file mode 100644
index 9761876..0000000
--- a/sys-devel/gcc/Manifest
+++ /dev/null
@@ -1,5 +0,0 @@
-DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 SHA256 f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2 SHA512 779ecb0a064d2138b54569c8ae501975b8a6b72e5a3acbf8597619a8db77ee42ef9b0e62608d5192a15e4393e7dfc009bb50b994782236faa744b2c46b5fe517 WHIRLPOOL 8a1e45aad9d306cb19de93c63b5854a97e629d90852feb6861dcfca042b6257705304fc13ad65655a4cb227d36b83fc6063648c94f270821574ee0e85307094e
-DIST gcc-4.9.2-patches-1.0.tar.bz2 18213 SHA256 e4e9a665381beb4018779a14d5124528a9d5df0e0772f3b7639390d6bda51515 SHA512 27deba0db6a500b160829fdcf5fc9a70be4b4fbd45c89d18dd2d0808d42803657693d0ed0f2b664e020a0d2ac39cdfe550e397eb4c2a6f64220cae1e7a16ff20 WHIRLPOOL 7e04ed92038f19a9b00fe0022c2c7ce3df8621fccca95cb2da37333a5edcc0857efe96aed68f5c4b51db19ecd23ec1194412f1bc24730cea30db7b342c12dfdf
-DIST gcc-4.9.2-piepatches-v0.6.1.tar.bz2 14185 SHA256 590d11ea5723812fff3239c5eaed4b040b26a92586de0e42a84438f742eaac0b SHA512 89560e96bc205e848936acc4d3423ff5e1ea5ee478848edfe2b992585cea0df21eb102b1f1bee55c10568d4ca54bb3f4e8ae72aa695e34a908abfda3585fb992 WHIRLPOOL e6db4a2e5fdf762bd4f0fa70d630499bf6789a0c3b7ca193b455bb22f95f5f2983358ba9f28bd85b571a3a44a691ca797762302a1f2ea63ce170752f7e44128b
-DIST gcc-4.9.2-uclibc-patches-1.0.tar.bz2 2540 SHA256 3ca63cba5edb01367352fcd558890a838630deb4c30f82f4c7e8074ad75e57fc SHA512 69f6f80e23efee0b937fca0f2056e17b4fe643817d2394bbfd16cbb453d74c76a0bb8727815f689a795897d9cd5e06ecc74d3d9ad45175fe837ad008eee09706 WHIRLPOOL 3946513e83960fe891267e103e434cae0616cd45b5e7eaff5f4f671741c1445941cf80b7497231cf50f137941c01859dbbac0a95745fb7ae663a3ee512bd7162
-DIST gcc-4.9.2.tar.bz2 89939747 SHA256 2020c98295856aa13fda0f2f3a4794490757fc24bcca918d52cc8b4917b972dd SHA512 e96cba06d572dbe7f382a2b00fd9297dcf9f9219d46a9ad0bd904dc36d5e7db3335e422640b79a27fed6fde91b0731732b94a0e2fbcd47344d6779f8ba1f4f9c WHIRLPOOL c4afdd0ec98e6f903044f1d3061fd96cf1e9bcbe2f90c388f5bc9ff8b2493b94367e84fdff7c2075ba37e2f950ecf2dba7c11786c653c2c7e86a5e8ff7d98e85
diff --git a/sys-devel/gcc/files/gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch b/sys-devel/gcc/files/gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch
deleted file mode 100644
index 11c3731..0000000
--- a/sys-devel/gcc/files/gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -urN gcc-4.6.4/libgcc/Makefile.in gcc-4.6.4-fixed/libgcc/Makefile.in
---- gcc-4.6.4/libgcc/Makefile.in 2013-04-24 00:12:29.213242770 +0000
-+++ gcc-4.6.4-fixed/libgcc/Makefile.in 2013-04-24 01:19:14.909313041 +0000
-@@ -945,7 +945,7 @@
-
- $(subst @multilib_dir@,$(MULTIDIR),$(subst \
- @shlib_base_name@,libunwind,$(subst \
-- @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIBUNWIND_INSTALL))))
-+ @shlib_slibdir_qual@,$(MULTISUBDIR),$(SHLIBUNWIND_INSTALL))))
-
- install-shared:
- $(mkinstalldirs) $(DESTDIR)$(inst_libdir)
-@@ -956,7 +956,7 @@
-
- $(subst @multilib_dir@,$(MULTIDIR),$(subst \
- @shlib_base_name@,libgcc_s,$(subst \
-- @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
-+ @shlib_slibdir_qual@,$(MULTISUBDIR),$(SHLIB_INSTALL))))
-
- install-leaf: $(install-shared) $(install-libunwind)
- $(mkinstalldirs) $(DESTDIR)$(inst_libdir)
diff --git a/sys-devel/gcc/files/gcc-configure-texinfo.patch b/sys-devel/gcc/files/gcc-configure-texinfo.patch
deleted file mode 100644
index ddc098d..0000000
--- a/sys-devel/gcc/files/gcc-configure-texinfo.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Chances are quite good that the installed makeinfo is sufficient.
-So ignore false positives where the makeinfo installed is so new
-that it violates the cheesy version grep.
-
-http://bugs.gentoo.org/198182
-
---- configure
-+++ configure
-@@ -3573,6 +3573,6 @@
- :
- else
-- MAKEINFO="$MISSING makeinfo"
-+ :
- fi
- ;;
-
diff --git a/sys-devel/gcc/files/gcc-spec-env-r1.patch b/sys-devel/gcc/files/gcc-spec-env-r1.patch
deleted file mode 100644
index a589268..0000000
--- a/sys-devel/gcc/files/gcc-spec-env-r1.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-2013-08-22 Magnus Granberg <zorry@gentoo.org>
-
- * gcc/gcc.c (main): Add support for external spec file via the GCC_SPECS env var
- and move the process of the user specifed specs.
-
- This allows us to easily control pie/ssp defaults with gcc-config profiles.
- Original patch by Rob Holland
- Extended to support multiple entries separated by ':' by Kevin F. Quinn
- Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
- Modified to process the GCC_SPECS env var befor DRIVER_SELF_SPECS by Magnus Granberg
-
---- gcc-4.8-20130210/gcc/gcc.c 2013-02-05 16:55:31.000000000 +0100
-+++ gcc-4.8-20130210-work/gcc/gcc.c 2013-07-26 02:32:14.625089864 +0200
-@@ -6427,6 +6428,48 @@ main (int argc, char **argv)
- do_option_spec (option_default_specs[i].name,
- option_default_specs[i].spec);
-
-+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32))
-+ /* Add specs listed in GCC_SPECS. Note; in the process of separating
-+ * each spec listed, the string is overwritten at token boundaries
-+ * (':') with '\0', an effect of strtok_r().
-+ */
-+ specs_file = getenv ("GCC_SPECS");
-+ if (specs_file && (strlen(specs_file) > 0))
-+ {
-+ char *spec, *saveptr;
-+ for (spec=strtok_r(specs_file,":",&saveptr);
-+ spec!=NULL;
-+ spec=strtok_r(NULL,":",&saveptr))
-+ {
-+ struct user_specs *user = (struct user_specs *)
-+ xmalloc (sizeof (struct user_specs));
-+ user->next = (struct user_specs *) 0;
-+ user->filename = spec;
-+ if (user_specs_tail)
-+ user_specs_tail->next = user;
-+ else
-+ user_specs_head = user;
-+ user_specs_tail = user;
-+ }
-+ }
-+#endif
-+ /* Process any user specified specs in the order given on the command
-+ * line. */
-+ for (uptr = user_specs_head; uptr; uptr = uptr->next)
-+ {
-+ char *filename = find_a_file (&startfile_prefixes, uptr->filename,
-+ R_OK, true);
-+ read_specs (filename ? filename : uptr->filename, false, true);
-+ }
-+ /* Process any user self specs. */
-+ {
-+ struct spec_list *sl;
-+ for (sl = specs; sl; sl = sl->next)
-+ if (sl->name_len == sizeof "self_spec" - 1
-+ && !strcmp (sl->name, "self_spec"))
-+ do_self_spec (*sl->ptr_spec);
-+ }
-+
- /* Process DRIVER_SELF_SPECS, adding any new options to the end
- of the command line. */
-
-@@ -6535,24 +6578,6 @@ main (int argc, char **argv)
- PREFIX_PRIORITY_LAST, 0, 1);
- }
-
-- /* Process any user specified specs in the order given on the command
-- line. */
-- for (uptr = user_specs_head; uptr; uptr = uptr->next)
-- {
-- char *filename = find_a_file (&startfile_prefixes, uptr->filename,
-- R_OK, true);
-- read_specs (filename ? filename : uptr->filename, false, true);
-- }
--
-- /* Process any user self specs. */
-- {
-- struct spec_list *sl;
-- for (sl = specs; sl; sl = sl->next)
-- if (sl->name_len == sizeof "self_spec" - 1
-- && !strcmp (sl->name, "self_spec"))
-- do_self_spec (*sl->ptr_spec);
-- }
--
- if (compare_debug)
- {
- enum save_temps save;
diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
deleted file mode 100644
index e77f7e9..0000000
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ /dev/null
@@ -1,643 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header$
-
-EAPI=5
-
-PATCH_VER="1.0"
-UCLIBC_VER="1.0"
-
-# Hardened gcc 4 stuff
-PIE_VER="0.6.1"
-SPECS_VER="0.2.0"
-SPECS_GCC_VER="4.4.3"
-
-# ABIs supported by gcc/ebuild.
-MULTILIB_COMPAT=(
- abi_x86_32 abi_x86_64 abi_x86_x32
- abi_mips_n32 abi_mips_n64 abi_mips_o32
- abi_ppc_32 abi_ppc_64
- abi_s390_32 abi_s390_64
-)
-
-inherit eutils flag-o-matic multilib multilib-build pax-utils toolchain-funcs
-
-DESCRIPTION="The GNU Compiler Collection"
-HOMEPAGE="http://gcc.gnu.org/"
-SRC_URI="mirror://gnu/${PN}/${P}/${P}.tar.bz2
- http://dev.gentoo.org/~vapier/dist/${P}-uclibc-patches-${UCLIBC_VER}.tar.bz2
- http://dev.gentoo.org/~vapier/dist/${P}-patches-${PATCH_VER}.tar.bz2
- http://dev.gentoo.org/~vapier/dist/${P}-piepatches-v${PIE_VER}.tar.bz2
- http://dev.gentoo.org/~rhill/dist/${PN}-${SPECS_GCC_VER}-specs-${SPECS_VER}.tar.bz2"
-
-LICENSE="GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.3+"
-SLOT="${PV%.*}"
-KEYWORDS="~amd64 ~x86"
-
-IUSE="altivec +cxx doc fixed-point +fortran go graphite hardened libssp
- +nls +nptl objc objc-gc objc++ +openmp +pie +sanitize test vanilla"
-
-RDEPEND="
- >=dev-libs/gmp-4.3.2
- >=dev-libs/mpc-0.8.1
- >=dev-libs/mpfr-2.4.2
- sys-libs/zlib
- virtual/libiconv
- graphite? (
- >=dev-libs/cloog-0.18.0
- >=dev-libs/isl-0.11.1
- )
- nls? ( virtual/libintl )"
-DEPEND="${RDEPEND}
- >=sys-devel/bison-1.875
- >=sys-devel/flex-2.5.4
- doc? ( >=app-doc/doxygen-1.7 )
- nls? ( sys-devel/gettext )
- test? (
- >=dev-util/dejagnu-1.4.4
- >=sys-devel/autogen-5.5.4
- )
- elibc_glibc? ( >=sys-libs/glibc-2.8 )
- >=sys-devel/binutils-2.20"
-RDEPEND="${RDEPEND}
- !sys-devel/multilib-gcc-wrapper"
-
-PDEPEND="elibc_glibc? ( >=sys-libs/glibc-2.8 )
- >=sys-devel/gcc-config-1.7"
-
-REQUIRED_USE="
- doc? ( cxx )
- go? ( cxx )
- hardened? ( pie !vanilla )
- objc++? ( cxx )
- pie? ( !vanilla )"
-# Don't have fine-tuned switching of MIPS ABIs -- either one or all.
-REQUIRED_USE="${REQUIRED_USE}
- abi_mips_o32? ( abi_mips_n32? ( abi_mips_n64 ) )
- abi_mips_o32? ( abi_mips_n64? ( abi_mips_n32 ) )
- abi_mips_n32? ( abi_mips_n64? ( abi_mips_o32 ) )"
-
-# Custom magic.
-RESTRICT="strip"
-
-pkg_setup() {
- export CTARGET=${CTARGET:-${CHOST}}
-
- # we dont want to use the installed compiler's specs to build gcc
- unset GCC_SPECS
- unset LANGUAGES #265283
-}
-
-src_prepare() {
- export BRANDING_GCC_PKGVERSION="Gentoo ${PVR}::mgorny"
-
- # fix libgcc_s install path
- epatch "${FILESDIR}"/gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch || die
-
- if ! use vanilla; then
- if has_version '<sys-libs/glibc-2.12' ; then
- ewarn "Your host glibc is too old; disabling automatic fortify."
- ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315"
- rm "${WORKDIR}"/patch/10_all_default-fortify-source.patch || die
- fi
-
- BRANDING_GCC_PKGVERSION+=" p${PATCH_VER}"
-
- einfo "Applying Gentoo patches ..."
- epatch "${WORKDIR}"/patch/*.patch
- einfo "Applying uClibc patches ..."
- epatch "${WORKDIR}"/uclibc/*.patch
-
- if use pie; then
- BRANDING_GCC_PKGVERSION+=", pie-${PIE_VER}"
-
- einfo "Applying pie patches ..."
- epatch "${WORKDIR}"/piepatch/*.patch
- fi
-
- # Hardening stuff.
- local hard_flags=()
- if use hardened; then
- BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened}
- hard_flags+=( -DEFAULT_PIE_SSP )
- else
- hard_flags+=( -DEFAULT_SSP )
- fi
-
- sed -i \
- -e "/^ALL_CFLAGS = /s|=|= ${hard_flags[*]} |" \
- -e "/^ALL_CXXFLAGS = /s|=|= ${hard_flags[*]} |" \
- "${S}"/gcc/Makefile.in || die
-
- #Use -r1 for newer piepatchet that use DRIVER_SELF_SPECS for the hardened specs.
- [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env-r1.patch
- fi
-
- epatch_user
-
- find "${S}" -name Makefile.in \
- -exec sed -i '/^pkgconfigdir/s:=.*:=$(toolexeclibdir)/pkgconfig:' {} +
-
- # Prevent new texinfo from breaking old versions (see #198182, #464008)
- epatch "${FILESDIR}"/gcc-configure-texinfo.patch
-
- einfo "Touching generated files ..."
- ./contrib/gcc_update --touch
-}
-
-# Map Gentoo ABI into gcc ABI, for MIPS.
-get_gcc_mips_abi() {
- case ${1} in
- o32) echo 32;;
- n32) echo n32;;
- n64) echo 64;;
- *) die "Invalid MIPS ABI: ${1}";;
- esac
-}
-
-# Map Gentoo ABI into gcc ABI, for amd64.
-get_gcc_amd64_abi() {
- case ${1} in
- x86*) echo m32;;
- amd64*) echo m64;;
- x32) echo mx32;;
- *) die "Invalid AMD64 ABI: ${1}";;
- esac
-}
-
-src_configure() {
- strip-flags
- filter-flags '-mabi*' -m31 -m32 -m64
- replace-flags -O3 -O2
- filter-flags -frecord-gcc-switches # 490738
- filter-flags -mno-rtm -mno-htm # 506202
- filter-flags '-mcpu=*'
-
- einfo "CFLAGS: ${CFLAGS}"
- einfo "CXXFLAGS: ${CXXFLAGS}"
- einfo "LDFLAGS: ${LDFLAGS}"
-
- PREFIX=/usr
- BINPATH=${PREFIX}/${CTARGET}/gcc-bin/${PV}
- LIBPATH=${PREFIX}/lib/gcc/${CTARGET}/${PV}
- INCPATH=${LIBPATH}/include
- DATAPATH=${PREFIX}/share/gcc-data/${CTARGET}/${PV}
- STDCXX_INCDIR=${LIBPATH}/include/g++-v${PV%%.*}
-
- local langs=( c )
- use cxx && langs+=( c++ )
- use go && langs+=( go )
- use objc && langs+=( objc )
- use objc++ && langs+=( obj-c++ )
- use fortran && langs+=( fortran )
- langs=${langs[*]}
-
- local myconf=(
- --host=${CHOST}
- --build=${CBUILD:-${CHOST}}
-
- --prefix="${PREFIX}"
- --bindir="${BINPATH}"
- --includedir="${INCPATH}"
- --datadir="${DATAPATH}"
- --mandir="${DATAPATH}/man"
- --infodir="${DATAPATH}/info"
- --with-gxx-include-dir="${STDCXX_INCDIR}"
- --with-python-dir=${DATAPATH#${PREFIX}/}/python
-
- --enable-languages="${langs// /,}"
- --disable-libgcj
-
- --disable-bootstrap
- --enable-obsolete
- --enable-secureplt
- --disable-werror
- --with-system-zlib
- --disable-libunwind-exceptions
- --enable-checking=release
-
- $(use_enable nls)
- --without-included-gettext
-
- # branding
- --with-bugurl=https://bugs.gentoo.org/
- --with-pkgversion="${BRANDING_GCC_PKGVERSION}"
-
- $(use_enable hardened esp)
- # allow gcc to search for clock funcs in the main C lib.
- # if it can't find them, then tough cookies -- we aren't
- # going to link in -lrt to all C++ apps. #411681
- $(use_enable cxx libstdcxx-time)
-
- # Put libs in gcc-specific subdirectories.
- --enable-version-specific-runtime-libs
- --enable-lto
- --enable-shared
- --enable-threads=posix
-
- # ppc altivec
- $(use_enable altivec)
- # mips fixed-point arithmetic
- $(use_enable fixed-point)
-
- $(use_enable openmp libgomp)
- --disable-libmudflap
- $(use_enable libssp)
- # used only by fortran
- $(use_enable fortran libquadmath)
- $(use_with graphite cloog)
- $(use_enable '!graphite' isl-version-check)
- $(use_enable sanitize libsanitizer)
- $(use_enable objc-gc)
- )
-
- # __cxa_atexit is "essential for fully standards-compliant handling of
- # destructors", but apparently requires glibc.
- case ${CTARGET} in
- *-uclibc*)
- myconf+=(
- --disable-__cxa_atexit
- $(use_enable nptl tls)
- )
- ;;
- *-elf|*-eabi)
- myconf+=( --with-newlib )
- ;;
- *-gnu*)
- myconf+=(
- --enable-__cxa_atexit
- --enable-clocale=gnu
- )
- ;;
- *-freebsd*)
- myconf+=( --enable-__cxa_atexit )
- ;;
- *-solaris*)
- myconf+=( --enable-__cxa_atexit )
- ;;
- esac
-
- : ${TARGET_ABI:=${ABI}}
- : ${TARGET_MULTILIB_ABIS:=${MULTILIB_ABIS}}
- : ${TARGET_DEFAULT_ABI:=${DEFAULT_ABI}}
-
- case $(tc-is-softfloat) in
- yes) myconf+=( --with-float=soft ) ;;
- softfp) myconf+=( --with-float=softfp ) ;;
- *)
- # If they've explicitly opt-ed in, do hardfloat,
- # otherwise let the gcc default kick in.
- case ${CTARGET//_/-} in
- *-hardfloat-*|*eabihf) myconf+=( --with-float=hard ) ;;
- esac
- esac
-
- # Multilib guessing.
- # From this point forward, ABI variables may correspond to CTARGET.
- [[ ${CHOST} != ${CTARGET} ]] && multilib_env "${CTARGET}"
- local abis=( $(multilib_get_enabled_abis) )
-
- # isn't that brilliant?
- if [[ ${#abis[@]} -gt 1 ]]; then
- myconf+=( --enable-multilib )
- else
- myconf+=( --disable-multilib )
- fi
-
- # now, verify!
- # (abis may be empty on non-multilib arches)
- if [[ ${abis[@]} ]] && ! has "${DEFAULT_ABI}" "${abis[@]}"; then
- die "DEFAULT_ABI ${DEFAULT_ABI} not enabled (USE misconfiguration?)"
- fi
-
- case $(tc-arch) in
- arm) #264534 #414395
- local a arm_arch=${CTARGET%%-*}
- # Remove trailing endian variations first: eb el be bl b l
- for a in e{b,l} {b,l}e b l ; do
- if [[ ${arm_arch} == *${a} ]] ; then
- arm_arch=${arm_arch%${a}}
- break
- fi
- done
- # Convert armv7{a,r,m} to armv7-{a,r,m}
- [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
- # See if this is a valid --with-arch flag
- if (srcdir=${S}/gcc target=${CTARGET} with_arch=${arm_arch};
- . "${srcdir}"/config.gcc) &>/dev/null
- then
- myconf+=( --with-arch=${arm_arch} )
- fi
-
- # Make default mode thumb for microcontroller classes #418209
- [[ ${arm_arch} == *-m ]] && myconf+=( --with-mode=thumb )
-
- # Enable hardvfp
- if [[ $(tc-is-softfloat) == "no" && ${CTARGET} == armv[67]* ]]
- then
- # Follow the new arm hardfp distro standard by default
- myconf+=( --with-float=hard )
- case ${CTARGET} in
- armv6*) myconf+=( --with-fpu=vfp ) ;;
- armv7*) myconf+=( --with-fpu=vfpv3-d16 ) ;;
- esac
- fi
- ;;
- mips)
- myconf+=( --with-abi="$(get_gcc_mips_abi "${DEFAULT_ABI}")" )
- ;;
- amd64)
- local a gcc_abis=()
- for a in "${abis[@]}"; do
- gcc_abis+=( "$(get_gcc_amd64_abi "${a}")" )
- done
- gcc_abis=${gcc_abis[*]}
-
- myconf+=(
- --with-multilib-list="${gcc_abis// /,}"
- --with-abi="$(get_gcc_amd64_abi "${DEFAULT_ABI}")"
- )
- ;;
- x86)
- # Default arch for x86 is normally i386, lets give it a bump
- # since glibc will do so based on CTARGET anyways
- myconf+=( --with-arch="${CTARGET%%-*}" )
- ;;
- ppc)
- # Set up defaults based on current CFLAGS
- is-flagq -mfloat-gprs=double && myconf+=( --enable-e500-double )
- [[ ${CTARGET//_/-} == *-e500v2-* ]] && myconf+=( --enable-e500-double )
- ;;
- esac
-
- # if the target can do biarch (-m32/-m64), enable it. overhead should
- # be small, and should simplify building of 64bit kernels in a 32bit
- # userland by not needing sys-devel/kgcc64. #349405
- case $(tc-arch) in
- ppc|ppc64) myconf+=( --enable-targets=all ) ;;
- sparc) myconf+=( --enable-targets=all ) ;;
- amd64|x86) myconf+=( --enable-targets=all ) ;;
- esac
-
- # Disable gcc info regeneration #464008
- export gcc_cv_prog_makeinfo_modern=no
-
- # Build in a separate build tree
- mkdir -p "${WORKDIR}"/build || die
- cd "${WORKDIR}"/build || die
-
- # and now to do the actual configuration
- addwrite /dev/zero
- set -- "${S}"/configure "${myconf[@]}" ${EXTRA_ECONF}
- echo "${@}"
- "${@}" || die 'configure failed'
-
- # we don't want fixed includes :)
- echo : > "${S}"/fixincludes/fixinc.in
-}
-
-src_compile() {
- touch "${S}"/gcc/c-gperf.h
-
- emake -C "${WORKDIR}"/build all \
- LDFLAGS="${LDFLAGS}" \
- STAGE1_CFLAGS="${CFLAGS}" \
- LIBPATH="${LIBPATH}" \
- BOOT_CFLAGS="$(get_abi_CFLAGS "${DEFAULT_ABI}") ${CFLAGS}"
-
- if use cxx && use doc; then
- emake -C "${WORKDIR}"/build/"${CTARGET}"/libstdc++-v3/doc \
- doc-man-doxygen
- fi
-}
-
-src_test() {
- emake -k -C "${WORKDIR}"/build check
-}
-
-create_gcc_symlinks() {
- dodir /usr/bin
- cd "${D}${BINPATH}" || die
-
- # First, remove all default hardlinks (we have all files
- # unprefixed anyway).
- rm "${CTARGET}"-* || die
-
- # Replace c++ hardlink with symlink. We can't drop it since
- # gcc-wrapper doesn't have an alias for it...
- ln -f -s g++ c++ || die
-
- # Store for reuse in create_multilib_wrapper().
- GCC_TOOLS=( * )
-
- local t
- for t in "${GCC_TOOLS[@]}"; do
- # Add CTARGET-ed symlinks to make gcc-wrapper happy.
- ln -s "${t}" "${CTARGET}-${t}" || die
-
- # Install versioned symlinks in /usr/bin.
- dosym "${BINPATH}/${t}" /usr/bin/"${CTARGET}-${t}-${PV}"
- dosym "${CTARGET}-${t}-${PV}" /usr/bin/"${t}-${PV}"
- done
-}
-
-create_multilib_wrappers() {
- local native_ctarget=${CTARGET}
-
- create_multilib_wrapper() {
- multilib_is_native_abi && continue
-
- local abi_binpath=${PREFIX}/${CHOST}/gcc-bin/${PV}
- exeinto "${abi_binpath}"
- dodir "${abi_binpath}"
-
- local t
- for t in "${GCC_TOOLS[@]}"; do
- if [[ ${t} == gcov || ${t} == gcc-* ]]; then
- # those tools have no multilib powers, we symlink them as-is
- dosym "../../../${BINPATH#${PREFIX}/}/${t}" \
- "${abi_binpath}/${t}" || die
- else
- # use canonical name to avoid playing with ${0}
- cat > "${T}"/wrapper <<-_EOF_
- #!${EPREFIX}/bin/sh
- exec "${native_ctarget}-${t}-${PV}" $(get_abi_CFLAGS) "\${@}"
- _EOF_
-
- newexe "${T}"/wrapper "${t}"
- fi
-
- # Now symlink fun.
- dosym "${t}" "${abi_binpath}/${CHOST}-${t}" || die
- dosym "${abi_binpath}/${t}" /usr/bin/"${CHOST}-${t}-${PV}"
- done
- }
- multilib_foreach_abi create_multilib_wrapper
-}
-
-strip_gcc_executables() {
- # TODO: find out how to avoid prepstrip
- env RESTRICT="" CHOST="${CHOST}" prepstrip "${D}${BINPATH}"
- env RESTRICT="" CHOST="${CHOST}" prepstrip "${D}${PREFIX}/libexec/gcc/${CTARGET}/${PV}"
- env RESTRICT="" CHOST="${CTARGET}" prepstrip "${D}${LIBPATH}"
-}
-
-# Grab a variable from the build system (taken from linux-info.eclass)
-get_make_var() {
- local var=$1 makefile=${2:-${WORKDIR}/build/Makefile}
- echo -e "e:\\n\\t@echo \$(${var})\\ninclude ${makefile}" | \
- r=${makefile%/*} emake --no-print-directory -s -f - 2>/dev/null
-}
-
-XGCC() { get_make_var GCC_FOR_TARGET ; }
-
-create_gcc_env_entry() {
- dodir /etc/env.d/gcc
- local gcc_envd_base="/etc/env.d/gcc/${CHOST}-${PV}"
-
- local gcc_specs_file
- local gcc_envd_file="${D}${gcc_envd_base}"
- if [[ -z $1 ]] ; then
- # I'm leaving the following commented out to remind me that it
- # was an insanely -bad- idea. Stuff broke. GCC_SPECS isnt unset
- # on chroot or in non-toolchain.eclass gcc ebuilds!
- #gcc_specs_file="${LIBPATH}/specs"
- gcc_specs_file=""
- else
- gcc_envd_file+="-${1}"
- gcc_specs_file="${LIBPATH}/${1}.specs"
- fi
-
- # We want to list the default ABI's LIBPATH first so libtool
- # searches that directory first. This is a temporary
- # workaround for libtool being stupid and using .la's from
- # conflicting ABIs by using the first one in the search path
- local ldpaths mosdirs mdir mosdir abi ldpath
- for abi in $(get_all_abis) ; do
- mdir=$($(XGCC) $(get_abi_CFLAGS ${abi}) --print-multi-directory)
- ldpath=${LIBPATH}
- [[ ${mdir} != "." ]] && ldpath+="/${mdir}"
- ldpaths="${ldpath}${ldpaths:+:${ldpaths}}"
-
- mosdir=$($(XGCC) $(get_abi_CFLAGS ${abi}) -print-multi-os-directory)
- mosdirs="${mosdir}${mosdirs:+:${mosdirs}}"
- done
-
- local abi_binpath=${PREFIX}/${CHOST}/gcc-bin/${PV}
-
- cat <<-EOF > ${gcc_envd_file}
- PATH="${abi_binpath}"
- ROOTPATH="${abi_binpath}"
- GCC_PATH="${abi_binpath}"
- LDPATH="${ldpaths}"
- MANPATH="${DATAPATH}/man"
- INFOPATH="${DATAPATH}/info"
- STDCXX_INCDIR="${STDCXX_INCDIR##*/}"
- CTARGET="${CHOST}"
- GCC_SPECS="${gcc_specs_file}"
- MULTIOSDIRS="${mosdirs}"
- EOF
-}
-
-src_install() {
- cd "${WORKDIR}"/build || die
-
- # Fix out-of-source info-page install
- local f
- while read -r -d '' f; do
- cp "${S}/${f}" "${f}" || die
- done < <(cd "${S}" && find gcc -name '*.info' -print0)
-
- emake -j1 DESTDIR="${D}" install
-
- # Punt some tools which are really only useful while building gcc
- find "${D}" -name install-tools -prune -type d -exec rm -r {} + || die
- # Some random 'dir' file?
- rm "${D}${DATAPATH}"/info/dir || die
-
- create_gcc_symlinks
- create_multilib_wrappers
- strip_gcc_executables
-
- # move *-gdb.py into /usr/share/gdb/auto-load tree
- if use cxx; then
- local py gdbdir=${D}usr/share/gdb/auto-load
- while read -r -d '' py; do
- mkdir -p "${gdbdir}/${py%/*}" || die
- mv "${D}${py}" "${gdbdir}/${py%/*}"/ || die
- done < <(cd "${D}" && find -name '*-gdb.py' -print0)
- fi
-
- if use cxx && use doc; then
- cd "${WORKDIR}/build/${CTARGET}/libstdc++-v3/doc/doxygen/man" || die
- # clean up some random files with build-dir paths
- rm -f man*/*"${P}"*
- cp -r man* "${D}${DATAPATH}"/man/ || die
- fi
-
- # Don't scan .gox files for executable stacks - false positives
- export QA_EXECSTACK="usr/lib*/go/*/*.gox"
- export QA_WX_LOAD="usr/lib*/go/*/*.gox"
-
- # Disable RANDMMAP so PCH works. #301299
- pax-mark -r "${D}${PREFIX}/libexec/gcc/${CTARGET}/${PV}/cc1"
- pax-mark -r "${D}${PREFIX}/libexec/gcc/${CTARGET}/${PV}/cc1plus"
-
- prune_libtool_files
-
- create_env_entries() {
- # entries and specs
- create_gcc_env_entry
- if use hardened; then
- # setup the hardenedno* specs files and the vanilla specs file.
- create_gcc_env_entry hardenednopiessp
- create_gcc_env_entry hardenednopie
- create_gcc_env_entry hardenednossp
- create_gcc_env_entry vanilla
- fi
- }
- multilib_foreach_abi create_gcc_env_entry
-
- if use hardened; then
- insinto "${LIBPATH}"
- doins "${WORKDIR}"/specs/*.specs
- fi
-}
-
-switch_gcc() {
- local curr_config curr_pv
- # config name: ${CHOST}-${PV}
- curr_config=$(env -i ROOT="${ROOT}" gcc-config -c "${CHOST}" 2>&1)
-
- # no config? switch!
- if [[ -z ${curr_config} ]]; then
- gcc-config "${CHOST}-${PV}"
- return
- fi
-
- # some config? argh, we need to parse it.
- split_config=( $(env -i ROOT="${ROOT}" gcc-config -S "${CHOST}") )
-
- # different branch? we aren't doing such leaps ourselves.
- if [[ ${split_config[1]%.*} != ${PV%.*} ]]; then
- env -i ROOT="${ROOT}" gcc-config --use-old --force
- return
- fi
-
- if [[ -n ${split_config[2]} ]]; then
- if [[ -f ${ROOT}/etc/env.d/gcc/${CHOST}-${PV}-${split_config[2]} ]]
- then
- gcc-config "${CHOST}-${PV}-${split_config[2]}"
- return
- else
- ewarn "Spec '${split_config[2]}' used so far is no longer available."
- ewarn "The default will be used instead."
- fi
-
- gcc-config "${CHOST}-${PV}"
- fi
-}
-
-pkg_postinst() {
- multilib_foreach_abi switch_gcc
-}
diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml
deleted file mode 100644
index 0a0abbb..0000000
--- a/sys-devel/gcc/metadata.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer>
- <email>mgorny@gentoo.org</email>
- <name>Michał Górny</name>
- </maintainer>
- <use>
- <flag name="fixed-point">Enable fixed-point arithmetic support for MIPS targets
- in gcc (Warning: significantly increases compile time!)</flag>
- <flag name="go">Build the GCC Go language frontend.</flag>
- <flag name="graphite">Add support for the framework for loop
- optimizations based on a polyhedral intermediate representation</flag>
- <flag name="libssp">Build SSP support into a dedicated library rather than use the
- code in the C library (DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT IT DOES)</flag>
- <flag name="pie">Enable PIE support (DO NOT DISABLE)</flag>
- <flag name="objc">Build support for the Objective C code language</flag>
- <flag name="objc++">Build support for the Objective C++ language</flag>
- <flag name="objc-gc">Build support for the Objective C code language Garbage
- Collector</flag>
- <flag name="sanitize">Build support various sanitizer functions (ASAN/TSAN/etc...)</flag>
- </use>
- <upstream>
- <remote-id type="cpe">cpe:/a:gnu:gcc</remote-id>
- </upstream>
-</pkgmetadata>