1 |
Hi all, |
2 |
|
3 |
I now have a working RAP environment on ppc64. |
4 |
So here is a bit of recipe to achieve this: |
5 |
* There is no current ppc64 profile, so one has to be |
6 |
created during stage 1. |
7 |
I copied the ppc64 from prefix/linux to prefix/linux-standalone. |
8 |
Replace make.default inside prefix/linux-standalone/ppc64 |
9 |
by the one in prefix/linux-standalone/amd64. |
10 |
Copy the "legacy" folder from prefix/linux-standalone/amd64 |
11 |
to prefix/linux-standalone/ppc64. |
12 |
|
13 |
* Make sure help2man is installed on the host system (for bison). |
14 |
|
15 |
* I would like the following patch to be considered |
16 |
for the bootstrap script |
17 |
--- bootstrap-rap.sh.orig 2017-01-24 12:20:27.304355158 +1300 |
18 |
|
19 |
|
20 |
+++ bootstrap-rap.sh 2017-01-24 12:34:30.325185905 +1300 |
21 |
|
22 |
|
23 |
@@ -1382,8 +1382,8 @@ |
24 |
|
25 |
|
26 |
sys-libs/ncurses |
27 |
|
28 |
|
29 |
sys-libs/readline |
30 |
|
31 |
|
32 |
app-shells/bash |
33 |
|
34 |
|
35 |
- sys-apps/sed |
36 |
|
37 |
|
38 |
app-arch/xz-utils |
39 |
|
40 |
|
41 |
+ sys-apps/sed |
42 |
|
43 |
|
44 |
sys-apps/gentoo-functions |
45 |
|
46 |
|
47 |
sys-apps/baselayout-prefix |
48 |
|
49 |
|
50 |
dev-libs/libffi |
51 |
|
52 |
|
53 |
@@ -1511,10 +1511,12 @@ |
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
if is-rap ; then |
60 |
|
61 |
|
62 |
# We need ${ROOT}/usr/bin/perl to merge glibc. |
63 |
|
64 |
|
65 |
+ PERL_NOT_INSTALLED=0 |
66 |
|
67 |
|
68 |
if [[ ! -x "${ROOT}"/usr/bin/perl ]]; then |
69 |
|
70 |
|
71 |
# trick "perl -V:apiversion" check of |
72 |
glibc-2.19. |
73 |
|
74 |
echo -e "#!${ROOT}/bin/sh\necho |
75 |
'apiversion=9999'" > "${ROOT}"/usr/bin/perl |
76 |
|
77 |
chmod +x "${ROOT}"/usr/bin/perl |
78 |
|
79 |
|
80 |
+ PERL_NOT_INSTALLED=1 |
81 |
|
82 |
|
83 |
fi |
84 |
|
85 |
|
86 |
# Tell dynamic loader the path of libgcc_s.so of stage2 |
87 |
|
88 |
|
89 |
if [[ ! -f "${ROOT}"/etc/ld.so.conf.d/stage2.conf ]]; |
90 |
then |
91 |
|
92 |
@@ -1532,11 +1534,12 @@ |
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
BOOTSTRAP_RAP=yes \ |
99 |
|
100 |
|
101 |
emerge_pkgs --nodeps "${pkgs[@]}" || return 1 |
102 |
|
103 |
|
104 |
- rm "${ROOT}"/usr/bin/perl |
105 |
|
106 |
|
107 |
+ # Do not mindlessly remove perl. Only if it wasnt |
108 |
present in the first place. |
109 |
|
110 |
+ [[ ${PERL_NOT_INSTALLED} == 1 ]] && rm |
111 |
"${ROOT}"/usr/bin/perl |
112 |
|
113 |
else |
114 |
|
115 |
|
116 |
pkgs=( |
117 |
|
118 |
|
119 |
- sys-apps/sed |
120 |
|
121 |
|
122 |
app-arch/xz-utils |
123 |
|
124 |
|
125 |
+ sys-apps/sed |
126 |
|
127 |
|
128 |
sys-apps/gentoo-functions |
129 |
sys-apps/baselayout-prefix |
130 |
sys-devel/m4 |
131 |
|
132 |
The latest version of sed is compressed with xz which |
133 |
means the bootstrap will fail if xz-utils is not installed |
134 |
in /bin or /usr/bin. |
135 |
Newer distro probably have it but not older ones. |
136 |
So we should move xz-utils before sed. |
137 |
|
138 |
The other part of the patch is specific to RAP and is |
139 |
vexing. RAP adds a fake perl executable before building |
140 |
glibc in case perl is not already there - and remove it, |
141 |
unconditionally. So you are here you had a failure in stage3 |
142 |
after glibc has been merged and then perl has been merged. |
143 |
You fixed whatever needs fixing and restart the bootstrap |
144 |
and it removes your perl binary. And then you spend some |
145 |
time wondering why autoconf failed while emerging something. |
146 |
So I added a guard - only remove the perl executable if it is |
147 |
the fake one. I guess that could be improved by actually |
148 |
checking the file itself for the content of the fake perl. |
149 |
|
150 |
* As per another post the current bits to set the RAP glibc |
151 |
to be used by gcc are not sufficient for ppc64. My profile.bashrc |
152 |
has the following |
153 |
if [[ ${CATEGORY}/${PN} == sys-devel/gcc && ${EBUILD_PHASE} == configure |
154 |
]]; then |
155 |
cd "${S}" |
156 |
einfo "Prefixifying dynamic linkers..." |
157 |
for h in gcc/config/*/*linux*.h; do |
158 |
ebegin " Updating $h" |
159 |
sed -i -r "/_DYNAMIC_LINKER/s,([\":])(/lib),\1${EPREFIX}\2,g" $h |
160 |
eend $? |
161 |
done |
162 |
|
163 |
|
164 |
The only change being to the sed line. |
165 |
|
166 |
Francois |