Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/crossdev:master commit in: wrappers/, wrappers/etc/portage/
Date: Mon, 23 Dec 2013 03:11:09
Message-Id: 1387768123.a4ab14acf5522e3ced4d71d535657d6f241c23c0.vapier@gentoo
1 commit: a4ab14acf5522e3ced4d71d535657d6f241c23c0
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 23 03:08:43 2013 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 23 03:08:43 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=a4ab14ac
7
8 wrappers: drop custom bashrc/e_machine logic
9
10 Cross-compiling logic has largely stabilized enough now that we don't need
11 this post-install hack to keep things sane. Plus, if you install a package
12 that doesn't cross-compile properly, you'll notice pretty quickly.
13
14 Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
15
16 ---
17 wrappers/emerge-wrapper | 14 --------------
18 wrappers/etc/portage/bashrc | 20 --------------------
19 wrappers/etc/portage/make.conf | 1 -
20 3 files changed, 35 deletions(-)
21
22 diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
23 index 9a85f05..4658b5f 100755
24 --- a/wrappers/emerge-wrapper
25 +++ b/wrappers/emerge-wrapper
26 @@ -46,17 +46,6 @@ cross_wrap_etc()
27 )
28 [[ ${ARCH} == "unknown" ]] && emit_setup_warning
29
30 - # Now map out the non-standard EM values
31 - case ${ARCH} in
32 - amd64) E_MACHINE=X86_64 ;;
33 - hppa) E_MACHINE=PARISC ;;
34 - ia64) E_MACHINE=IA_64 ;;
35 - m68k) E_MACHINE=68K ;;
36 - x86) E_MACHINE=386 ;;
37 - *) E_MACHINE=`echo ${ARCH} | tr '[:lower:]' '[:upper:]'` ;;
38 - esac
39 - E_MACHINE="EM_${E_MACHINE}"
40 -
41 LIBC="__LIBC__"
42 case ${CHOST} in
43 *gnu*) LIBC=glibc ;;
44 @@ -66,13 +55,10 @@ cross_wrap_etc()
45
46 sed -i \
47 -e "s:__LIBC__:${LIBC}:g" \
48 - -e "s:__E_MACHINE__:${E_MACHINE}:g" \
49 -e "s:__ARCH__:${ARCH}:g" \
50 -e "s:__CHOST__:${CHOST}:g" \
51 -e "s:__CBUILD__:${CBUILD}:g" \
52 "${conf}"
53 - [[ ${EM_MACHINE} == "EM_UNKNOWN" ]] \
54 - && sed -i '/^E_MACHINE/s:^:#:' "${conf}"
55
56 # Merge UCLIBC_CPU from env only
57 local v
58
59 diff --git a/wrappers/etc/portage/bashrc b/wrappers/etc/portage/bashrc
60 deleted file mode 100644
61 index 4ca2768..0000000
62 --- a/wrappers/etc/portage/bashrc
63 +++ /dev/null
64 @@ -1,20 +0,0 @@
65 -[[ $(basename $(readlink -f $PORTAGE_CONFIGROOT/etc/portage/make.profile)) == "embedded" ]] && . ${PORTDIR}/profiles/base/profile.bashrc
66 -
67 -post_src_install() {
68 - [[ -d ${D} ]] || return 0
69 - [[ ${E_MACHINE} == "" ]] && return 0
70 - cmdline=""
71 - for EM in $E_MACHINE; do
72 - cmdline+=" -e ^${EM}[[:space:]]";
73 - done
74 - output="$( cd ${D} && scanelf -RmyBF%a . | grep -v ${cmdline} )"
75 - [[ $output != "" ]] && { echo; echo "* Wrong EM_TYPE. Expected ${E_MACHINE}"; echo -e "${output}"; echo; exit 1; }
76 -}
77 -
78 -# We don't run this on the assumption that when you're
79 -# emerging binary packages, it's into a runtime ROOT
80 -# rather than build development ROOT. The former doesn't
81 -# want hacking while the latter does.
82 -if [[ $EBUILD_PHASE == "postinst" ]]; then
83 - [[ $SYSROOT == $ROOT ]] && cross-fix-root ${CHOST}
84 -fi
85
86 diff --git a/wrappers/etc/portage/make.conf b/wrappers/etc/portage/make.conf
87 index 82e489b..6c1ffbd 100644
88 --- a/wrappers/etc/portage/make.conf
89 +++ b/wrappers/etc/portage/make.conf
90 @@ -3,7 +3,6 @@ CBUILD=__CBUILD__
91 ARCH=__ARCH__
92
93 HOSTCC=__CBUILD__-gcc
94 -E_MACHINE=__E_MACHINE__
95
96 ROOT=/usr/${CHOST}/