LWN: Comments on "Linux from Scratch version 10.0 released" https://lwn.net/Articles/830676/ This is a special feed containing comments posted to the individual LWN article titled "Linux from Scratch version 10.0 released". en-us Tue, 02 Sep 2025 15:49:40 +0000 Tue, 02 Sep 2025 15:49:40 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Linux from Scratch version 10.0 released https://lwn.net/Articles/830882/ https://lwn.net/Articles/830882/ ppisa <div class="FormattedComment"> Thanks much for clarification. I have not realized that --with-newlib can be used when newlib is not made available to the build. You are right that I keep and reuse some configs from nineties when I have started to build GCC 2.x for m68k. I usually compare options with these used by Debian distribution, RTEMS etc. Thanks for pointer to the script and discussion. I will look at it.<br> </div> Mon, 07 Sep 2020 18:16:28 +0000 Linux from Scratch version 10.0 released https://lwn.net/Articles/830871/ https://lwn.net/Articles/830871/ jsm28 <div class="FormattedComment"> No glibc version with RISC-V support also supported the old add-ons mechanism, and NPTL ceased to be an add-on some years before that, so those configure options appear to be copied from options applicable to a much older glibc version. The install-bootstrap-headers mechanism is something even older from EGLIBC that was never added to glibc because a newer bootstrap process superseded the process it was intended to be used with. --with-newlib in this context is confusingly named; it does not mean to use newlib; it means to define inhibit_libc when building libgcc. For the recommended modern (fully supported with glibc 2.16 and GCC 4.9 or later) process for bootstrapping a cross toolchain with glibc, I advise looking at how glibc&#x27;s build-many-glibcs.py script, used in CI to build toolchains for every ABI supported by glibc, does the bootstrap.<br> <p> <a href="https://sourceware.org/legacy-ml/libc-alpha/2018-03/msg00131.html">https://sourceware.org/legacy-ml/libc-alpha/2018-03/msg00...</a> discusses these bootstrap processes in more detail.<br> </div> Mon, 07 Sep 2020 17:23:40 +0000 Linux from Scratch version 10.0 released https://lwn.net/Articles/830777/ https://lwn.net/Articles/830777/ ppisa I have forgot the preparation step, setup and configure Linux kernel and run <pre> make ARCH=riscv INSTALL_HDR_PATH=/usr/riscv64-linux-gnu/sys-include headers_install </pre> 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... <p> For PowerPC there was some fun to decide some choices to be compatible with other Linux distros in the past (example from 2008) <pre> 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 </pre> But it worked and I hope I have got again really clean build not pulling in any previous history and implicit choices. Sun, 06 Sep 2020 10:32:06 +0000 Linux from Scratch version 10.0 released https://lwn.net/Articles/830776/ https://lwn.net/Articles/830776/ ppisa 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. <p> I start with binutils <pre> 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 </pre> Then Glibc without C compiller <pre> 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 </pre> Gcc <pre> ../../../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 \ </pre> then real Glibc build <pre> ../../../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 \ </pre> and then GCC again so build stabilizes. <p> I believe that this way I obtain clean build not influenced by any previous toolchains decisions. <p> 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. Sun, 06 Sep 2020 10:21:33 +0000 Linux from Scratch version 10.0 released https://lwn.net/Articles/830722/ https://lwn.net/Articles/830722/ tjc <div class="FormattedComment"> <p> <a rel="nofollow" href="https://www.youtube.com/watch?v=lME57Z_lybU&amp;list=PLyc5xVO2uDsD3DrDJB5LrTdCadiqr2HCp">https://www.youtube.com/watch?v=lME57Z_lybU&amp;list=PLyc...</a><br> <p> </div> Sat, 05 Sep 2020 14:43:14 +0000