On Mon, 2020-05-11 at 19:51 +0800, Xi Ruoyao via lfs-dev wrote:
I just redone LFS build for GCC-10.1.0. I proposed several
improvements during
the process:
At first, some changes suggested by Firas:
1. Remove bzip2 in Chap. 5. No other changes needed.
decreases the total number of SBUs by 0.1 :) why not, though
2. Remove ncurses in Chap. 5. Move Chap. 6 readline after ncurses to
satisify
it.
Notes:
(1) Chap. 5 Python 3 can be built w/o ncurses, just lacking one
module we don't
need.
(2) We moved readline before bc to satisify GNU bc, but now Gavin's
bc doesn't
need readline.
good point
(3) It slightly reduces the functionality of Chap. 5 bash. Long
command lines
won't be wrapped automatically anymore.
It does much more than that if the terminfo database is not installed:
no backspace (more exactly, backspace outputs only a space forward...)
left and right arrows not functional.
In short, no way to correct a typo
can be Ok if scripting though
3. Remove flex in Chap. 5. Move Chap. 6 flex before Binutils so
`ranlib` and
`ar` can link to libfl.so. It seems bison test suite does not
depends on flex
any more.
bison chapter 6 will be built after flex anyway, if we do the above, so
whether it depends on it or not is not important.
However Firas' other suggestions are proved to be impossible. Glibc
requires
bison, gzip, gettext, perl, texinfo, python, and xz (to be untarred)
so all of
them need to stay in Chap. 5. Util-linux can't be removed from Chap.
5 due to
its circular dependency with systemd/eudev.
And:
4. Move Chap. 6 zstd before GCC, so GCC can link to libzstd.so and
use zstd to
compress LTO stream.
definitely to be done, independently on the other points.
5. Remove PKG_CONFIG_PATH=/tools/lib/pkgconfig in Chap. 6 kbd. It
seems
unneeded now.
6. Remove PERL5LIB=$PWD/tests/ in Chap. 6 make. It is unneeded now.
7. Add:
mkdir /tools/lib/locale
localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true
into Chap. 5 Glibc. It will satisfy Chap. 6 man-db test.
Or link /tools/share/locale/locale-archive->/usr/share/locale/locale-
archive
allows also all bison tests to pass
8. Remove libctf{,-nobfd}.a (along with libbfd.a and libopcodes.a) in
"Cleaning
up" section.
Independent on the other points and should be done for sure.
Are they OK to be committed into trunk?
I'd say point 2 shouldn't not be committed, or only with some tweak of
the terminfo database...
among the other points:
- 4 and 8 should be done for sure.
- I've not tested 5 and 6, but I guess you have tested them, so go for
them too
- I'd rather use the link for point 7 (less instructions in chap 5
glibc). This is just one more line in "creating essentials symlinks and
files".
- I'm not sure about point 3: building flex only once is tempting, but
can the tests be run, and is flex the same as if rebuilt at the end of
chap 6?
- Point 1 improves only marginally the build time, but why not?