Opened 11 years ago

Last modified 9 years ago

#956 new task

Do away with /tools and /cross-tools symlinks

Reported by: chris@… Owned by: clfs-commits@…
Priority: minor Milestone:
Component: BOOK Version:
Keywords: Cc: berzerkula@…, jonathan@…

Description (last modified by William Harrington)

I believe there's no real reason to keep the /tools and /cross-tools symlinks, so they can just be disposed of. We already use --with-sysroot in the cross-toolchain, so we may as well take full advantage of it. This would also allow for building the whole temp-system without the need for any root access, or testing multiple builds at once with jhalfs or similar tools. Plus, I believe in general that reducing host system modifications is a good thing.

I've managed to get almost a complete temp system this way, so far. Of course I modified most references to "/tools" and "/cross-tools" in the cross-tools, temp-system and boot sections by prefixing them with "${CLFS}", and added "DESTDIR=${CLFS}" to the installation commands for temp-system/boot packages. Aside from those, the only changes I've had to make was adding "--with-sysroot" to temp-system MPFR and MPC, due to libtool problems (not finding libgmp.la), and modifying Util-linux instructions so that it links to libpthread, as it does not do so automatically. I've hit similar problems with boot/e2fsprogs, as apparently dependent libraries are not being automatically found. If something links to librt, it will be located in ${CLFS}/tools, but then libpthread, which librt links to, will not. However, it works fine if both are explicitly specified. In other words, if I create a dummy.c with "main(){}"...

${CC} dummy.c -lrt

fails due to not finding libpthread, but

${CC} dummy.c -lrt -libpthread

works just fine. I've been trying to find the cause for this, with assistance from William Harrington in the chat room, who suspects there might be a problem with -rpath or something similar. Compiling Glibc with LDFLAGS="-Wl,rpath,/tools/lib:${CLFS}/tools/lib" does not seem to help, though.

I have a patch with the changes I've made so far on my local copy - http://www.clfs.org/~chris/no-tools.patch

Attachments (1)

no-tools.patch (75.4 KB ) - added by William Harrington 9 years ago.
Original patch from Chris

Download all attachments as: .zip

Change History (5)

comment:1 by chris@…, 11 years ago

Description: modified (diff)

comment:2 by chris@…, 11 years ago

Priority: majorminor

comment:3 by William Harrington, 9 years ago

Chris, the patch isn't in your home directory. I hope you still have it saved somewhere. Can you attach it to this ticket rather than linking it to the web server. I want to test some things and maybe get this in the book sometime.

by William Harrington, 9 years ago

Attachment: no-tools.patch added

Original patch from Chris

comment:4 by William Harrington, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.