- Timestamp:
- 05/14/2021 10:47:43 AM (3 years ago)
- Branches:
- ml-11.0, multilib
- Children:
- 2606939
- Parents:
- 51c01bff
- Location:
- chapter05
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter05/gcc-pass1.xml
r51c01bff r0ebda11 79 79 80 80 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \ 81 -e '/m32=/s/m32=.*/m32=..\ &lib-m32;$(call if_multiarch,:i386-linux-gnu)/' \81 -e '/m32=/s/m32=.*/m32=..\/lib32$(call if_multiarch,:i386-linux-gnu)/' \ 82 82 -i.orig gcc/config/i386/t-linux64 83 83 </userinput></screen> -
chapter05/glibc.xml
r51c01bff r0ebda11 84 84 --enable-kernel=&min-kernel; \ 85 85 --with-headers=$LFS/usr/include \ 86 libc_cv_slibdir=/usr/lib</userinput></screen> 86 libc_cv_slibdir=/usr/lib \ 87 libc_cv_rtlddir=/usr/lib</userinput></screen> 87 88 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">../configure \ 88 89 --prefix=/usr \ … … 92 93 --with-headers=$LFS/usr/include \ 93 94 --enable-multi-arch \ 94 libc_cv_slibdir=/usr/lib</userinput></screen> 95 libc_cv_slibdir=/usr/lib \ 96 libc_cv_rtlddir=/usr/lib</userinput></screen> 95 97 96 98 <variablelist> … … 130 132 <para>This ensures that the library is installed in /usr/lib instead 131 133 of the default /lib64 on 64 bit machines.</para> 134 </listitem> 135 </varlistentry> 136 137 <varlistentry> 138 <term><parameter>libc_cv_rtlddir=/usr/lib</parameter></term> 139 <listitem> 140 <para>Fix hardcoded path to the executable loader in the 141 <command>ldd</command> script.</para> 132 142 </listitem> 133 143 </varlistentry> … … 197 207 </variablelist> 198 208 209 <!-- 210 The /usr which gets removed from the RTLDLIST by the sed 211 below is set by the libc_cv_rtlddir=/usr/lib above. When 212 changing the libc_cv_rtlddir to /lib, the content of the 213 ldd script does not need to be patched, but some other 214 symlinks created by glibc itself will be not that correct 215 and needs to be fixed by other symlinks. 216 217 First setting /usr and than removing /usr seems strange, 218 but it looks like that libc_cv_rtlddir has more effect than 219 only the pathes in ldd (it has influence on which symlinks 220 to the loader are created where) and makes the handling 221 in a multilib environment much easier. 222 To me, it feels better to go the way with adding/removing 223 /usr than to introduce a symlink hell. 224 225 Another option to get ldd working properly is to set a 226 symlink as "ln -svf lib /usr/lib64" but it has been reported 227 that we used that already years ago but dropped it since 228 libtool will complain sometimes with "library has been moved" 229 warnings. 230 Don't know if this is still the case - if not, this one 231 symlink seems to be the cleanest way and the sed on ldd will 232 be obsolete. 233 --> 234 <para>Fix hardcoded path to the executable loader in 235 <command>ldd</command> script:</para> 236 237 <screen><userinput remap="install">sed '/RTLDLIST=/s@/usr@@g' -i $LFS/usr/bin/ldd</userinput></screen> 238 199 239 <caution> 200 240 <para>At this point, it is imperative to stop and ensure that the basic … … 246 286 247 287 <para>Now recompile for m32. The extracted source can be 248 reused but needs to cleaned before installing the m32288 reused but needs to be cleaned before installing the m32 249 289 version of Glibc.</para> 250 290 … … 266 306 --with-headers=$LFS/usr/include \ 267 307 --enable-multi-arch \ 268 --libdir=&usr-lib-m32; \ 269 --libexecdir=&usr-lib-m32; \ 270 libc_cv_slibdir=&usr-lib-m32;</userinput></screen> 308 --libdir=/usr/lib32 \ 309 --libexecdir=/usr/lib32 \ 310 libc_cv_slibdir=/usr/lib32 \ 311 libc_cv_rtlddir=/usr/lib32</userinput></screen> 271 312 272 313 <para>Compile the package:</para> … … 277 318 278 319 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 279 cp -a DESTDIR &usr-lib-m32;$LFS/usr/320 cp -a DESTDIR/usr/lib32 $LFS/usr/ 280 321 install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-32.h \ 281 322 $LFS/usr/include/gnu/ 282 ln -svf ..&lib-m32;/ld-linux.so.2 $LFS/lib/ld-linux.so.2</userinput></screen> 323 ln -svf ../lib32/ld-linux.so.2 $LFS/lib/ld-linux.so.2</userinput></screen> 324 283 325 284 326 <caution> … … 317 359 318 360 <para>Now recompile for mx32. The extracted source can be 319 reused but needs to cleaned before installing the mx32361 reused but needs to be cleaned before installing the mx32 320 362 version of Glibc.</para> 321 363 … … 337 379 --with-headers=$LFS/usr/include \ 338 380 --enable-multi-arch \ 339 --libdir=&usr-lib-mx32; \ 340 --libexecdir=&usr-lib-mx32; \ 341 libc_cv_slibdir=&usr-lib-mx32;</userinput></screen> 381 --libdir=/usr/libx32 \ 382 --libexecdir=/usr/libx32 \ 383 libc_cv_slibdir=/usr/libx32 \ 384 libc_cv_rtlddir=/usr/libx32</userinput></screen> 342 385 343 386 <para>Compile the package:</para> … … 348 391 349 392 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 350 cp -a DESTDIR &usr-lib-mx32;$LFS/usr/393 cp -a DESTDIR/usr/libx32 $LFS/usr/ 351 394 install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-x32.h \ 352 395 $LFS/usr/include/gnu/ 353 ln -svf .. &lib-mx32;/ld-linux-x32.so.2 $LFS/lib/ld-linux-x32.so.2</userinput></screen>396 ln -svf ../libx32/ld-linux-x32.so.2 $LFS/lib/ld-linux-x32.so.2</userinput></screen> 354 397 355 398 <caution>
Note:
See TracChangeset
for help on using the changeset viewer.