Transforming my toolchain style (in gentoo)
This is rather gentoo-specific, so I'll clarify it because context, after that attempt to abstract it to a common linux equipment.
I accidently set my CHOST to "i686-pc-linux-gnu" at first, not listening, when my equipment is a Athlon64. I would love to transform it to "x86_64-pc-linux-gnu". There is a guide for this. It does not function.
The very first step is "Recompile binutils, after that recompile gcc"
Here's the trouble highlighted:
- Compile binutils making use of gcc - this does well generating new as, ar, and so on documents
- This breaks gcc. gcc is currently attempting to make use of the new/ usr/bin/as - yet it can not collaborate with them
- Given that gcc can not compile anything, I can not compile gcc. I need to change as, ar, etc; after that change the CHOST adjustment, and also recompile binutils.
So I attempted the adhering to:
- back up as, ar, etc
- Compile binutils, providing gcc inoperabe
- link ar, as, etc to the old variations I supported
- attempt to compile gcc
The gcc compile falls short with:
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc /usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc /usr/x86_64-pc-linux-gnu/bin/ld: cannot find -lc collect2: ld returned 1 exit status
This is a glibc mistake (finishing the chain).
So it appears:
- for gcc to compile it has a dependence on the new variation glibc
- for gcc to run, binutils have to be the older variation
The actions I have not attempted, due to the fact that it's so difficult I intended to interview first, are:
- compile binutils under new style,
- relink as, ar, etc to old executables
- compile new glibc with old-gcc and also old-binutils
- compile new-gcc with old-gcc and also old-binutils yet new-glibc
- relink as, ars, etc to new-binutils
- recompile every little thing like an employer
Exists any kind of opportunity of # 4 over functioning? Do I have any kind of hope of completing this without a full reinstall?
If your bit is 64 - little bit (therefore you can run 64 - little bit binaries), you can start a new x86_64 Gentoo install in a chroot, adhering to the common guidelines. I've done comparable in the past-- properly a reinstall, yet while still running the old system. If you do not have an extra block tool to install to, you can make use of a subdirectory and also either boot with
init=chroot\040/new\040/bin/sinit or fall to a marginal setting to shuffle directory sites around.
If your bit is 32 - little bit, locate a 64 - little bit kernel or construct a cross - compiler to 64 - little bit to construct a 64 - little bit kernel, boot it, after that see above.
As much as I recognize it is not feasible. Please bear in mind that toolchain does not exist in vaccum and also is interlinked.
What could function is to construct cross-compiler of new framework yet I actually question it - the "atomicity" on upgrade of glibc will certainly damage every little thing.
I would certainly suggestions back-up & reinstall of system.