Why several passages to create Linux From Scratch (LFS)?

I am trying to understand the Linux From Scratch concept and would like to know why there are several construction passes binutils, gccetc.

Why do we need to pass pass1 and pass2 separately? Why can not we create tools to pass 1, and then use them to build gcc, glibc, libstdc++etc.

+4
source share
2 answers

The goal is to ensure that your assembly is consistent, no matter which compiler you use to compile your compiler (and therefore what errors this compiler has).

, gcc 4.1 gcc 3.2 ( gcc 3.2 "stage-0" ). , QA gcc 4.1, , , gcc 4.1 - , gcc 1, -1 stage-2, stage-0 .

gcc stage-2 3 : .

(, , , . Trust ​​).


gcc , : - glibc-xy , glibc-xy, , glibc-x. (y-1), , , , ( ) , : , ( ) !

+6

, , , : " ".

- /config/libs . , . , ( ), pkg .

, Debian 4 Fedora 27 ( ). 27 . , , ​​ .

LFS , x86-to-x86 binutils gcc- , , , glibc. 2 (binutils gcc) -, , -/libs/config . ( Stage 3) 2. ( ) , , . , PATH =/bin:/usr/bin:/tools/bin; , , , .

. , Smoothwall Express pkgs, . , . LFS, , . , -. Debian 8, , , Gentoo, .

0

Source: https://habr.com/ru/post/1656872/


All Articles