summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-devel/multilib-gcc-wrapper
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-devel/multilib-gcc-wrapper')
-rw-r--r--sys-devel/multilib-gcc-wrapper/metadata.xml12
-rw-r--r--sys-devel/multilib-gcc-wrapper/multilib-gcc-wrapper-0.ebuild72
2 files changed, 84 insertions, 0 deletions
diff --git a/sys-devel/multilib-gcc-wrapper/metadata.xml b/sys-devel/multilib-gcc-wrapper/metadata.xml
new file mode 100644
index 000000000000..db10fdd285dd
--- /dev/null
+++ b/sys-devel/multilib-gcc-wrapper/metadata.xml
@@ -0,0 +1,12 @@
+<?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>
+ <maintainer>
+ <email>multilib@gentoo.org</email>
+ <name>gx86 multilib team</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-devel/multilib-gcc-wrapper/multilib-gcc-wrapper-0.ebuild b/sys-devel/multilib-gcc-wrapper/multilib-gcc-wrapper-0.ebuild
new file mode 100644
index 000000000000..5accd38b9423
--- /dev/null
+++ b/sys-devel/multilib-gcc-wrapper/multilib-gcc-wrapper-0.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+DESCRIPTION="Wrappers for gcc tools to be used on non-native CHOSTs"
+HOMEPAGE="http://www.gentoo.org"
+SRC_URI=""
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="sys-devel/gcc:="
+
+S=${WORKDIR}
+
+mkwrap() {
+ einfo " ${2}"
+
+ cat > "${T}"/wrapper <<-_EOF_
+ #!${EPREFIX}/bin/sh
+ exec ${1} $(get_abi_CFLAGS) "\${@}"
+ _EOF_
+
+ newbin "${T}"/wrapper "${2}"
+}
+
+src_install() {
+ local host_prefix=${CHOST}
+ # stolen from sys-devel/gcc-config
+ # TODO: check if all of them actually support $(get_ABI_CFLAGS)
+ local tools=(
+ cpp cc gcc c++ g++ f77 g77 gcj gcjh gdc gdmd gfortran gccgo
+ )
+
+ cd "${EROOT%/}"/usr/bin || die
+ eshopts_push -s nullglob
+
+ # same as toolchain.eclass
+ : ${TARGET_DEFAULT_ABI:=${DEFAULT_ABI}}
+ : ${TARGET_MULTILIB_ABIS:=${MULTILIB_ABIS}}
+ local ABI t e
+ for ABI in $(get_all_abis TARGET); do
+ [[ ${ABI} == ${TARGET_DEFAULT_ABI} ]] && continue
+
+ einfo "Creating wrappers for ${ABI} ..."
+ for t in "${tools[@]}"; do
+ # look for both plain *-gcc and e.g. *-gcc-4.8.3
+ # (but avoid *-gcc-nm)
+ # note: nullglob applied above
+ for e in ${host_prefix}[-]${t}{,-[0-9]*}; do
+ local newname=$(get_abi_CHOST)-${e#${host_prefix}-}
+
+ einfo " ${newname}"
+
+ cat > "${T}"/wrapper <<-_EOF_
+ #!${EPREFIX}/bin/sh
+ exec ${e} $(get_abi_CFLAGS) "\${@}"
+ _EOF_
+
+ newbin "${T}"/wrapper "${newname}"
+ done
+ done
+ done
+
+ eshopts_pop
+}