Linux from Scratch version 10.0 released
a project that provides you with step-by-step instructions for building your own customized Linux system entirely from source"; BLFS picks up where LFS leaves off. Both books are available online either with or without systemd: LFS System V, LFS systemd, BLFS System V, and BLFS systemd. "
The LFS release includes updates to glibc-2.31, and binutils-2.34. A total of 35 packages have been updated. A new package, zstd-1.4.4, has also been added. Changes to text have been made throughout the book. The Linux kernel has also been updated to version 5.5.3. The BLFS version includes approximately 1000 packages beyond the base Linux From Scratch Version 9.1 book. This release has over 840 updates from the previous version in addition to numerous text and formatting changes."
Posted Sep 5, 2020 14:43 UTC (Sat)
by tjc (guest, #137)
[Link]
Posted Sep 6, 2020 10:21 UTC (Sun)
by ppisa (subscriber, #67307)
[Link] (3 responses)
I start with binutils
I believe that this way I obtain clean build not influenced by any previous toolchains decisions.
Have somebody idea, if this solution has some drawbacks why it should not be used and why LFS does not use it? I expect that LFS is result of many people much more knowable than me.
Posted Sep 6, 2020 10:32 UTC (Sun)
by ppisa (subscriber, #67307)
[Link]
For PowerPC there was some fun to decide some choices to be compatible with other Linux distros in the past (example from 2008)
Posted Sep 7, 2020 17:23 UTC (Mon)
by jsm28 (subscriber, #104141)
[Link] (1 responses)
https://sourceware.org/legacy-ml/libc-alpha/2018-03/msg00... discusses these bootstrap processes in more detail.
Posted Sep 7, 2020 18:16 UTC (Mon)
by ppisa (subscriber, #67307)
[Link]
Linux from Scratch version 10.0 released
I am curious for (may it be 10 years) why the Linux from Scratch is using newlib trick to bring-up toolchain. In the fact I have even fear that configuring final toolchain with Newlib based one installed and its libraries used for final configure can lead to contamination of configure decisions by newlib limitations. When I want to have compatible toolchain, I use real target system tree as sysroot. When I want to have clean, GCC, glibc developers proposed clean unpolluted configuration, then I use Glibc install-headers.
Linux from Scratch version 10.0 released
CFLAGS=-O2 LDFLAGS=-s \
../../../src/binutils/configure \
--prefix=/usr \
--exec-prefix=/usr \
--disable-nls \
--with-gnu-ld --with-gnu-as \
--verbose --with-mmap --enable-64-bit-bfd \
--build=x86_64-linux-gnu \
--host=x86_64-linux-gnu \
--target=riscv64-linux-gnu \
\
--enable-targets=riscv64-linux-gnu \
--enable-threads=posix \
--enable-linker-build-id \
--enable-gnu-unique-object \
--with-sysroot=/usr/riscv64-linux-gnu/sys-root \
--with-system-zlib \
--enable-multiarch \
--disable-werror \
--enable-checking=release
Then Glibc without C compiller
CC=riscv64-unknown-elf-gcc \
../../../src/glibc/configure --prefix=/usr \
--build=x86_64-linux-gnu \
--host=riscv64-linux-gnu \
--prefix=/usr \
--enable-add-ons=libidn,nptl \
--without-selinux \
--with-xlen=64 \
--with-headers=/usr/riscv64-linux-gnu/sys-include \
--enable-kernel=4.19.0 \
make DESTDIR=/usr/local/pkg/glibc-linux-riscv-2.29-1 \
inst_includedir=/usr/local/pkg/glibc-linux-riscv-2.29-1/include \
install-bootstrap-headers=yes install-headers
Gcc
../../../src/gcc-9/configure -v \
--enable-languages=c \
--prefix=/usr \
--with-system-zlib \
--without-included-gettext \
--enable-threads=posix \
--enable-shared \
--disable-nls \
--with-gnu-ld \
--with-gnu-as \
--disable-newlib \
--enable-clocale=gnu \
--enable-objc-gc \
--enable-mpfr \
--enable-tls \
--enable-secureplt \
--enable-targets=riscv64-linux-gnu \
--enable-symvers=gnu \
--enable-checking=release \
--build=x86_64-linux-gnu \
--host=x86_64-linux-gnu \
--target=riscv64-linux-gnu \
--enable-version-specific-runtime-libs \
--disable-libgomp \
--with-sysroot=/usr/riscv64-linux-gnu/sys-root \
\
--enable-linker-build-id \
--enable-libstdcxx-time=yes \
--enable-gnu-unique-object \
--enable-plugin \
--disable-multiarch \
--disable-multilib \
--with-tune=size \
--disable-sjlj-exceptions \
then real Glibc build
../../../src/glibc-git/configure \
--build=x86_64-linux-gnu \
--host=riscv64-linux-gnu \
--prefix=/usr \
--enable-add-ons=libidn,nptl \
--without-selinux \
--with-xlen=64 \
--with-headers=/usr/riscv64-linux-gnu/sys-include \
--enable-kernel=4.19.0 \
and then GCC again so build stabilizes.
I have forgot the preparation step, setup and configure Linux kernel and run
Linux from Scratch version 10.0 released
make ARCH=riscv INSTALL_HDR_PATH=/usr/riscv64-linux-gnu/sys-include headers_install
RISC-V is taken as example only and it was the last toolchain I have build from scratch, but setup worked for ARMs, PowerPCs, etc...
libc_cv_ppc_machine=yes \
libc_cv_mabi_ibmlongdouble=yes \
libc_cv_mlong_double_128=yes \
libc_cv_forced_unwind=yes \
libc_cv_c_cleanup=yes \
../../../src/glibc/configure --prefix=/usr \
--build=x86_64-linux-gnu \
--host=powerpc-linux-gnu \
--prefix=/usr \
--without-cvs \
--enable-add-ons=libidn,nptl \
--enable-profile \
--without-selinux \
--with-headers=/usr/powerpc-linux-gnu/sys-include \
--enable-kernel=2.6.26 \
--enable-hacker-mode \
--without-cvs --disable-sanity-checks \
make DESTDIR=/usr-pkg/glibc-linux-powerpc-2.7-1 \
inst_includedir=/usr-pkg/glibc-linux-powerpc-2.7-1/include \
install-headers
But it worked and I hope I have got again really clean build not pulling in any previous history and implicit choices.
Linux from Scratch version 10.0 released
Linux from Scratch version 10.0 released