r/linuxfromscratch • u/Ezio_rev • Jun 05 '24
Why do we need to create the compiler using 2 steps?
in the toolchain technical notes it said we need to create a cross compiler that will create a native compiler which will compile our distro.
but why not use the host compiler to directly create a native compiler?
Or why not compile all the distro using the cross compiler that we created, why the native compiler is needed?
3
Upvotes
5
u/Rockytriton Mod Jun 05 '24
it's to ensure that there are no host dependencies built with the compiler you will end up using in the LFS environment
2
u/lanjelin Jun 05 '24
From my understanding, it’s to ensure compability and stability by using libraries and such on the distro you’re building, instead of trusting everything on the host is compatible.
-8
u/nlantau Jun 05 '24
Why do Linux from scratch when you could install Ubuntu with a few mouse clicks?