Well....
quite embarassing to realize, that Pankso had the cross-toolchain ready already 5 years ago and I simply didn't understand what was directly in front of my eyes...
But that may also depend on the fact, that the cross compile
script halted with errors in my config all the time and I wasn't able to grab the faults.
Now that I invested some time into "Cross Linux from scratch" I found the bug that intimidated me (and maybe others, too). In addition, I patched cross.conf
and /usr/bin/cross
. As a first step, I took the packages, that CLFS uses in the latest version (apart from the Kernel) and want to step ahead from there...
So what did I do?
1.) I changed the command order in /usr/bin/cross
in the procedure `compile.
glibc-headers depends on the Kernel headers being present. In the script, glibc_headers was called BEFORE kernel_headers. Changing the order leads to a working compilation.
2.) I copied the line to identify the number of possible threads into the script: THREADS=$(grep processor /proc/cpuinfo | wc -l)
and added the parameter to the make
commands (make -j$THREADS
)
3.) Since tar is able to identify the correct decompressor by itself, I changed the tar -x[j|J]f
commands to simply tar -xf
, gaining some flexibility for a change of provided source packages.
4.) Due to the updated sources, the --enable-kernel=
parameter for glibc compilation was changed to the minimum version of 3.12.0 (as documented in CLFS).
5.) I changed /etc/slitaz/cross.conf
to contain the updated version information.
With these settings, I am reliably able to produce a cross-toolchain that cooks x86_64 tazpkgs.
!!! BUT BEWARE !!!
Using this toolchain and the available x86_64 receipts in the wok, some of the packages are produced flawlessly (beginning with m4, the compressors and more). But some others (like bison) BREAK THE SYSTEM COMPLETELY during the optimisation of the package by deleting most of the system files.
SO USE THIS ON A SYSTEM RUNNING IN RAM ONLY, NOT ON A HD-INSTALLED ONE!
I guess we will have to dig deeper into the cook scripts to find that one...
I'll post the patches in a minute...