Changes in chapter05/glibc.xml [dea5385:360fdfca]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter05/glibc.xml
rdea5385 r360fdfca 48 48 operation of the dynamic library loader:</para> 49 49 50 <screen arch="default"><userinput remap="pre">case $(uname -m) in50 <screen><userinput remap="pre">case $(uname -m) in 51 51 i?86) ln -sfv ld-linux.so.2 $LFS/lib/ld-lsb.so.3 52 52 ;; … … 55 55 ;; 56 56 esac</userinput></screen> 57 <!-- no ld-linux.so.2 here as multilib is based on x86_64, not on i686 -->58 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib6459 ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3</userinput></screen>60 57 61 58 <note> … … 217 214 <screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen> 218 215 219 <para arch="default">Note that for 32-bit machines, the interpreter name will be216 <para>Note that for 32-bit machines, the interpreter name will be 220 217 <filename>/lib/ld-linux.so.2</filename>.</para> 221 218 … … 245 242 </sect2> 246 243 247 <!-- - - - - - - - - - -->248 <!-- Multilib - 32bit -->249 <!-- - - - - - - - - - -->250 <sect2 arch="ml_32,ml_all">251 <title>Building Glibc - 32bit</title>252 253 <para>Now recompile for m32. The extracted source can be254 reused but needs to be cleaned before installing the m32255 version of Glibc.</para>256 257 <para>Clear the build directory and remove artefacts from258 previous build:</para>259 260 <screen><userinput remap="pre">make clean261 find .. -name "*.a" -delete</userinput></screen>262 263 <para>Configure Glibc for m32 with the following commands:</para>264 265 <screen><userinput remap="configure">CC="$LFS_TGT-gcc -m32" \266 CXX="$LFS_TGT-g++ -m32" \267 ../configure \268 --prefix=/usr \269 --host=$LFS_TGT32 \270 --build=$(../scripts/config.guess) \271 --enable-kernel=&min-kernel; \272 --with-headers=$LFS/usr/include \273 --disable-nscd \274 --libdir=/usr/lib32 \275 --libexecdir=/usr/lib32 \276 libc_cv_slibdir=/usr/lib32</userinput></screen>277 278 <para>Compile the package:</para>279 280 <screen><userinput remap="make">make</userinput></screen>281 282 <para>Install the package:</para>283 284 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install285 cp -a DESTDIR/usr/lib32 $LFS/usr/286 install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-32.h \287 $LFS/usr/include/gnu/288 ln -svf ../lib32/ld-linux.so.2 $LFS/lib/ld-linux.so.2</userinput></screen>289 290 291 <caution>292 <para>At this point, it is imperative to stop and ensure that the basic293 functions (compiling and linking) of the new toolchain are working as294 expected. To perform a sanity check, run the following commands:</para>295 296 <screen><userinput>echo 'int main(){}' > dummy.c297 $LFS_TGT-gcc -m32 dummy.c298 readelf -l a.out | grep '/ld-linux'</userinput></screen>299 300 <para>If everything is working correctly, there should be no errors,301 and the output of the last command will be of the form:</para>302 303 <screen><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen>304 305 <para>If the output is not shown as above or there was no output at all,306 then something is wrong. Investigate and retrace the steps to find out307 where the problem is and correct it. This issue must be resolved before308 continuing on.</para>309 310 <para>Once all is well, clean up the test files:</para>311 312 <screen><userinput>rm -v dummy.c a.out</userinput></screen>313 314 </caution>315 316 </sect2><!-- m32 -->317 318 <!-- - - - - - - - - - -->319 <!-- Multilib - x32bit -->320 <!-- - - - - - - - - - -->321 322 <sect2 arch="ml_x32,ml_all">323 <title>Building Glibc - x32bit</title>324 325 <para>Now recompile for mx32. The extracted source can be326 reused but needs to be cleaned before installing the mx32327 version of Glibc.</para>328 329 <para>Clear the build directory and remove artefacts from330 previous build:</para>331 332 <screen><userinput remap="pre">make clean333 find .. -name "*.a" -delete</userinput></screen>334 335 <para>Configure Glibc for mx32 with the following commands:</para>336 337 <screen><userinput remap="configure">CC="$LFS_TGT-gcc -mx32" \338 CXX="$LFS_TGT-g++ -mx32" \339 ../configure \340 --prefix=/usr \341 --host=$LFS_TGTX32 \342 --build=$(../scripts/config.guess) \343 --enable-kernel=&min-kernel; \344 --with-headers=$LFS/usr/include \345 --disable-nscd \346 --libdir=/usr/libx32 \347 --libexecdir=/usr/libx32 \348 libc_cv_slibdir=/usr/libx32</userinput></screen>349 350 <para>Compile the package:</para>351 352 <screen><userinput remap="make">make</userinput></screen>353 354 <para>Install the package:</para>355 356 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install357 cp -a DESTDIR/usr/libx32 $LFS/usr/358 install -vm644 DESTDIR/usr/include/gnu/{lib-names,stubs}-x32.h \359 $LFS/usr/include/gnu/360 ln -svf ../libx32/ld-linux-x32.so.2 $LFS/lib/ld-linux-x32.so.2</userinput></screen>361 362 <caution>363 <para>At this point, it is imperative to stop and ensure that the basic364 functions (compiling and linking) of the new toolchain are working as365 expected. To perform a sanity check, run the following commands:</para>366 367 <screen><userinput>echo 'int main(){}' > dummy.c368 $LFS_TGT-gcc -mx32 dummy.c369 readelf -l a.out | grep '/ld-linux-x32'</userinput></screen>370 371 <para>If everything is working correctly, there should be no errors,372 and the output of the last command will be of the form:</para>373 374 <screen><computeroutput>[Requesting program interpreter: /libx32/ld-linux-x32.so.2]</computeroutput></screen>375 376 <para>If the output is not shown as above or there was no output at all,377 then something is wrong. Investigate and retrace the steps to find out378 where the problem is and correct it. This issue must be resolved before379 continuing on.</para>380 381 <para>Once all is well, clean up the test files:</para>382 383 <screen><userinput>rm -v dummy.c a.out</userinput></screen>384 385 </caution>386 387 </sect2><!-- mx32 -->388 389 244 <sect2 role="content"> 390 245 <title/>
Note:
See TracChangeset
for help on using the changeset viewer.