1 |
commit: 499248ea415abdb6b171138a57e343bd779bafa2 |
2 |
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 26 07:06:09 2016 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 26 13:55:41 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=499248ea |
7 |
|
8 |
bootstrap-prefix.sh: no USR SPLIT for RAP. Support Debian multiarch. |
9 |
|
10 |
scripts/bootstrap-prefix.sh | 82 +++------------------------------------------ |
11 |
1 file changed, 5 insertions(+), 77 deletions(-) |
12 |
|
13 |
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh |
14 |
index 63451ce..9990e41 100755 |
15 |
--- a/scripts/bootstrap-prefix.sh |
16 |
+++ b/scripts/bootstrap-prefix.sh |
17 |
@@ -225,7 +225,7 @@ bootstrap_setup() { |
18 |
echo "CONFIG_SHELL=\"${ROOT}/bin/bash\"" |
19 |
rapx "# sandbox does not work well on Prefix, bug 490246" |
20 |
rapx 'FEATURES="-usersandbox -sandbox"' |
21 |
- if [[ -n ${PREFIX_DISABLE_USR_SPLIT} ]] ; then |
22 |
+ if [[ !is-rap && -n ${PREFIX_DISABLE_USR_SPLIT} ]] ; then |
23 |
echo |
24 |
echo "# This disables /usr-split, removing this will break" |
25 |
echo "PREFIX_DISABLE_GEN_USR_LDSCRIPT=yes" |
26 |
@@ -1476,83 +1476,11 @@ bootstrap_interactive() { |
27 |
# eventually ends up in make.conf, see the end of stage3. We don't |
28 |
# do this in bootstrap_setup() because in that case we'd also have |
29 |
# to cater for getting this right with manual bootstraps. |
30 |
- export PREFIX_DISABLE_USR_SPLIT=yes |
31 |
+ is-rap || export PREFIX_DISABLE_USR_SPLIT=yes |
32 |
|
33 |
- # immediately die on platforms that we know are impossible due to |
34 |
- # brain-deadness (Debian/Ubuntu) or extremely hard dependency chains |
35 |
- # (TODO NetBSD/OpenBSD) |
36 |
- case ${CHOST} in |
37 |
- *-linux-gnu) |
38 |
- local toolchain_impossible= |
39 |
- # Figure out if this is Ubuntu... |
40 |
- if [[ $(lsb_release -is 2>/dev/null) == "Ubuntu" ]] ; then |
41 |
- case "$(lsb_release -sr)" in |
42 |
- [456789].*|10.*) |
43 |
- : # good versions |
44 |
- ;; |
45 |
- *) |
46 |
- # Debian/Ubuntu have seriously fscked up their |
47 |
- # toolchain to support their multi-arch crap |
48 |
- # since Natty (11.04) that noone really wants, |
49 |
- # and certainly not upstream. Some details: |
50 |
- # https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/738098 |
51 |
- toolchain_impossible="Ubuntu >= 11.04 (Natty)" |
52 |
- ;; |
53 |
- esac |
54 |
- fi |
55 |
- # Figure out if this is Debian |
56 |
- if [[ -e /etc/debian_release ]] ; then |
57 |
- case "$(< /etc/debian_release)" in |
58 |
- hamm/*|slink/*|potato/*|woody/*|sarge/*|etch/*|lenny/*|squeeze/*) |
59 |
- : # good versions |
60 |
- ;; |
61 |
- *) |
62 |
- # Debian introduced their big crap since Wheezy |
63 |
- # (7.0), like for Ubuntu, see above |
64 |
- toolchain_impossible="Debian >= 7.0 (Wheezy)" |
65 |
- ;; |
66 |
- esac |
67 |
- fi |
68 |
- if [[ -n ${toolchain_impossible} ]] ; then |
69 |
- # In short, it's impossible for us to compile a |
70 |
- # compiler, since 1) gcc picks up our ld, which doesn't |
71 |
- # support sysroot (can work around with a wrapper |
72 |
- # script), 2) headers and libs aren't found (symlink |
73 |
- # them to Prefix), 3) stuff like crtX.i isn't found |
74 |
- # during bootstrap, since the bootstrap compiler doesn't |
75 |
- # get any of our flags and doesn't know where to find |
76 |
- # them (even if we copied them). So we cannot do this, |
77 |
- # unless we use the Ubuntu patches in our ebuilds, which |
78 |
- # is a NO-GO area. |
79 |
- cat << EOF |
80 |
-Oh My! ${toolchain_impossible}! AAAAAAAAAAAAAAAAAAAAARGH! HELL comes over me! |
81 |
- |
82 |
-EOF |
83 |
- echo -n "..." |
84 |
- sleep 1 |
85 |
- echo -n "." |
86 |
- sleep 1 |
87 |
- echo -n "." |
88 |
- sleep 1 |
89 |
- echo -n "." |
90 |
- sleep 1 |
91 |
- echo |
92 |
- echo |
93 |
- cat << EOF |
94 |
-and over you. You're on the worst Linux distribution from a developer's |
95 |
-(and so Gentoo Prefix) perspective since http://wiki.debian.org/Multiarch/. |
96 |
-Due to this multi-arch idea, it is IMPOSSIBLE for Gentoo Prefix to |
97 |
-bootstrap a compiler without using Debuntu patches, which is an absolute |
98 |
-NO-GO area! GCC and binutils upstreams didn't just reject those patches |
99 |
-for fun. |
100 |
- |
101 |
-I really can't help you, and won't waste any of your time either. The |
102 |
-story simply ends here. Sorry. |
103 |
-EOF |
104 |
- exit 1 |
105 |
- fi |
106 |
- ;; |
107 |
- esac |
108 |
+ # TODO should immediately die on platforms that we know are |
109 |
+ # impossible due extremely hard dependency chains |
110 |
+ # (NetBSD/OpenBSD) |
111 |
|
112 |
cat <<"EOF" |