aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-12-22 22:06:03 -0500
committerMike Frysinger <vapier@gentoo.org>2013-12-22 22:06:03 -0500
commitef372284c03b42c6c7f0c48a56c925e6c8abd9a8 (patch)
treecae6b46b79e480cd09edf5f4dcb3792480ad594e /wrappers/emerge-wrapper
parentmake.profile: move from /etc to /etc/portage (diff)
downloadcrossdev-ef372284c03b42c6c7f0c48a56c925e6c8abd9a8.tar.gz
crossdev-ef372284c03b42c6c7f0c48a56c925e6c8abd9a8.tar.bz2
crossdev-ef372284c03b42c6c7f0c48a56c925e6c8abd9a8.zip
emerge-wrapper: drop "wrap all targets" logic
We don't really need to do this anymore as crossdev will initialize things automatically for you now. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'wrappers/emerge-wrapper')
-rwxr-xr-xwrappers/emerge-wrapper24
1 files changed, 7 insertions, 17 deletions
diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index be81f95..9a85f05 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -86,12 +86,15 @@ cross_wrap_etc()
cross_wrap_bin()
{
[[ $1 == "-q" ]] || echo "${CHOST}: Setting up symlinks"
+
+ pushd "${0%/*}" >/dev/null
local wrapper
for wrapper in emerge fix-root pkg-config ; do
ln -sf cross-${wrapper} ${CHOST}-${wrapper}
done
# some people like their tab completion
ln -sf cross-emerge emerge-${CHOST}
+ popd >/dev/null
}
cross_wrap()
@@ -106,26 +109,13 @@ cross_wrap()
cross_init()
{
- cd "${0%/*}" || err "unable to cd to ${0%/*}"
+ if [[ ${CHOST} == "wrapper" ]] ; then
+ err "missing --target <CHOST> option"
+ fi
# Initialize env for just one target. This is the automated behavior
# when crossdev is setting things up for people.
- if [[ ${CHOST} != "wrapper" ]] ; then
- cross_wrap -q
- return $?
- fi
-
- # When called generically, blindly set up wrappers for all installed
- # toolchains. This is more historical behavior and not really
- # recommended anymore ...
- [[ ${0##*/} != emerge-wrapper ]] && err "I wont understand things"
-
- for CHOST in `find /usr/lib/gcc -maxdepth 1 -mindepth 1 -type d` ; do
- CHOST=${CHOST##*/}
- [[ ${CHOST} == ${CBUILD} ]] && continue
- type -P -- ${CHOST}-gcc >/dev/null || continue
- cross_wrap
- done
+ cross_wrap -q
}
# CBUILD must be the first thing we export, but might as well avoid