Bugzilla – Bug 15712
Stage 1/3 of eglibc based sorcery
Last modified: 2010-05-18 14:35:11 UTC
What this is is a stable cross-compiler that can compile gcc executables using eglibc. What this isn't is a stable eglibc that can build sorcery-compatible executeables. There is a plan to get to point B (see below), but I don't have the time. I'd attempted to get an eglibc spell using a new grimoire, which when cast in a fresh copy of sourcemage, would allow stable grimoire spells to be cast on top of it. I was doing it primarily to help myself, as it would allow me to take advantage of sourcemage spells on the system I'm already using. I was doing it using the instructions here, http://trac.cross-lfs.org/ from the SVN-20100103 version, slightly modified as follows: -no /tools or /cross-tools directories, everything built in /usr/src -instead of making a new chroot/system, overwriting or "possessing" the build environment with a new core system using the eglibc c library Essentially, I was going to go through chapters 5 and 6, and then build the new C library, and then cast enough stable grimoire spells (modified however I had to to make them work) to be able to use the stable grimoire without modification. In reality, I got as far as completing chapter 5. The temporary version of GMP won't build, and summer semester is starting at school, so I just don't have the time. I want the fruits of my labor to help other people with the same goal, so I'm posting my progress. The problem it's facing right now is really simple: the C compiler works great, and the C++ compiler works, but doesn't have access to any of the C++ headers (iostream, etc). They don't even get built. Basically, this was the planned workflow -Build a static C compiler with its library built-in -Use it to build a temporary eglibc -Use that temporary eglibc and the static compiler to build a cross compiler -Use that cross compiler to build a temporary toolchain -Use the temporary toolchain to replace the host system's C library (the temporary toolchain is necessary because this step breaks EVERY SINGLE ONE of the host's tools) -Use the new C library to build a new "native" compiler -Use the new compiler and new library to build the core system to the point where it's stable enough to build sourcemage I got up to step 3 before giving up.
Thanks Sean. :) Do you have a patch that brings eglibc (and any other necessary changes) up to where you left off?
(In reply to comment #1) > Thanks Sean. :) Do you have a patch that brings eglibc (and any other necessary > changes) up to where you left off? What I uploaded is a tarball with a git archive in it, in the state I left it in. It's all in there and I tried to be really thorough with my log entries. When I abbreviate, "w" = "wrote" "c" = "compiled" "i" = "installed" "wci" = "wrote, compiled, installed" I also updated the HISTORY entry with each spell
(In reply to comment #2) > (In reply to comment #1) > > Thanks Sean. :) Do you have a patch that brings eglibc (and any other necessary > > changes) up to where you left off? > > What I uploaded is a tarball with a git archive in it, in the state I left it > in. It's all in there and I tried to be really thorough with my log entries. > > When I abbreviate, > > "w" = "wrote" > "c" = "compiled" > "i" = "installed" > "wci" = "wrote, compiled, installed" > > I also updated the HISTORY entry with each spell One other detail I forgot to mention, I was building with /usr/src on a ramdisk. The spells are set up to tarball /usr/src/cross-tools -> /var/lib/sorcery/codex/cross/cross-tools-current.tar.bz2 and /usr/src/eglibc-temp -> /var/lib/sorcery/codex/cross/eglibc-temp-current.tar.bz2 after every spell is cast (in the spell's FINAL script) to accomodate this. Building with /usr/src on a ramdisk (mount -t tmpfs -o size=2.5G smglbuild /usr/src) is done to make things build faster, and so I have an easy and convenient way to make sure absolutely nothing is depeneding on the temporary toolchain in the final system. It is, however, not necessary at all. The depends are set up so if you cast gcc-cross you'll be caught up to the point I left off. gmp-temp was what I was writing, and it won't build yet.
Created attachment 7461 [details] CLFS SVN 20100103 This is my copy of the CLFS book, figured it would help too. It's in html.
(In reply to comment #2) > (In reply to comment #1) > > Thanks Sean. :) Do you have a patch that brings eglibc (and any other necessary > > changes) up to where you left off? > > What I uploaded is a tarball with a git archive in it, in the state I left it > in. It's all in there and I tried to be really thorough with my log entries. Your only upload is "CLFS SVN 20100103" (which was added afterwards). :)
Created attachment 7462 [details] Grimoire containing cross-compile toolchain Sorry about that. Here's the actual grimoire.
(In reply to comment #6) > Created an attachment (id=7462) [details] > Grimoire containing cross-compile toolchain > > Sorry about that. Here's the actual grimoire. I had to delete the git log because it captured a few binaries and it was huge.