diff --git a/gcc/binaries.sha1 b/gcc/binaries.sha1 new file mode 100644 index 0000000..520cf56 --- /dev/null +++ b/gcc/binaries.sha1 @@ -0,0 +1,5 @@ +81189d0d0095c044b3113dd38f0e8e195627cd06 bin/busybox +34b500b18659b9331d4225eb6734be2ce8990589 mes/bin/blood-elf +7ebbf5dcf1d66966d0609fc09d4279c3d247c16b mes/bin/hex2 +2cc482ca6cbafc33cbc856384ed5685887c27120 mes/bin/M1 +de1e6f6cffcf5660b4b2586c2e5031fd82fa0646 mes/bin/mes diff --git a/gcc/build.sh b/gcc/build.sh new file mode 100755 index 0000000..e6028c8 --- /dev/null +++ b/gcc/build.sh @@ -0,0 +1,37 @@ +#!/bin/sh +set -e + +# Use qemu if necessary +#qemu=qemu-i386 +qemu= + +rm -rf system +mkdir -p builds + +# Stage 1: Build matching mes and busybox binaries +./build_binaries.sh +mv system/binaries.tar.gz builds/ # Will be regenerated later, to match. + +# Stage 2: Bootstrap system from these +mkdir -p system/sources/ +cp -av sources/* system/sources/ +cp build_bootstrap.sh system/sources/ +mkdir system/dev system/tmp +mknod system/dev/null c 1 3 +mknod system/dev/tty c 5 0 +$qemu system/bin/busybox chroot system /bin/busybox env -i NPROC="$(nproc)" /bin/busybox sh /sources/build_bootstrap.sh +mv system/bootstrap.tar.gz builds/ + +# Stage 2.5 (optional): Rebuild bootstrap binaries to have a "clean" archive +if [ "$1" = double_bootstrap ]; then +cp build_binaries.sh binaries.sha1 busybox-config system/ +$qemu system/bootstrap/bin/chroot system /bootstrap/bin/env -i NPROC="$(nproc)" PATH=/bootstrap/bin /bootstrap/bin/sh /build_binaries.sh +mv system/system/binaries.tar.gz builds/ +rm system/build_binaries.sh system/binaries.sha1 system/busybox-config +rm -rf system/system/ +fi + +# Stage 3: Cross-compile system for x86_64 +cp build_cross.sh system/sources +$qemu system/bootstrap/bin/chroot system /bootstrap/bin/env -i NPROC="$(nproc)" /bootstrap/bin/sh /sources/build_cross.sh +mv system/system/cross.tar.gz builds/ diff --git a/gcc/build_binaries.sh b/gcc/build_binaries.sh new file mode 100755 index 0000000..5c09950 --- /dev/null +++ b/gcc/build_binaries.sh @@ -0,0 +1,181 @@ +#!/bin/sh +set -eu + +version_mes=0.22 +version_mescc_tools=1.0.1 +version_nyacc=0.99.3 + +version_linux=4.14 +version_binutils=2.20.1 +version_gcc=4.9.4 +version_gmp=4.3.2 +version_mpfr=2.4.2 +version_mpc=1.0.3 +version_musl=1.2.1 +version_busybox=1.31.1 + +export MAKEFLAGS="-j${NPROC:-$(getconf _NPROCESSORS_ONLN)}" + +system=system +dir_root="$PWD" +dir_sources="$dir_root/sources" +dir_install="$dir_root/$system" + +mkdir -p build && cd build + +rm -rf "mes-$version_mes" +tar xf "$dir_sources/mes-$version_mes.tar.gz" +( cd "mes-$version_mes" + tar xf "$dir_sources/mescc-tools-Release_$version_mescc_tools.tar.gz" + tar xf "$dir_sources/nyacc-$version_nyacc.tar.gz" + mv "mescc-tools-Release_$version_mescc_tools" mescc-tools + mv "nyacc-$version_nyacc" nyacc + cp -a mescc-tools mescc-tools-target + + make -C mescc-tools M1 hex2 blood-elf COMMIT= + export PATH="$PWD/mescc-tools/bin:$PATH" + + # First, we build a native mes, "mes-gcc". + # This allows us to cross-build everything on systems that mes doesn't support. + gcc -O2 -std=gnu99 -w -lrt -o mes-gcc -DMES_VERSION='""' -DSYSTEM_LIBC=1 -Iinclude \ + lib/mes/eputs.c \ + lib/mes/fdgetc.c \ + lib/mes/fdputc.c \ + lib/mes/fdputs.c \ + lib/mes/fdungetc.c \ + lib/mes/itoa.c \ + lib/mes/mes_open.c \ + lib/mes/ntoab.c \ + src/gc.c \ + src/hash.c \ + src/lib.c \ + src/math.c \ + src/mes.c \ + src/module.c \ + src/posix.c \ + src/reader.c \ + src/string.c \ + src/struct.c \ + src/vector.c + + # This version of mes messes doesn't have a proper getopt... + # TODO: Fix this (somehow) and make the patch unnecessary. + sed -i -e 's/ -nostdlib/ --nostdlib/' \ + -e 's/ -lc/ -l c/' \ + build-aux/bootstrap.sh.in + + # Use this to build mes and its libc for the target + CC=true guile_site_dir="$PWD/nyacc/module" sh configure.sh --host=x86-linux-mes + CC="$PWD/scripts/mescc" MES="$PWD/mes-gcc" sh bootstrap.sh + + # Install mes + install -Dm755 bin/mes "$dir_install/mes/bin/mes" + + # Build tools with mes to obtain reproducible outputs + make -C mescc-tools-target M1 hex2 blood-elf COMMIT= \ + CC="$PWD/scripts/mescc" MES="$PWD/mes-gcc" MES_PREFIX="../" \ + GUILE_LOAD_PATH="../module" CFLAGS='-L ../lib -L ../mescc-lib -l c+tcc' + install -Dm755 mescc-tools-target/bin/M1 "$dir_install/mes/bin/M1" + install -Dm755 mescc-tools-target/bin/hex2 "$dir_install/mes/bin/hex2" + install -Dm755 mescc-tools-target/bin/blood-elf "$dir_install/mes/bin/blood-elf" +) + +rm -rf "linux-$version_linux" +tar xf "$dir_sources/linux-$version_linux.tar.gz" +( cd "linux-$version_linux" + make mrproper + make ARCH=x86 INSTALL_HDR_PATH="$dir_install/sources/linux-headers" headers_install + find "$dir_install/sources/linux-headers" -type f ! -name "*.h" -exec rm {} + +) + +# Build static busybox with musl +rm -rf "busybox-$version_busybox" +tar xf "$dir_sources/busybox-$version_busybox.tar.bz2" +( cd "busybox-$version_busybox" + tar xf "$dir_sources/binutils-${version_binutils}a.tar.bz2" + mv "binutils-$version_binutils" binutils + tar xf "$dir_sources/gcc-$version_gcc.tar.bz2" + mv "gcc-$version_gcc" gcc + tar xf "$dir_sources/gmp-$version_gmp.tar.bz2" + mv "gmp-$version_gmp" gcc/gmp + tar xf "$dir_sources/mpfr-$version_mpfr.tar.bz2" + mv "mpfr-$version_mpfr" gcc/mpfr + tar xf "$dir_sources/mpc-$version_mpc.tar.gz" + mv "mpc-$version_mpc" gcc/mpc + tar xf "$dir_sources/musl-$version_musl.tar.gz" + mv "musl-$version_musl" musl + + prefix="$PWD/prefix" + export PATH="$prefix/bin:$PATH" + + # Fix requirement for mktemp, so it works with coreutils-5.0 + if ! command -v mktemp 2> /dev/null; then + sed -i -e 's@$(mktemp tmp.XXXXXXXXXX)@/tmp/tmp.trylink@' scripts/trylink + fi + + # Building a specific version of binutils+GCC, to make the results reproducible... + # GCC-4.6.4's results aren't reproducible across machines for some reason, + # so this bootstrap uses GCC-4.9.4. This increases the build time a little. + ( cd binutils + CFLAGS='-O2 -w' ./configure \ + --target=i686-bootstrap-linux-gnu \ + --prefix="$prefix" \ + --with-sysroot="$prefix" \ + --disable-nls \ + --disable-werror + make + make install + ) + ( cd gcc + mkdir build && cd build # Build breaks without a build directory + + # Using --with-local-prefix=/ puts /include in the search path before + # /lib/gcc/.../include-fixed, avoiding some issues. + CFLAGS='-O2 -w' CXXFLAGS='-O2 -w' MAKEINFO=true ../configure \ + --target=i686-bootstrap-linux-gnu \ + --prefix="$prefix" \ + --with-sysroot="$prefix" \ + --with-local-prefix=/ \ + --with-host-libstdcxx=-lsupc++ \ + --with-newlib \ + --without-headers \ + --disable-shared \ + --disable-threads \ + --disable-nls \ + --enable-languages=c + make all-gcc all-target-libgcc + make install-gcc install-target-libgcc + ) + + # Musl provides a very small libc, that can be linked statically. + # It might be worthwhile to switch to uClibc in the future, as that's + # what's usually used for busybox. Might yield "cleaner" results. + cp -a "$dir_install/sources/linux-headers" prefix + ( cd musl + ./configure \ + --host=i686-bootstrap-linux-gnu \ + --prefix="$PWD/../prefix" \ + --disable-shared + make + make install + ) + + cp "$dir_root/busybox-config" .config + make CROSS_COMPILE=i686-bootstrap-linux-gnu- CONFIG_STATIC=y busybox + + install -Dm755 busybox "$dir_install/bin/busybox" + install -Dm755 busybox_unstripped "$dir_install/bin/busybox_unstripped" +) + +cd "$dir_install" + +# Verify the built binaries +sha1sum -c "$dir_root/binaries.sha1" + +# Pack it up +find bin mes sources \( -type f -o -type l \) ! -path bin/busybox_unstripped | LC_ALL=C sort | xargs tar --mtime=@0 --numeric-owner --owner=0 --group=0 -cf binaries.tar +gzip -nv binaries.tar + +# Clean up +cd "$dir_root" +rm -rf build diff --git a/gcc/build_bootstrap.sh b/gcc/build_bootstrap.sh new file mode 100755 index 0000000..202fbb5 --- /dev/null +++ b/gcc/build_bootstrap.sh @@ -0,0 +1,873 @@ +#!/bin/sh +set -e + +# To initialize/enter chroot: +# mkdir dev tmp +# mknod dev/null c 1 3 +# mknod dev/tty c 5 0 +# ./bin/busybox chroot . /bin/busybox env -i NPROC="$(nproc)" /bin/busybox sh /sources/build_bootstrap.sh + +# Amount of make threads, configure this to your liking. +# This can be obtained using `getconf _NPROCESSORS_ONLN`, but requires /proc +# to be mounted, which we avoid. +NPROC="${NPROC:-4}" + +# Creates a busybox symlink, useful to keep track of what bootstrap binaries +# are necessary at what stages. +link() { + for x in "$@"; do + if [ ! -e /bin/$x ]; then + busybox ln -s busybox /bin/$x + fi + done +} +link sh + +# TODO: Either start using tar-1.14 in the bootstrap or implement the +# -j/--bzip2 option into tar-1.12, to avoid the awkward tar commands. +# TODO: Figure out what causes the timestamps to go bad with tar-1.12 (maybe use 1.13?) + +cd /sources + + +#### Build Mes and its libc from the 4 necessary bootstrap bins +export PATH=/mes/bin:/bin + +link cp mkdir rm tar zcat + +# nyacc (0.99.3): +rm -rf nyacc-0.99.3 +zcat nyacc-0.99.3.tar.gz | tar x +mkdir -p /mes/share/guile/site/2.2 +cp -a nyacc-0.99.3/module/nyacc /mes/share/guile/site/2.2 +rm -rf nyacc-0.99.3 + +link basename cat chmod cmp dirname echo ln sed + +# mes-boot (0.22): +rm -rf mes-0.22 +zcat mes-0.22.tar.gz | tar x +( cd mes-0.22 + # "grep: command not found" is harmless here, as the results are identical. + CC=true ./configure.sh --host=x86-linux-mes --prefix=/mes + CC="$PWD/scripts/mescc" ./bootstrap.sh + + # Optional, make sure the rebuilt mes still matches. + cmp bin/mes /mes/bin/mes + + # Installing manually to avoid reliance on "tar --create" + #BASHOPTS= ./install.sh + set -x + mkdir -p /mes/bin/ + cp -a bin/mes scripts/mesar scripts/mescc.scm scripts/mescc scripts/diff.scm /mes/bin/ + cp -a include /mes/ + mkdir -p /mes/lib/linux/ + cp -a lib/x86-mes /mes/lib/ + cp -a lib/linux/x86-mes /mes/lib/linux/ + cp -a gcc-lib/x86-mes/* /mes/lib/ + cp -a mescc-lib/x86-mes /mes/lib/ + mkdir -p /mes/share/mes/ + cp -a mes/module /mes/share/mes/ + mkdir -p /mes/share/guile/site/2.2 + cp -a module/* /mes/share/guile/site/2.2 +) +rm -rf mes-0.22 + +link install + +# mescc-tools (1.0.1): +# This step is completely optional, as identical tools are already installed. +# However, as a sanity check it's done anyway. +rm -rf mescc-tools-Release_1.0.1 +zcat mescc-tools-Release_1.0.1.tar.gz | tar x +( cd mescc-tools-Release_1.0.1 + #make -Bn M1 hex2 blood-elf COMMIT= CC=mescc CFLAGS='-lc+tcc' + set -x + + mkdir -p bin + mescc -lc+tcc M1-macro.c functions/file_print.c functions/match.c functions/numerate_number.c functions/string.c functions/require.c functions/in_set.c -o bin/M1 + mescc -lc+tcc hex2_linker.c functions/file_print.c functions/match.c functions/numerate_number.c functions/require.c functions/in_set.c -o bin/hex2 + mescc -lc+tcc blood-elf.c functions/file_print.c functions/match.c functions/require.c functions/in_set.c functions/numerate_number.c -o bin/blood-elf + + # Optional, make sure the tools built with the new mes still match. + cmp bin/M1 /mes/bin/M1 + cmp bin/hex2 /mes/bin/hex2 + cmp bin/blood-elf /mes/bin/blood-elf + + install -Dm755 bin/M1 /mes/bin/M1 + install -Dm755 bin/hex2 /mes/bin/hex2 + install -Dm755 bin/blood-elf /mes/bin/blood-elf +) +rm -rf mescc-tools-Release_1.0.1 + + +#### Bootstrap TCC, with mes-libc +# Using the C library provided by Mes, we build the Tiny C Compiler to use it, +# to later be able to build a bunch of tools from this combination. +export PATH=/tcc/bin:/mes/bin:/bin +rm -rf /tcc + +# tcc-boot0 (0.9.26): +# This step will take a _long_ time, because mescc is a slow compiler, as a +# result of how minimal its core is designed. +# Thankfully, things will speed up considerably once TCC is bootstrapped. +rm -rf tcc-0.9.26-1103-g6e62e0e +zcat tcc-0.9.26-1103-g6e62e0e.tar.gz | tar x +( cd tcc-0.9.26-1103-g6e62e0e + echo '#define TCC_VERSION "0.9.27"' > config.h + MES_PREFIX=/mes prefix=/tcc ./bootstrap.sh # Slow! + + # Installing manually to avoid reliance on "tar --create" + #MES_PREFIX=/mes prefix=/tcc ./install.sh + mkdir -p /tcc/bin/ + cp tcc /tcc/bin/ + cp -a /mes/include /tcc/ + mkdir -p /tcc/lib/tcc/ + cp -a crt1.o crti.o crtn.o libc.a libgetopt.a /tcc/lib/ + cp -a libtcc1.a /tcc/lib/tcc/ +) +rm -rf tcc-0.9.26-1103-g6e62e0e + +# This binary was only necessary for the optional checks in mes-boot, +# mescc-tools, as well as tcc-boot0's bootstrap.sh +# Possible future removal/implementation in mes? +rm /bin/cmp + + +#### Build compression tools, upgrade TCC to 0.9.27. +# Upgrading TCC is probably not truly necessary, but it hardly hurts. +# Some tools are required to achieve this, but these tools will be necessary +# later on, regardless. +export PATH=/tcc/bin:/bin + +# sed-mesboot (1.18): +# Used by nearly every configure script, and in this script to patch sources. +# It's only used for the mes-boot configure.sh before this point. +# May be possible to move out of the bootstrap bins in the future. +rm -rf sed-1.18 +zcat sed-1.18.tar.gz | tar x +( cd sed-1.18 + set -x + tcc -DREGEX_MALLOC=1 -DSTDC_HEADERS=1 -DHAVE_MEMCPY=1 -o sed sed.c utils.c regex.c getopt.c getopt1.c + install -Dm755 sed /bin/sed +) +rm -rf sed-1.18 + +link mv + +# gzip-mesboot (1.2.4): +# Reduces the reliance on the bootstrap binary for gzip, as that only has to be +# used to decompress archives. Glibc requires it to compress. +# This, along with `tar` should be rebuilt as soon as possible due to how many +# packages rely on these, but `tar` unfortunately has a few more dependencies. +rm -rf gzip-1.2.4 +zcat gzip-1.2.4.tar.gz | tar x +( cd gzip-1.2.4 + sed -e 's/^char [*]strlwr/&_/' util.c > /tmp/sed; mv /tmp/sed util.c + + set -x + tcc -DNO_UTIME_H -DHAVE_UNISTD_H -o gzip gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c crypt.c lzw.c unlzw.c unpack.c unlzh.c getopt.c + install -Dm755 gzip /bin/gzip + ln -sf gzip /bin/gunzip + ln -sf gzip /bin/zcat +) +rm -rf gzip-1.2.4 + +# bzip2-mesboot (1.0.8): +# This compressor isn't part of the bootstrap binaries, but is necessary for +# unpacking certain archives, including tcc-0.9.27.tar.bz2... +rm -rf bzip2-1.0.8 +zcat bzip2-1.0.8.tar.gz | tar x +( cd bzip2-1.0.8 + # mes-libc-0.22 uses the value 0 for stdin, which trips up a check. + # This breaks decompressing data from stdin, through for example "tar jxf". + # Patching it out is "fine", since enough checks cover other failure states. + sed -e 's/if (f == NULL /if (0 /' bzlib.c > /tmp/sed; mv /tmp/sed bzlib.c + + echo '#define fchown(filedes, owner, group) 0' > utime.h + echo '#define fchmod(filedes, mode) 0' >> utime.h + echo 'struct utimbuf { int actime; int modtime; };' >> utime.h + echo '#define utime(filename, buf) 0' >> utime.h + + set -x + tcc -I. -o bzip2 blocksort.c huffman.c crctable.c randtable.c compress.c decompress.c bzlib.c bzip2.c + install -Dm755 bzip2 /bin/bzip2 + ln -sf bzip2 /bin/bunzip2 + ln -sf bzip2 /bin/bzcat +) +rm -rf bzip2-1.0.8 + +# tcc-boot (0.9.27): +rm -rf tcc-0.9.27 +bzcat tcc-0.9.27.tar.bz2 | tar x +( cd tcc-0.9.27 + sed -e 's/s->alacarte_link = 1;/s->static_link = 1;/' \ + libtcc.c > /tmp/sed; mv /tmp/sed libtcc.c + echo '#define TCC_VERSION "0.9.27"' > config.h + + # Build tcc twice, as avoiding bootstrapping here breaks programs later + set -x + for x in a b; do + tcc -vvv -DONE_SOURCE=1 \ + -DTCC_TARGET_I386 \ + -DCONFIG_TCC_STATIC \ + -DCONFIG_TCCDIR=\"/tcc/lib/tcc\" \ + -DCONFIG_TCC_CRTPREFIX=\"/tcc/lib\" \ + -DCONFIG_TCC_SYSINCLUDEPATHS=\"/tcc/include\" \ + -DCONFIG_TCC_LIBPATHS=\"/tcc/lib\" \ + -o tcc tcc.c + ./tcc -vvv -c -o libtcc1.o lib/libtcc1.c + ./tcc -ar rc libtcc1.a libtcc1.o + install -Dm755 tcc /tcc/bin/tcc + install -Dm644 libtcc1.a /tcc/lib/tcc/libtcc1.a + done +) +rm -rf tcc-0.9.27 + + +#### Build tools, round 1 +# At this point we try to rebuild the bootstrap tools, to reduce the reliance +# on them and their (minimal) featureset, and build some additional tools +# required to build GCC2. +# Rebuilding the bootstrap tools as early as possible allows for simplification +# of the bootstrap tools, which should lead to smaller binaries. +# Unfortunately, the following packages can not be built with TCC yet: +# - coreutils +# These are required to build GCC2, and the bootstrap binaries will be used. + +# grep-mesboot (2.0): +# Required by most configure scripts, but we've been able to avoid it thus far. +rm -rf grep-2.0 +zcat grep-2.0.tar.gz | tar x +( cd grep-2.0 + set -x + tcc -DSTDC_HEADERS=1 -DHAVE_ALLOCA_H=1 -DHAVE_MEMCHR=1 -o grep grep.c getopt.c regex.c dfa.c kwset.c obstack.c search.c + install -Dm755 grep /bin/grep + ln -sf grep /bin/egrep + ln -sf grep /bin/fgrep +) +rm -rf grep-2.0 + +link expr ls uniq sleep sort + +# gnu-make-mesboot0 (3.80): +# Make is required to build nearly everything, so it has to be built as soon as +# possible. +rm -rf make-3.80 +bzcat make-3.80.tar.bz2 | tar x +( cd make-3.80 + sed -e 's/@REMOTE@/stub/' \ + -e 's/@LIBOBJS@/getloadavg.o/' \ + build.sh.in > /tmp/sed; mv /tmp/sed build.sh.in + sed -e 's/^extern long int lseek.*/\/\/ &/' \ + make.h > /tmp/sed; mv /tmp/sed make.h + CC=tcc LD=tcc ./configure \ + --build=i686-pc-linux-gnu \ + --disable-nls + sh build.sh + install -Dm755 make /bin/make +) +rm -rf make-3.80 + +# Multi-threaded make is broken at this stage +export MAKEFLAGS=-j1 + +link tr + +# bash-mesboot0 (2.05b): +# A lot of shell scripts are ran during the build process. +# Bootstrapping it here allows the initial shell to remain simple. +# This shell is non-interactive, so the bootstrap shell might be used by the +# user, instead, while this one just runs most scripts. +rm -rf bash-2.05b +zcat bash-2.05b.tar.gz | tar x +( cd bash-2.05b + sed -e 's/mksyntax\.c$/& -lgetopt/' \ + -e 's/buildversion\.o$/& -lgetopt/' \ + Makefile.in > /tmp/sed; mv /tmp/sed Makefile.in + sed -e 's/int name, namelen;/char *name; int namelen;/' \ + lib/sh/oslib.c > /tmp/sed; mv /tmp/sed lib/sh/oslib.c + sed -e 's/defined (HAVE_LOCALE_H)/0/' \ + lib/sh/snprintf.c > /tmp/sed; mv /tmp/sed lib/sh/snprintf.c + + # Progcomp is disabled, so this file shouldn't be built... + # TODO: --disable-progcomp should take care of this, figure out what's + # up with that. + sed -e 's/ complete\.o$//' \ + builtins/Makefile.in > /tmp/sed; mv /tmp/sed builtins/Makefile.in + + # Delete unnecessary commands at end of build + sed -e '/ls -l $(Program)$/d' \ + -e '/size $(Program)$/d' \ + Makefile.in > /tmp/sed; mv /tmp/sed Makefile.in + + CC='tcc -D_POSIX_VERSION=1' AR='tcc -ar' ./configure \ + --build=i686-pc-linux-gnu \ + --without-bash-malloc \ + --disable-readline \ + --disable-history \ + --disable-bang-history \ + --disable-progcomp \ + --disable-nls \ + bash_cv_getcwd_calls_popen=no \ + bash_cv_signal_vintage=posix \ + ac_cv_func_working_mktime=yes + echo '#define endpwent(x) 0' >> config.h + make bash + install -Dm755 bash /bin/bash + ln -sf bash /bin/sh +) +rm -rf bash-2.05b + +# diffutils-mesboot (2.7): +# `cmp` is only absolutely required by tcc-boot0 thus far (though it should be +# possible to patch out), and not strictly required until gcc-4.6.4's install +# procedure. +# However, a lot of configure scripts do use it, and `diff` from time to time, +# so it's a good thing to have as soon as possible, regardless. +rm -rf diffutils-2.7 +zcat diffutils-2.7.tar.gz | tar x +( cd diffutils-2.7 + CC=tcc ./configure + make cmp diff + install -Dm755 cmp /bin/cmp + install -Dm755 diff /bin/diff +) +rm -rf diffutils-2.7 + +# tar-mesboot0 (1.12), not in guix: +# Self explanatory, required to unpack archives. Might be possible to moved +# earlier in the chain by avoiding the configure script/makefile. +# Softens the dependency on tar, since up until now it was only necessary to +# unpack archives, while the install procedure of e.g. gcc, requires it to +# also create archives. +rm -rf tar-1.12 +zcat tar-1.12.tar.gz | tar x +( cd tar-1.12 + # Remove need for ls -L + sed -e 's/ls -Lt /ls -t /' configure > /tmp/sed; mv /tmp/sed configure + chmod +x configure + + CC=tcc ./configure --disable-nls + make -C lib AR='tcc -ar' + make -C src + install -Dm755 src/tar /bin/tar +) +rm -rf tar-1.12 + +# gawk-mesboot0 (3.0.0): +# AWK is required to build glibc. +rm -rf gawk-3.0.0 +zcat gawk-3.0.0.tar.gz | tar x +( cd gawk-3.0.0 + sed -e 's/date /echo today /' \ + configure > /tmp/sed; mv /tmp/sed configure + sed -e 's/date /echo today /' \ + -e 's/ autoheader/ true/' \ + -e 's/ -lm//' \ + Makefile.in > /tmp/sed; mv /tmp/sed Makefile.in + chmod +x configure + + ac_cv_func_getpgrp_void=yes ac_cv_func_tzset=yes \ + CC=tcc LD=tcc ./configure \ + --build=i686-pc-linux-gnu \ + --disable-nls + make gawk + install -Dm755 gawk /bin/gawk + ln -sf gawk /bin/awk +) +rm -rf gawk-3.0.0 + +# patch-mesboot (2.5.9): +# Used to patch certain packages to fix bootstrap-specific build failures. +rm -rf patch-2.5.9 +zcat patch-2.5.9.tar.gz | tar x +( cd patch-2.5.9 + CC=tcc ./configure + make patch + install -Dm755 patch /bin/patch +) +rm -rf patch-2.5.9 + +#coreutils? (fileutils, textutils, sh-utils)? + + +#### Bootstrap gcc2 toolchain, consisting of gcc-2.95.2, binutils-2.14, glibc-2.2.5 +# Also rebuild it against itself to remove tcc and mes-libc from the picture. +# This will become the GNU toolchain that's the basis for the remaining set of tools. +export PATH=/gcc2/bin:/tcc/bin:/bin +rm -rf /gcc2 + +link touch true + +# binutils-mesboot0 (2.14): +rm -rf binutils-2.14 +bzcat binutils-2.14.tar.bz2 | tar x +( cd binutils-2.14 + # Fix some sed-related issues... + sed -e 's/_frag=${srcdir}\//_frag=/' \ + configure > /tmp/sed; mv /tmp/sed configure + sed -e "s@^sed -e '/SRC-POTFILES.*\$@echo -e 'all:\\\\n\\\\ttrue\\\\n\\\\ninstall:\\\\n\\\\ttrue\\\\n' > po/Makefile@" \ + bfd/configure > /tmp/sed; mv /tmp/sed bfd/configure + chmod +x configure bfd/configure + + CC='tcc -D__GLIBC_MINOR__=6' AR='tcc -ar' ./configure \ + --host=i686-pc-linux-gnu \ + --prefix=/gcc2 \ + --with-sysroot \ + --with-lib-path=/gcc2/lib \ + --disable-shared \ + --disable-nls + make + make install +) +rm -rf binutils-2.14 + +# gcc-core-mesboot0 (2.95.3): +rm -rf gcc-2.95.3 +zcat gcc-core-2.95.3.tar.gz | tar x +( cd gcc-2.95.3 + patch -p1 -i ../gcc-boot-2.95.3.patch + + CC='tcc -D__GLIBC_MINOR__=6' ./configure \ + --host=i686-pc-linux-gnu \ + --prefix=/gcc2 \ + --disable-shared + rm -rf texinfo && touch gcc/cpp.info gcc/gcc.info + make LIBGCC2_INCLUDES=-I/tcc/include + make install + + set -x + mkdir tmp + cd tmp + ar x ../gcc/libgcc2.a + ar x /tcc/lib/tcc/libtcc1.a + ar r /gcc2/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a *.o + cp ../gcc/libgcc2.a /gcc2/lib/libgcc2.a +) +rm -rf gcc-2.95.3 + +export PATH=/gcc2/bin:/bin + +link pwd + +# glibc-mesboot0 (2.2.5): +cp -ar linux-headers/include /gcc2/ +rm -rf glibc-2.2.5 +zcat glibc-2.2.5.tar.gz | tar x +( cd glibc-2.2.5 + patch -p1 -i ../glibc-boot-2.2.5.patch + + CC='gcc -DMES_BOOTSTRAP=1 -DBOOTSTRAP_GLIBC=1'" -L $PWD" ./configure \ + --host=i686-pc-linux-gnu \ + --prefix=/gcc2 \ + --with-headers=/gcc2/include \ + --disable-shared \ + --disable-sanity-checks \ + --enable-static-nss \ + --without-__thread \ + --without-cvs \ + --without-gd \ + --without-tls + make + make install +) +rm -rf glibc-2.2.5 + +# gcc-mesboot0 (2.95.3): +rm -rf gcc-2.95.3 +zcat gcc-core-2.95.3.tar.gz | tar x +( cd gcc-2.95.3 + patch -p1 -i ../gcc-boot-2.95.3.patch + + ./configure \ + --host=i686-pc-linux-gnu \ + --prefix=/gcc2 \ + --disable-shared + rm -r texinfo && touch gcc/cpp.info gcc/gcc.info + make LIBGCC2_INCLUDES=-I/gcc2/include + make install + + set -x + mkdir tmp + cd tmp + ar x ../gcc/libgcc2.a + ar r /gcc2/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a *.o + cp ../gcc/libgcc2.a /gcc2/lib/libgcc2.a +) +rm -rf gcc-2.95.3 + +# binutils-mesboot1 (2.14): +rm -rf binutils-2.14 +bzcat binutils-2.14.tar.bz2 | tar x +( cd binutils-2.14 + # Fix some sed-related issues... + sed -e 's/_frag=${srcdir}\//_frag=/' \ + configure > /tmp/sed; mv /tmp/sed configure + sed -e "s@^sed -e '/SRC-POTFILES.*\$@echo -e 'all:\\\\n\\\\ttrue\\\\n\\\\ninstall:\\\\n\\\\ttrue\\\\n' > po/Makefile@" \ + bfd/configure > /tmp/sed; mv /tmp/sed bfd/configure + chmod +x configure bfd/configure + + ./configure \ + --host=i686-pc-linux-gnu \ + --prefix=/gcc2 \ + --with-sysroot \ + --with-lib-path=/gcc2/lib \ + --disable-shared \ + --disable-nls + make + make install +) +rm -rf binutils-2.14 + + +#### Build tools, round 2, now with less TCC +# At this stage we upgrade some tools that need an upgrade to build later parts, +# as well as build some new tools we need. +# The remaining bootstrap binaries are rebuilt here, too. + +# gnu-make-mesboot (3.82): +# This version can use multiple threads, greatly speeding up further builds. +# TODO: Can this be upgraded to 4.0 to support building modern glibc-2.31? +# Make 4.2/4.3 works flawlessly +rm -rf make-3.82 +bzcat make-3.82.tar.bz2 | tar x +( cd make-3.82 + LIBS='-lc -lnss_files -lnss_dns -lresolv' ./configure \ + --build=i686-pc-linux-gnu + make make + install -Dm755 make /bin/make +) +rm -rf make-3.82 + +# From this point, multi-threaded make can be used. +export MAKEFLAGS="-j$NPROC" + +# coreutils-mesboot0 (5.0): +# This is the oldest available version of coreutils, and it can't be built any +# sooner... +rm -rf coreutils-5.0 +bzcat coreutils-5.0.tar.bz2 | tar x +( cd coreutils-5.0 + # Tar-1.12 doesn't set the timestamps correctly... + # Not fixing them causes erratic build results. + touch aclocal.m4 + touch Makefile.in + touch lib/Makefile.in + touch lib/getdate.c + touch src/Makefile.in + touch src/dircolors.h + touch src/wheel.h + touch config.hin + touch configure + + LIBS='-lc -lnss_files -lnss_dns -lresolv' ./configure \ + --build=i686-pc-linux-gnu \ + --prefix=/ \ + --disable-nls + make -C lib + make -C src + make DESTDIR="$PWD/install" -C src install-exec + install -v -Dm755 install/bin/* /bin/ +) +rm -rf coreutils-5.0 + +# bash-mesboot (4.4): +# Finally an interactive shell! +rm -rf bash-4.4 +zcat bash-4.4.tar.gz | tar x +( cd bash-4.4 + sed -e 's/;;$/;/' shell.c > /tmp/sed; mv /tmp/sed shell.c + + LIBS='-lc -lnss_files -lnss_dns -lresolv' ./configure \ + --disable-nls + make bash + install -Dm755 bash /bin/bash + ln -sf bash /bin/sh +) +rm -rf bash-4.4 + +# (optional) At this point we can get rid of the remaining bootstrap binary... +#rm /bin/busybox /bin/busybox_unstripped +# Continue with bash (has tab completion :D): +# exec /bin/sh -l +# Entering the chroot after this point: +# ./bin/chroot . /bin/env -i PATH=/gcc2/bin:/bin /bin/sh -l + +# tar-mesboot (1.22): +# Anything before tar 1.14 truncates the filenames when unpacking gcc-4.6.4 +# and gcc-4.9.4 for some odd reason. +# Tar-1.12 is also known to mess with the timestamps of several packages such +# as coreutils and gawk. +# This may be removed if 1.14 can be built with TCC. +rm -rf tar-1.22 +bzcat tar-1.22.tar.bz2 | tar x +( cd tar-1.22 + LIBS='-lc -lnss_files -lnss_dns -lresolv' ./configure \ + --disable-nls + make -C lib + make -C src + install -Dm755 src/tar /bin/tar +) +rm -rf tar-1.22 + +# sed-mesboot (4.0.6): +# Required to build binutils-2.20.1a +# TODO: Can this be upgraded to 4.3 to support the -E option? +rm -rf sed-4.0.6 +tar zxf sed-4.0.6.tar.gz +( cd sed-4.0.6 + ./configure --disable-nls + make -C lib + make -C sed + install -Dm755 sed/sed /bin/sed +) +rm -rf sed-4.0.6 + +# gawk-mesboot (3.1.8): +# Upgrade required to build glibc-2.16.0 +rm -rf gawk-3.1.8 +tar jxf gawk-3.1.8.tar.bz2 +( cd gawk-3.1.8 + ./configure \ + --build=i686-pc-linux-gnu \ + ac_cv_func_connect=no + make gawk + install -Dm755 gawk /bin/gawk + ln -sf gawk /bin/awk +) +rm -rf gawk-3.1.8 + + +#### Bootstrap C++, using gcc-4.6.4 +export PATH=/gcc46/bin:/gcc2/bin:/bin +rm -rf /gcc46 + +# TODO: Reduce the amount of configure flags by only building specific targets +# gcc-mesboot1 (4.6.4): +rm -rf gcc-4.6.4 +tar jxf gcc-core-4.6.4.tar.bz2 +tar jxf gcc-g++-4.6.4.tar.bz2 +( cd gcc-4.6.4 + tar jxf ../gmp-4.3.2.tar.bz2 + mv gmp-4.3.2 gmp + tar jxf ../mpfr-2.4.2.tar.bz2 + mv mpfr-2.4.2 mpfr + tar zxf ../mpc-1.0.3.tar.gz + mv mpc-1.0.3 mpc + + # Build a compiler with /gcc2 as its sysroot, so it picks up the libraries + # from there without having to manually set environment variables, or + # patch the sources. + # This just barely works because we're statically linking at this stage. + sed -i -e '/^NATIVE_SYSTEM_HEADER_DIR =/s@/usr/include@/include@' \ + gcc/Makefile.in + + # Using --enable-bootstrap to avoid segfaulting later... + # This causes the build to be the longest in the bootstrap, oh well. + ./configure \ + --build=i686-pc-linux-gnu \ + --prefix=/gcc46 \ + --with-sysroot=/gcc2 \ + --with-local-prefix=/ \ + --with-stage1-libs=-lm \ + --disable-shared \ + \ + --disable-nls \ + --disable-decimal-float \ + --disable-libatomic \ + --disable-libcilkrts \ + --disable-libgomp \ + --disable-libitm \ + --disable-libmudflap \ + --disable-libquadmath \ + --disable-libsanitizer \ + --disable-libssp \ + --disable-libvtv \ + --disable-lto \ + --disable-lto-plugin \ + --disable-multilib \ + --disable-plugin \ + --disable-threads \ + --enable-threads=single \ + --disable-libstdcxx-pch \ + --disable-build-with-cxx + make + make install +) +rm -rf gcc-4.6.4 + + +#### Create "final" bootstrap toolchain, gcc-4.9.4, binutils-2.20.1a, glibc-2.16.0 +# This toolchain is the minimum requirement to build a current GCC, as it +# fully supports C11 and C++11. +# Additionally, this toolchain is built with support for dynamic linking. + +export PATH=/bootstrap/bin:/gcc46/bin:/gcc2/bin:/bin +rm -rf /bootstrap + +# binutils-mesboot (2.20.1a): +rm -rf binutils-2.20.1 +tar jxf binutils-2.20.1a.tar.bz2 +( cd binutils-2.20.1 + ./configure \ + --build=i686-pc-linux-gnu \ + --prefix=/bootstrap \ + --with-sysroot \ + --with-lib-path=/bootstrap/lib \ + --disable-shared \ + --disable-nls \ + --disable-werror + make + make install +) +rm -rf binutils-2.20.1 + +export PATH=/bootstrap/bin:/gcc46/bin:/bin + +# glibc-mesboot (2.16.0): +cp -ar linux-headers/include /bootstrap/ +rm -rf glibc-2.16.0 +tar jxf glibc-2.16.0.tar.bz2 +( cd glibc-2.16.0 + patch -p1 -i ../glibc-boot-2.16.0.patch + + # This can't be rebuilt with the final gcc and glibc, for some reason + # Possibly the configure flags aren't suitable? + mkdir build && cd build + CC='/gcc46/bin/gcc -DBOOTSTRAP_GLIBC=1 -L/gcc2/lib' ../configure \ + --build=i686-pc-linux-gnu \ + --prefix=/bootstrap \ + --with-headers=/bootstrap/include \ + --disable-multi-arch \ + --enable-static-nss \ + --with-pthread \ + --without-cvs \ + --without-gd \ + --enable-add-ons=nptl \ + libc_cv_predef_stack_protector=no \ + libc_cv_ssp=no \ + libc_cv_friendly_stddef=yes + make "$PWD/sysd-sorted" + sed -i -e 's/ sunrpc//' -e 's/ nis//' sysd-sorted + make + + # `sbindir` isn't picked up by config.make.in, so the configure flag is useless + mkdir -p /bootstrap/etc + make install +) +rm -rf glibc-2.16.0 + +# gcc-mesboot (4.9.4): +rm -rf gcc-4.9.4 +tar jxf gcc-4.9.4.tar.bz2 +( cd gcc-4.9.4 + tar jxf ../gmp-4.3.2.tar.bz2 + mv gmp-4.3.2 gmp + tar jxf ../mpfr-2.4.2.tar.bz2 + mv mpfr-2.4.2 mpfr + tar zxf ../mpc-1.0.3.tar.gz + mv mpc-1.0.3 mpc + + # The previous setup to set the library/include path with --with-sysroot + # doesn't work when you throw dynamic linking into the mix and you're not + # purely cross-compiling (we want to run resulting binaries as-is). + # So, instead, we patch the sources. + # Thankfully, --with-native-system-header-dir was introduced, so we don't + # need to patch STANDARD_INCLUDE_DIR to do this. +cat >> gcc/config/i386/linux.h << 'EOF' +#undef GLIBC_DYNAMIC_LINKER +#define GLIBC_DYNAMIC_LINKER "/bootstrap/lib/ld-linux.so.2" +#define STANDARD_STARTFILE_PREFIX_1 "/bootstrap/lib/" +#define STANDARD_STARTFILE_PREFIX_2 "" +EOF + + ./configure \ + --build=i686-pc-linux-gnu \ + --prefix=/bootstrap \ + --with-native-system-header-dir=/bootstrap/include \ + --with-local-prefix=/bootstrap \ + --with-host-libstdcxx=-lsupc++ \ + --enable-languages=c,c++ \ + --disable-bootstrap \ + \ + --disable-nls \ + --disable-decimal-float \ + --disable-libatomic \ + --disable-libcilkrts \ + --disable-libgomp \ + --disable-libitm \ + --disable-libmudflap \ + --disable-libquadmath \ + --disable-libsanitizer \ + --disable-libssp \ + --disable-libvtv \ + --disable-lto \ + --disable-lto-plugin \ + --disable-multilib \ + --disable-plugin \ + --disable-threads \ + --enable-threads=single \ + --disable-libstdcxx-pch \ + --disable-build-with-cxx + make + make install +) +rm -rf gcc-4.9.4 + + +#### The end +# With the bootstrap toolchain fully built, apply some finishing touches by +# cleaning stuff up. +export PATH=/bootstrap/bin:/bin + +# findutils (4.6.0): +# This one is completely optional, as it's not required for a bootstrap. +# However, a ton of scripts you'll probably use to further bootstrap will +# probably need it. +# Busybox/linux requiring this to build is a good enough reason to put it here. +rm -rf findutils-4.6.0 +tar zxf findutils-4.6.0.tar.gz +( cd findutils-4.6.0 + ./configure \ + --build=i686-pc-linux-gnu \ + --disable-nls + make -C gl + make -C lib + make -C find + make -C xargs + install -Dm755 find/find /bin/find + install -Dm755 xargs/xargs /bin/xargs +) +rm -rf findutils-4.6.0 + +# Entering chroot before cleanup: +# ./bin/chroot . /bin/env -i PATH=/bootstrap/bin:/bin /bin/sh -l + +# Move binaries +rm -f /bin/busybox /bin/busybox_unstripped +mv /bin/* /bootstrap/bin/ +hash -r # a ton of binaries just moved +ln -sf ../bootstrap/bin/bash /bin/bash +ln -sf bash /bin/sh + +# Strip everything (saves hundreds of MB) +find /bootstrap/lib -type f -name '*.a' | xargs strip --strip-debug || true +find /bootstrap/lib -type f -name '*.so*' | xargs strip --strip-unneeded || true +find /bootstrap/bin /bootstrap/sbin /bootstrap/libexec -type f | xargs strip --strip-all || true +cp /bootstrap/bin/strip /strip +strip -s /strip +mv /strip /bootstrap/bin/strip + +# Clean up +#rm -rf /gcc46 /gcc2 /tcc /mes +rm -rf /bootstrap/share /bootstrap/var /bootstrap/etc +rm -f /bootstrap/lib/*.la /bootstrap/lib/libstdc++.so.*-gdb.py + +# Back it up +cd / +find bootstrap bin/sh bin/bash -type f -o -type l | LC_ALL=C sort | xargs tar --mtime=@0 --numeric-owner --owner=0 --group=0 -cf bootstrap.tar +gzip -nv bootstrap.tar + +# Entering chroot after cleanup: +# ./bootstrap/bin/chroot . /bootstrap/bin/env -i PATH=/bootstrap/bin /bootstrap/bin/sh -l diff --git a/gcc/build_cross.sh b/gcc/build_cross.sh new file mode 100755 index 0000000..2168701 --- /dev/null +++ b/gcc/build_cross.sh @@ -0,0 +1,431 @@ +#!/bin/sh +set -e + +# Example cross compile for x86_64, multilib-enabled +# This can be adapted for different architectures, but do note that some +# architectures will need more recent versions of gcc/glibc/tools. +# The version of gcc in /bootstrap should be able to build any such newer +# versions, at least as of right now (GCC 10.2). + +# To homogenize build instructions across both multilib and non-multilib +# installs, and because some applications require heavy patches to install +# in alternate libdirs (cough cough python), the lib directory will contain +# native libraries, while lib32 whill contain 32-bit libraries. +# GCC will be patched slightly, and configured to achieve this, as by default +# it uses lib64 and lib. + +# To initialize/enter chroot: +# mkdir dev tmp +# mknod dev/null c 1 3 +# ./bootstrap/bin/chroot . /bootstrap/bin/env -i NPROC="$(nproc)" /bootstrap/bin/sh /sources/build_cross.sh + +# Amount of make threads, configure this to your liking. +# This can be obtained using `getconf _NPROCESSORS_ONLN`, but requires /proc +# to be mounted, which we avoid. +export MAKEFLAGS="-j${NPROC:-4}" + +cd /sources + + +#### Make a cross-compiler +export PATH=/cross/bin:/bootstrap/bin +rm -rf /cross /system + +# kernel headers +rm -rf linux-4.14 +tar zxf linux-4.14.tar.gz +( cd linux-4.14 + make mrproper + make ARCH=x86_64 INSTALL_HDR_PATH="$PWD/install" headers_install + find install -type f ! -name "*.h" -exec rm {} + + mkdir -p /system/bootstrap/ + cp -a install/include /system/bootstrap/ +) +rm -rf linux-4.14 + +# Install cross binutils +rm -rf binutils-2.20.1 +tar jxf binutils-2.20.1a.tar.bz2 +( cd binutils-2.20.1 + ./configure \ + --build=i686-pc-linux-gnu \ + --target=x86_64-pc-linux-gnu \ + --prefix=/cross \ + --with-sysroot=/system \ + --disable-shared \ + --disable-nls \ + --disable-werror + make + make install +) +rm -rf binutils-2.20.1 + +# Configure the gcc source +rm -rf gcc-4.9.4 +tar jxf gcc-4.9.4.tar.bz2 +( cd gcc-4.9.4 + tar jxf ../gmp-4.3.2.tar.bz2 + mv gmp-4.3.2 gmp + tar jxf ../mpfr-2.4.2.tar.bz2 + mv mpfr-2.4.2 mpfr + tar zxf ../mpc-1.0.3.tar.gz + mv mpc-1.0.3 mpc + + # Set up the location of target glibc +cat >> gcc/config/i386/t-linux64 << 'EOF' +MULTILIB_OSDIRNAMES = m64=../lib +MULTILIB_OSDIRNAMES+= m32=../lib32 +EOF +cat >> gcc/config/i386/linux64.h << 'EOF' +#undef GLIBC_DYNAMIC_LINKER32 +#undef GLIBC_DYNAMIC_LINKER64 +#undef STANDARD_STARTFILE_PREFIX_1 +#undef STANDARD_STARTFILE_PREFIX_2 +#define GLIBC_DYNAMIC_LINKER32 "/bootstrap/lib32/ld-linux.so.2" +#define GLIBC_DYNAMIC_LINKER64 "/bootstrap/lib/ld-linux-x86-64.so.2" +#define STANDARD_STARTFILE_PREFIX_1 "/bootstrap/lib/" +#define STANDARD_STARTFILE_PREFIX_2 "" +EOF + + mkdir build && cd build # Build breaks without a build directory + ../configure \ + --build=i686-pc-linux-gnu \ + --target=x86_64-pc-linux-gnu \ + --prefix=/cross \ + --with-sysroot=/system \ + --with-native-system-header-dir=/bootstrap/include \ + --with-local-prefix=/bootstrap \ + --with-host-libstdcxx=-lsupc++ \ + --enable-multilib \ + --enable-languages=c,c++ \ + --disable-nls +) + +# Install the compiler +make -C gcc-4.9.4/build all-gcc +make -C gcc-4.9.4/build install-gcc + +# Configure the glibc source +rm -rf glibc-2.16.0 +tar jxf glibc-2.16.0.tar.bz2 +( cd glibc-2.16.0 + # Fix hardcode of /bin/pwd + sed -i -e 's@/bin/pwd@pwd@g' configure + + # Fix building cross-rpcgen without host rpc headers + sed -i -e 's/$(ALL_BUILD_CFLAGS)/-I. &/' sunrpc/Makefile + + mkdir build && cd build + ../configure \ + --build=i686-pc-linux-gnu \ + --host=x86_64-pc-linux-gnu \ + --prefix=/bootstrap \ + libc_cv_ssp=no \ + libc_cv_forced_unwind=yes + + cd .. + mkdir build32 && cd build32 + ../configure \ + CC='x86_64-pc-linux-gnu-gcc -m32' \ + CXX='x86_64-pc-linux-gnu-g++ -m32' \ + --build=i686-bootstrap-linux-gnu \ + --host=i686-pc-linux-gnu \ + --prefix=/bootstrap \ + --libdir=/bootstrap/lib32 \ + libc_cv_slibdir=/bootstrap/lib32 \ + libc_cv_ssp=no \ + libc_cv_forced_unwind=yes +) + +# Installing libgcc by using --without-headers --with-newlib in the gcc config +# would avoid having to install csu+headers before building libgcc, +# thereby simplifying the instructions slightly. +# I don't think that simplification is particularly worth it, however. + +# Do the whole gcc/glibc song and dance... +# DESTDIR set to a different dir since glibc makefile breaks otherwise... +make -C glibc-2.16.0/build DESTDIR=/system csu/subdir_install +make -C glibc-2.16.0/build32 DESTDIR=/system csu/subdir_install +make -C glibc-2.16.0/build DESTDIR=/system install-bootstrap-headers=yes install-headers +touch /system/bootstrap/include/gnu/stubs.h +x86_64-pc-linux-gnu-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o /system/bootstrap/lib/libc.so +x86_64-pc-linux-gnu-gcc -m32 -nostdlib -nostartfiles -shared -x c /dev/null -o /system/bootstrap/lib32/libc.so +make -C gcc-4.9.4/build all-target-libgcc +make -C gcc-4.9.4/build install-target-libgcc +make -C glibc-2.16.0/build all +make -C glibc-2.16.0/build32 all +make -C glibc-2.16.0/build32 DESTDIR="$PWD/glibc_install" install +make -C glibc-2.16.0/build DESTDIR="$PWD/glibc_install" install +# TODO: Would running force-install instead work? +cp -a glibc_install/bootstrap /system/ +rm -rf glibc_install +make -C gcc-4.9.4/build all-target-libstdc++-v3 +make -C gcc-4.9.4/build install-target-libstdc++-v3 + +rm -rf glibc-2.16.0 +rm -rf gcc-4.9.4/build + + +#### Cross-compile the compiler for the target + +# Binutils +rm -rf binutils-2.20.1 +tar jxf binutils-2.20.1a.tar.bz2 +( cd binutils-2.20.1 + ./configure \ + --build=i686-pc-linux-gnu \ + --host=x86_64-pc-linux-gnu \ + --prefix=/bootstrap \ + --with-lib-path=/bootstrap/lib \ + --with-sysroot \ + --disable-shared \ + --disable-nls \ + --disable-werror + make + make DESTDIR=/system install +) +rm -rf binutils-2.20.1 + +# GCC (using the unpacked+patched archive from before) +rm -rf gcc-4.9.4/build +( cd gcc-4.9.4 + mkdir build && cd build + ../configure \ + CC_FOR_TARGET=x86_64-pc-linux-gnu-gcc \ + CXX_FOR_TARGET=x86_64-pc-linux-gnu-g++ \ + --build=i686-pc-linux-gnu \ + --host=x86_64-pc-linux-gnu \ + --prefix=/bootstrap \ + --with-native-system-header-dir=/bootstrap/include \ + --with-local-prefix=/bootstrap \ + --enable-multilib \ + --enable-languages=c,c++ \ + --disable-nls + make all-gcc all-target-libgcc all-target-libstdc++-v3 + make DESTDIR=/system install-gcc install-target-libgcc install-target-libstdc++-v3 +) +rm -rf gcc-4.9.4 + + +#### Install a bunch of tools for the target +rm -rf coreutils-5.0 +tar jxf coreutils-5.0.tar.bz2 +( cd coreutils-5.0 + # Fix conflicting type errors + sed -i -e '/^char \*malloc/d' lib/putenv.c + sed -i -e 's/tee /tee_files /g' src/tee.c + sed -i -e 's/eaccess/_&/g' src/test.c + + ./configure \ + --prefix=/bootstrap \ + --build=i686-pc-linux-gnu \ + --host=x86_64-pc-linux-gnu \ + --disable-nls \ + ac_cv_func_malloc_0_nonnull=yes \ + am_cv_func_working_getline=yes \ + utils_cv_sys_open_max=1019 + make -C lib + make -C src + make -C src DESTDIR=/system install-exec + + # Link chroot statically (optional if you can use the host's chroot) + x86_64-pc-linux-gnu-gcc -static -O2 -o /system/bootstrap/bin/chroot src/chroot.o lib/libfetish.a +) +rm -rf coreutils-5.0 + +rm -rf bash-4.4 +tar zxf bash-4.4.tar.gz +( cd bash-4.4 + # The configure script can't run a lot of tests when cross-compiling, + # so a lot of the tests are specified manually to match a native build. + # This fixes some otherwise-broken scripts when building Gentoo for example. + # It uses the following test: [[ $(< <(echo foo) ) == foo ]] + # to check for a sane bash. + # Xz also has issues building with a cross-compiled bash. + # I encourage you to compare the config.h with a native build! + ./configure \ + --build=i686-pc-linux-gnu \ + --host=x86_64-pc-linux-gnu \ + --disable-nls \ + ac_cv_func_chown_works=yes \ + ac_cv_func_mmap_fixed_mapped=yes \ + ac_cv_func_strcoll_works=yes \ + bash_cv_func_sigsetjmp=present \ + bash_cv_getcwd_malloc=yes \ + bash_cv_job_control_missing=no \ + bash_cv_printf_a_format=yes \ + bash_cv_sys_named_pipes=yes \ + bash_cv_sys_siglist=yes \ + bash_cv_ulimit_maxfds=yes \ + bash_cv_under_sys_siglist=yes \ + bash_cv_unusable_rtsigs=no \ + bash_cv_wcwidth_broken=yes \ + bash_cv_wexitstatus_offset=8 + make bash + install -Dm755 bash /system/bootstrap/bin/bash + ln -sf bash /system/bootstrap/bin/sh +) +rm -rf bash-4.4 + +rm -rf gzip-1.2.4 +tar zxf gzip-1.2.4.tar.gz +( cd gzip-1.2.4 + # -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DDIRENT=1 + # Such an old configure script doesn't support cross-compiling... + set -x + x86_64-pc-linux-gnu-gcc -DSTDC_HEADERS=1 -w -O2 -o gzip gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c crypt.c lzw.c unlzw.c unpack.c unlzh.c getopt.c + CC=x86_64-pc-linux-gnu-gcc ./configure + make gzip + install -Dm755 gzip /system/bootstrap/bin/gzip + ln -sf gzip /system/bootstrap/bin/gunzip + ln -sf gzip /system/bootstrap/bin/zcat +) +rm -rf gzip-1.2.4 + +rm -rf bzip2-1.0.8 +tar zxf bzip2-1.0.8.tar.gz +( cd bzip2-1.0.8 + make \ + CC=x86_64-pc-linux-gnu-gcc \ + AR=x86_64-pc-linux-gnu-ar \ + bzip2 + install -Dm755 bzip2 /system/bootstrap/bin/bzip2 + ln -sf bzip2 /system/bootstrap/bin/bunzip2 + ln -sf bzip2 /system/bootstrap/bin/bzcat +) +rm -rf bzip2-1.0.8 + +rm -rf tar-1.22 +tar jxf tar-1.22.tar.bz2 +( cd tar-1.22 + ./configure \ + --build=i686-pc-linux-gnu \ + --host=x86_64-pc-linux-gnu \ + --disable-nls + make -C lib + make -C src + install -Dm755 src/tar /system/bootstrap/bin/tar +) +rm -rf tar-1.22 + +rm -rf grep-2.0 +tar zxf grep-2.0.tar.gz +( cd grep-2.0 + # -DGREP -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MEMCHR=1 -DHAVE_STRERROR=1 -DHAVE_VALLOC=1 -DHAVE_WORKING_MMAP=1 + # Such an old configure script doesn't support cross-compiling... + set -x + x86_64-pc-linux-gnu-gcc -DSTDC_HEADERS=1 -DHAVE_MEMCHR=1 -DHAVE_STRERROR=1 -w -O2 -o grep grep.c getopt.c regex.c dfa.c kwset.c obstack.c search.c + install -Dm755 grep /system/bootstrap/bin/grep + ln -sf grep /system/bootstrap/bin/egrep + ln -sf grep /system/bootstrap/bin/fgrep +) +rm -rf grep-2.0 + +# Optional, rationale for inclusion same as in build_bootstrap.sh +rm -rf findutils-4.6.0 +tar zxf findutils-4.6.0.tar.gz +( cd findutils-4.6.0 + ./configure \ + --build=i686-pc-linux-gnu \ + --host=x86_64-pc-linux-gnu \ + --disable-nls + make -C gl + make -C lib + make -C find + make -C xargs + install -Dm755 find/find /system/bootstrap/bin/find + install -Dm755 xargs/xargs /system/bootstrap/bin/xargs +) +rm -rf findutils-4.6.0 + +rm -rf diffutils-2.7 +tar zxf diffutils-2.7.tar.gz +( cd diffutils-2.7 + CC=x86_64-pc-linux-gnu-gcc \ + ac_cv_func_closedir_void=no \ + ac_cv_header_stdc=yes \ + ./configure \ + --build=i686-pc-linux-gnu \ + --host=x86_64-pc-linux-gnu + make cmp diff + install -Dm755 cmp /system/bootstrap/bin/cmp + install -Dm755 diff /system/bootstrap/bin/diff +) +rm -rf diffutils-2.7 + +rm -rf sed-4.0.6 +tar zxf sed-4.0.6.tar.gz +( cd sed-4.0.6 + ./configure \ + --build=i686-pc-linux-gnu \ + --host=x86_64-pc-linux-gnu \ + --disable-nls \ + am_cv_func_working_getline=yes + make -C lib + make -C sed + install -Dm755 sed/sed /system/bootstrap/bin/sed +) +rm -rf sed-4.0.6 + +rm -rf patch-2.5.9 +tar zxf patch-2.5.9.tar.gz +( cd patch-2.5.9 + ./configure \ + --build=i686-pc-linux-gnu \ + --host=x86_64-pc-linux-gnu + make patch + install -Dm755 patch /system/bootstrap/bin/patch +) +rm -rf patch-2.5.9 + +rm -rf gawk-3.1.8 +tar jxf gawk-3.1.8.tar.bz2 +( cd gawk-3.1.8 + ./configure \ + --build=i686-pc-linux-gnu \ + --host=x86_64-pc-linux-gnu \ + --disable-nls + make gawk + install -Dm755 gawk /system/bootstrap/bin/gawk + ln -sf gawk /system/bootstrap/bin/awk +) +rm -rf gawk-3.1.8 + +rm -rf make-3.82 +tar jxf make-3.82.tar.bz2 +( cd make-3.82 + ./configure \ + --build=i686-pc-linux-gnu \ + --host=x86_64-pc-linux-gnu \ + --disable-nls + make make + install -Dm755 make /system/bootstrap/bin/make +) +rm -rf make-3.82 + +# Add /bin/sh symlink +mkdir -p /system/bin +ln -sf ../bootstrap/bin/bash /system/bin/bash +ln -sf bash /system/bin/sh + +# Strip everything (saves hundreds of MB) +find /system/bootstrap/lib /system/bootstrap/lib32 -type f -name '*.a' | xargs x86_64-pc-linux-gnu-strip --strip-debug || true +find /system/bootstrap/lib /system/bootstrap/lib32 -type f -name '*.so*' | xargs x86_64-pc-linux-gnu-strip --strip-unneeded || true +find /system/bootstrap/bin /system/bootstrap/sbin /system/bootstrap/libexec -type f | xargs x86_64-pc-linux-gnu-strip --strip-all || true + +# Clean up +#rm -rf /cross +rm -rf /system/bootstrap/share /system/bootstrap/var /system/bootstrap/etc +rm -f /system/bootstrap/lib/*.la /system/bootstrap/lib32/*.la /system/bootstrap/lib/libstdc++.so.*-gdb.py /system/bootstrap/lib32/libstdc++.so.*-gdb.py + +# Back it up +cd /system +# Too many files to fit on single xargs command... +rm -f cross.tar +find bootstrap bin/sh bin/bash -type f -o -type l | LC_ALL=C sort | xargs tar --mtime=@0 --numeric-owner --owner=0 --group=0 -rf cross.tar +gzip -nv cross.tar + +# Now you should reboot into a system with a kernel supporting the target architecture. +# Building a kernel+utilities for such a system is outside the scope of this script. +# Enter cross-chroot: +# ./bootstrap/bin/chroot . /bootstrap/bin/env -i PATH=/bootstrap/bin /bootstrap/bin/sh -l diff --git a/gcc/builds.sha1 b/gcc/builds.sha1 new file mode 100644 index 0000000..a823c78 --- /dev/null +++ b/gcc/builds.sha1 @@ -0,0 +1,3 @@ +427a4257055af6d35ee389e211300604b4e5edbb builds/binaries.tar.gz +be27f8f4dd7eb36033afaedb08746d3bf9b9284d builds/bootstrap.tar.gz +7df8133faddb1cdb8531e40f0db16e6e1270a4fe builds/cross.tar.gz diff --git a/gcc/busybox-config b/gcc/busybox-config new file mode 100644 index 0000000..e21845a --- /dev/null +++ b/gcc/busybox-config @@ -0,0 +1,1167 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.31.1 +# Wed Oct 7 21:10:44 2020 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Settings +# +# CONFIG_DESKTOP is not set +# CONFIG_EXTRA_COMPAT is not set +# CONFIG_FEDORA_COMPAT is not set +# CONFIG_INCLUDE_SUSv2 is not set +# CONFIG_LONG_OPTS is not set +# CONFIG_SHOW_USAGE is not set +# CONFIG_FEATURE_VERBOSE_USAGE is not set +# CONFIG_FEATURE_COMPRESS_USAGE is not set +CONFIG_LFS=y +# CONFIG_PAM is not set +# CONFIG_FEATURE_DEVPTS is not set +# CONFIG_FEATURE_UTMP is not set +# CONFIG_FEATURE_WTMP is not set +# CONFIG_FEATURE_PIDFILE is not set +CONFIG_PID_FILE_PATH="" +# CONFIG_BUSYBOX is not set +# CONFIG_FEATURE_SHOW_SCRIPT is not set +# CONFIG_FEATURE_INSTALLER is not set +CONFIG_INSTALL_NO_USR=y +# CONFIG_FEATURE_SUID is not set +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_SYSLOG_INFO is not set +# CONFIG_FEATURE_SYSLOG is not set +CONFIG_PLATFORM_LINUX=y + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_LIBBUSYBOX_STATIC is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_STACK_OPTIMIZATION_386=y + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_DEBUG_SANITIZE is not set +# CONFIG_UNIT_TEST is not set +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Library Tuning +# +# CONFIG_FEATURE_USE_BSS_TAIL is not set +# CONFIG_FLOAT_DURATION is not set +# CONFIG_FEATURE_RTMINMAX is not set +# CONFIG_FEATURE_RTMINMAX_USE_LIBC_DEFINITIONS is not set +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SMALL=1 +CONFIG_SHA3_SMALL=1 +# CONFIG_FEATURE_FAST_TOP is not set +# CONFIG_FEATURE_ETC_NETWORKS is not set +# CONFIG_FEATURE_ETC_SERVICES is not set +# CONFIG_FEATURE_EDITING is not set +CONFIG_FEATURE_EDITING_MAX_LEN=0 +# CONFIG_FEATURE_EDITING_VI is not set +CONFIG_FEATURE_EDITING_HISTORY=0 +# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set +# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set +# CONFIG_FEATURE_REVERSE_SEARCH is not set +# CONFIG_FEATURE_TAB_COMPLETION is not set +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set +# CONFIG_FEATURE_EDITING_WINCH is not set +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +# CONFIG_LOCALE_SUPPORT is not set +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +CONFIG_FEATURE_NON_POSIX_CP=y +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +# CONFIG_FEATURE_USE_SENDFILE is not set +CONFIG_FEATURE_COPYBUF_KB=4 +# CONFIG_FEATURE_SKIP_ROOTFS is not set +# CONFIG_MONOTONIC_SYSCALL is not set +# CONFIG_IOCTL_HEX2STR_ERROR is not set +# CONFIG_FEATURE_HWIB is not set + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_FEATURE_SEAMLESS_XZ is not set +# CONFIG_FEATURE_SEAMLESS_LZMA is not set +# CONFIG_FEATURE_SEAMLESS_BZ2 is not set +# CONFIG_FEATURE_SEAMLESS_GZ is not set +# CONFIG_FEATURE_SEAMLESS_Z is not set +# CONFIG_AR is not set +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +# CONFIG_FEATURE_AR_CREATE is not set +# CONFIG_UNCOMPRESS is not set +# CONFIG_GUNZIP is not set +CONFIG_ZCAT=y +# CONFIG_FEATURE_GUNZIP_LONG_OPTIONS is not set +# CONFIG_BUNZIP2 is not set +# CONFIG_BZCAT is not set +# CONFIG_UNLZMA is not set +# CONFIG_LZCAT is not set +# CONFIG_LZMA is not set +# CONFIG_UNXZ is not set +# CONFIG_XZCAT is not set +# CONFIG_XZ is not set +# CONFIG_BZIP2 is not set +CONFIG_BZIP2_SMALL=0 +# CONFIG_FEATURE_BZIP2_DECOMPRESS is not set +# CONFIG_CPIO is not set +# CONFIG_FEATURE_CPIO_O is not set +# CONFIG_FEATURE_CPIO_P is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_GZIP is not set +# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set +CONFIG_GZIP_FAST=0 +# CONFIG_FEATURE_GZIP_LEVELS is not set +CONFIG_FEATURE_GZIP_DECOMPRESS=y +# CONFIG_LZOP is not set +# CONFIG_UNLZOP is not set +# CONFIG_LZOPCAT is not set +# CONFIG_LZOP_COMPR_HIGH is not set +# CONFIG_RPM is not set +# CONFIG_RPM2CPIO is not set +CONFIG_TAR=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_FEATURE_TAR_CREATE is not set +# CONFIG_FEATURE_TAR_AUTODETECT is not set +# CONFIG_FEATURE_TAR_FROM is not set +CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y +# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_GNU_EXTENSIONS is not set +# CONFIG_FEATURE_TAR_TO_COMMAND is not set +# CONFIG_FEATURE_TAR_UNAME_GNAME is not set +# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set +# CONFIG_FEATURE_TAR_SELINUX is not set +# CONFIG_UNZIP is not set +# CONFIG_FEATURE_UNZIP_CDF is not set +# CONFIG_FEATURE_UNZIP_BZIP2 is not set +# CONFIG_FEATURE_UNZIP_LZMA is not set +# CONFIG_FEATURE_UNZIP_XZ is not set +# CONFIG_FEATURE_LZMA_FAST is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAT=y +# CONFIG_FEATURE_CATN is not set +# CONFIG_FEATURE_CATV is not set +# CONFIG_CHGRP is not set +CONFIG_CHMOD=y +# CONFIG_CHOWN is not set +# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set +CONFIG_CHROOT=y +# CONFIG_CKSUM is not set +# CONFIG_COMM is not set +CONFIG_CP=y +# CONFIG_FEATURE_CP_LONG_OPTIONS is not set +# CONFIG_FEATURE_CP_REFLINK is not set +# CONFIG_CUT is not set +# CONFIG_DATE is not set +# CONFIG_FEATURE_DATE_ISOFMT is not set +# CONFIG_FEATURE_DATE_NANO is not set +# CONFIG_FEATURE_DATE_COMPAT is not set +# CONFIG_DD is not set +# CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set +# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set +# CONFIG_FEATURE_DD_IBS_OBS is not set +# CONFIG_FEATURE_DD_STATUS is not set +# CONFIG_DF is not set +# CONFIG_FEATURE_DF_FANCY is not set +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +# CONFIG_UNIX2DOS is not set +# CONFIG_DU is not set +# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_EXPAND is not set +# CONFIG_UNEXPAND is not set +CONFIG_EXPR=y +# CONFIG_EXPR_MATH_SUPPORT_64 is not set +# CONFIG_FACTOR is not set +# CONFIG_FALSE is not set +# CONFIG_FOLD is not set +# CONFIG_HEAD is not set +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +# CONFIG_ID is not set +# CONFIG_GROUPS is not set +CONFIG_INSTALL=y +# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set +# CONFIG_LINK is not set +CONFIG_LN=y +# CONFIG_LOGNAME is not set +CONFIG_LS=y +# CONFIG_FEATURE_LS_FILETYPES is not set +# CONFIG_FEATURE_LS_FOLLOWLINKS is not set +# CONFIG_FEATURE_LS_RECURSIVE is not set +# CONFIG_FEATURE_LS_WIDTH is not set +# CONFIG_FEATURE_LS_SORTFILES is not set +CONFIG_FEATURE_LS_TIMESTAMPS=y +# CONFIG_FEATURE_LS_USERNAME is not set +# CONFIG_FEATURE_LS_COLOR is not set +# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set +# CONFIG_MD5SUM is not set +# CONFIG_SHA1SUM is not set +# CONFIG_SHA256SUM is not set +# CONFIG_SHA512SUM is not set +# CONFIG_SHA3SUM is not set +# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set +CONFIG_MKDIR=y +# CONFIG_MKFIFO is not set +# CONFIG_MKNOD is not set +# CONFIG_MKTEMP is not set +CONFIG_MV=y +# CONFIG_NICE is not set +# CONFIG_NL is not set +# CONFIG_NOHUP is not set +# CONFIG_NPROC is not set +# CONFIG_OD is not set +# CONFIG_PASTE is not set +# CONFIG_PRINTENV is not set +# CONFIG_PRINTF is not set +CONFIG_PWD=y +# CONFIG_READLINK is not set +# CONFIG_FEATURE_READLINK_FOLLOW is not set +# CONFIG_REALPATH is not set +CONFIG_RM=y +# CONFIG_RMDIR is not set +# CONFIG_SEQ is not set +# CONFIG_SHRED is not set +# CONFIG_SHUF is not set +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +CONFIG_SORT=y +# CONFIG_FEATURE_SORT_BIG is not set +# CONFIG_FEATURE_SORT_OPTIMIZE_MEMORY is not set +# CONFIG_SPLIT is not set +# CONFIG_FEATURE_SPLIT_FANCY is not set +# CONFIG_STAT is not set +# CONFIG_FEATURE_STAT_FORMAT is not set +# CONFIG_FEATURE_STAT_FILESYSTEM is not set +# CONFIG_STTY is not set +# CONFIG_SUM is not set +# CONFIG_SYNC is not set +# CONFIG_FEATURE_SYNC_FANCY is not set +# CONFIG_FSYNC is not set +# CONFIG_TAC is not set +# CONFIG_TAIL is not set +# CONFIG_FEATURE_FANCY_TAIL is not set +# CONFIG_TEE is not set +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +# CONFIG_TEST is not set +# CONFIG_TEST1 is not set +# CONFIG_TEST2 is not set +# CONFIG_FEATURE_TEST_64 is not set +# CONFIG_TIMEOUT is not set +CONFIG_TOUCH=y +# CONFIG_FEATURE_TOUCH_NODEREF is not set +# CONFIG_FEATURE_TOUCH_SUSV3 is not set +CONFIG_TR=y +# CONFIG_FEATURE_TR_CLASSES is not set +# CONFIG_FEATURE_TR_EQUIV is not set +CONFIG_TRUE=y +# CONFIG_TRUNCATE is not set +# CONFIG_TTY is not set +# CONFIG_UNAME is not set +CONFIG_UNAME_OSNAME="" +# CONFIG_BB_ARCH is not set +CONFIG_UNIQ=y +# CONFIG_UNLINK is not set +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_BASE64 is not set +# CONFIG_UUENCODE is not set +# CONFIG_WC is not set +# CONFIG_FEATURE_WC_LARGE is not set +# CONFIG_WHOAMI is not set +# CONFIG_WHO is not set +# CONFIG_W is not set +# CONFIG_USERS is not set +# CONFIG_YES is not set + +# +# Common options +# +# CONFIG_FEATURE_VERBOSE is not set + +# +# Common options for cp and mv +# +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set + +# +# Common options for df, du, ls +# +# CONFIG_FEATURE_HUMAN_READABLE is not set + +# +# Console Utilities +# +# CONFIG_CHVT is not set +# CONFIG_CLEAR is not set +# CONFIG_DEALLOCVT is not set +# CONFIG_DUMPKMAP is not set +# CONFIG_FGCONSOLE is not set +# CONFIG_KBD_MODE is not set +# CONFIG_LOADFONT is not set +# CONFIG_SETFONT is not set +# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set +CONFIG_DEFAULT_SETFONT_DIR="" +# CONFIG_FEATURE_LOADFONT_PSF2 is not set +# CONFIG_FEATURE_LOADFONT_RAW is not set +# CONFIG_LOADKMAP is not set +# CONFIG_OPENVT is not set +# CONFIG_RESET is not set +# CONFIG_RESIZE is not set +# CONFIG_FEATURE_RESIZE_PRINT is not set +# CONFIG_SETCONSOLE is not set +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +# CONFIG_SETKEYCODES is not set +# CONFIG_SETLOGCONS is not set +# CONFIG_SHOWKEY is not set + +# +# Debian Utilities +# +# CONFIG_PIPE_PROGRESS is not set +# CONFIG_RUN_PARTS is not set +# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set +# CONFIG_FEATURE_RUN_PARTS_FANCY is not set +# CONFIG_START_STOP_DAEMON is not set +# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set +# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set +# CONFIG_WHICH is not set + +# +# klibc-utils +# +# CONFIG_MINIPS is not set +# CONFIG_NUKE is not set +# CONFIG_RESUME is not set +# CONFIG_RUN_INIT is not set + +# +# Editors +# +# CONFIG_AWK is not set +# CONFIG_FEATURE_AWK_LIBM is not set +# CONFIG_FEATURE_AWK_GNU_EXTENSIONS is not set +CONFIG_CMP=y +# CONFIG_DIFF is not set +# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set +# CONFIG_FEATURE_DIFF_DIR is not set +# CONFIG_ED is not set +# CONFIG_PATCH is not set +CONFIG_SED=y +# CONFIG_VI is not set +CONFIG_FEATURE_VI_MAX_LEN=0 +# CONFIG_FEATURE_VI_8BIT is not set +# CONFIG_FEATURE_VI_COLON is not set +# CONFIG_FEATURE_VI_YANKMARK is not set +# CONFIG_FEATURE_VI_SEARCH is not set +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set +# CONFIG_FEATURE_VI_USE_SIGNALS is not set +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +# CONFIG_FEATURE_VI_WIN_RESIZE is not set +# CONFIG_FEATURE_VI_ASK_TERMINAL is not set +# CONFIG_FEATURE_VI_UNDO is not set +# CONFIG_FEATURE_VI_UNDO_QUEUE is not set +CONFIG_FEATURE_VI_UNDO_QUEUE_MAX=0 +# CONFIG_FEATURE_ALLOW_EXEC is not set + +# +# Finding Utilities +# +# CONFIG_FIND is not set +# CONFIG_FEATURE_FIND_PRINT0 is not set +# CONFIG_FEATURE_FIND_MTIME is not set +# CONFIG_FEATURE_FIND_MMIN is not set +# CONFIG_FEATURE_FIND_PERM is not set +# CONFIG_FEATURE_FIND_TYPE is not set +# CONFIG_FEATURE_FIND_EXECUTABLE is not set +# CONFIG_FEATURE_FIND_XDEV is not set +# CONFIG_FEATURE_FIND_MAXDEPTH is not set +# CONFIG_FEATURE_FIND_NEWER is not set +# CONFIG_FEATURE_FIND_INUM is not set +# CONFIG_FEATURE_FIND_EXEC is not set +# CONFIG_FEATURE_FIND_EXEC_PLUS is not set +# CONFIG_FEATURE_FIND_USER is not set +# CONFIG_FEATURE_FIND_GROUP is not set +# CONFIG_FEATURE_FIND_NOT is not set +# CONFIG_FEATURE_FIND_DEPTH is not set +# CONFIG_FEATURE_FIND_PAREN is not set +# CONFIG_FEATURE_FIND_SIZE is not set +# CONFIG_FEATURE_FIND_PRUNE is not set +# CONFIG_FEATURE_FIND_QUIT is not set +# CONFIG_FEATURE_FIND_DELETE is not set +# CONFIG_FEATURE_FIND_PATH is not set +# CONFIG_FEATURE_FIND_REGEX is not set +# CONFIG_FEATURE_FIND_CONTEXT is not set +# CONFIG_FEATURE_FIND_LINKS is not set +# CONFIG_GREP is not set +# CONFIG_EGREP is not set +# CONFIG_FGREP is not set +# CONFIG_FEATURE_GREP_CONTEXT is not set +# CONFIG_XARGS is not set +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set +# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set +# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set +# CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR is not set +# CONFIG_FEATURE_XARGS_SUPPORT_PARALLEL is not set +# CONFIG_FEATURE_XARGS_SUPPORT_ARGS_FILE is not set + +# +# Init Utilities +# +# CONFIG_BOOTCHARTD is not set +# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +# CONFIG_REBOOT is not set +# CONFIG_FEATURE_WAIT_FOR_INIT is not set +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +# CONFIG_INIT is not set +# CONFIG_LINUXRC is not set +# CONFIG_FEATURE_USE_INITTAB is not set +# CONFIG_FEATURE_KILL_REMOVED is not set +CONFIG_FEATURE_KILL_DELAY=0 +# CONFIG_FEATURE_INIT_SCTTY is not set +# CONFIG_FEATURE_INIT_SYSLOG is not set +# CONFIG_FEATURE_INIT_QUIET is not set +# CONFIG_FEATURE_INIT_COREDUMPS is not set +CONFIG_INIT_TERMINAL_TYPE="" +# CONFIG_FEATURE_INIT_MODIFY_CMDLINE is not set + +# +# Login/Password Management Utilities +# +# CONFIG_FEATURE_SHADOWPASSWDS is not set +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_USE_BB_SHADOW is not set +# CONFIG_USE_BB_CRYPT is not set +# CONFIG_USE_BB_CRYPT_SHA is not set +# CONFIG_ADDGROUP is not set +# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set +# CONFIG_ADDUSER is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_LAST_ID=0 +CONFIG_FIRST_SYSTEM_ID=0 +CONFIG_LAST_SYSTEM_ID=0 +# CONFIG_CHPASSWD is not set +CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="" +# CONFIG_CRYPTPW is not set +# CONFIG_MKPASSWD is not set +# CONFIG_DELUSER is not set +# CONFIG_DELGROUP is not set +# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set +# CONFIG_GETTY is not set +# CONFIG_LOGIN is not set +# CONFIG_LOGIN_SESSION_AS_CHILD is not set +# CONFIG_LOGIN_SCRIPTS is not set +# CONFIG_FEATURE_NOLOGIN is not set +# CONFIG_FEATURE_SECURETTY is not set +# CONFIG_PASSWD is not set +# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set +# CONFIG_SU is not set +# CONFIG_FEATURE_SU_SYSLOG is not set +# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set +# CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Linux Ext2 FS Progs +# +# CONFIG_CHATTR is not set +# CONFIG_FSCK is not set +# CONFIG_LSATTR is not set +# CONFIG_TUNE2FS is not set + +# +# Linux Module Utilities +# +CONFIG_MODPROBE_SMALL=y +# CONFIG_DEPMOD is not set +# CONFIG_INSMOD is not set +# CONFIG_LSMOD is not set +# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set +# CONFIG_MODINFO is not set +# CONFIG_MODPROBE is not set +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +# CONFIG_RMMOD is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_CMDLINE_MODULE_OPTIONS is not set +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set +# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set +# CONFIG_FEATURE_MODUTILS_ALIAS is not set +# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set +CONFIG_DEFAULT_MODULES_DIR="" +CONFIG_DEFAULT_DEPMOD_FILE="" + +# +# Linux System Utilities +# +# CONFIG_ACPID is not set +# CONFIG_FEATURE_ACPID_COMPAT is not set +# CONFIG_BLKDISCARD is not set +# CONFIG_BLKID is not set +# CONFIG_FEATURE_BLKID_TYPE is not set +# CONFIG_BLOCKDEV is not set +# CONFIG_CAL is not set +# CONFIG_CHRT is not set +# CONFIG_DMESG is not set +# CONFIG_FEATURE_DMESG_PRETTY is not set +# CONFIG_EJECT is not set +# CONFIG_FEATURE_EJECT_SCSI is not set +# CONFIG_FALLOCATE is not set +# CONFIG_FATATTR is not set +# CONFIG_FBSET is not set +# CONFIG_FEATURE_FBSET_FANCY is not set +# CONFIG_FEATURE_FBSET_READMODE is not set +# CONFIG_FDFORMAT is not set +# CONFIG_FDISK is not set +# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set +# CONFIG_FEATURE_FDISK_WRITABLE is not set +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FINDFS is not set +# CONFIG_FLOCK is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_FSFREEZE is not set +# CONFIG_FSTRIM is not set +# CONFIG_GETOPT is not set +# CONFIG_FEATURE_GETOPT_LONG is not set +# CONFIG_HEXDUMP is not set +# CONFIG_FEATURE_HEXDUMP_REVERSE is not set +# CONFIG_HD is not set +# CONFIG_XXD is not set +# CONFIG_HWCLOCK is not set +# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set +# CONFIG_IONICE is not set +# CONFIG_IPCRM is not set +# CONFIG_IPCS is not set +# CONFIG_LAST is not set +# CONFIG_FEATURE_LAST_FANCY is not set +# CONFIG_LOSETUP is not set +# CONFIG_LSPCI is not set +# CONFIG_LSUSB is not set +# CONFIG_MDEV is not set +# CONFIG_FEATURE_MDEV_CONF is not set +# CONFIG_FEATURE_MDEV_RENAME is not set +# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set +# CONFIG_FEATURE_MDEV_EXEC is not set +# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +# CONFIG_FEATURE_MDEV_DAEMON is not set +# CONFIG_MESG is not set +# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set +# CONFIG_MKE2FS is not set +# CONFIG_MKFS_EXT2 is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +# CONFIG_MKFS_REISER is not set +# CONFIG_MKDOSFS is not set +# CONFIG_MKFS_VFAT is not set +# CONFIG_MKSWAP is not set +# CONFIG_FEATURE_MKSWAP_UUID is not set +# CONFIG_MORE is not set +# CONFIG_MOUNT is not set +# CONFIG_FEATURE_MOUNT_FAKE is not set +# CONFIG_FEATURE_MOUNT_VERBOSE is not set +# CONFIG_FEATURE_MOUNT_HELPERS is not set +# CONFIG_FEATURE_MOUNT_LABEL is not set +# CONFIG_FEATURE_MOUNT_NFS is not set +# CONFIG_FEATURE_MOUNT_CIFS is not set +# CONFIG_FEATURE_MOUNT_FLAGS is not set +# CONFIG_FEATURE_MOUNT_FSTAB is not set +# CONFIG_FEATURE_MOUNT_OTHERTAB is not set +# CONFIG_MOUNTPOINT is not set +# CONFIG_NOLOGIN is not set +# CONFIG_NOLOGIN_DEPENDENCIES is not set +# CONFIG_NSENTER is not set +# CONFIG_PIVOT_ROOT is not set +# CONFIG_RDATE is not set +# CONFIG_RDEV is not set +# CONFIG_READPROFILE is not set +# CONFIG_RENICE is not set +# CONFIG_REV is not set +# CONFIG_RTCWAKE is not set +# CONFIG_SCRIPT is not set +# CONFIG_SCRIPTREPLAY is not set +# CONFIG_SETARCH is not set +# CONFIG_LINUX32 is not set +# CONFIG_LINUX64 is not set +# CONFIG_SETPRIV is not set +# CONFIG_FEATURE_SETPRIV_DUMP is not set +# CONFIG_FEATURE_SETPRIV_CAPABILITIES is not set +# CONFIG_FEATURE_SETPRIV_CAPABILITY_NAMES is not set +# CONFIG_SETSID is not set +# CONFIG_SWAPON is not set +# CONFIG_FEATURE_SWAPON_DISCARD is not set +# CONFIG_FEATURE_SWAPON_PRI is not set +# CONFIG_SWAPOFF is not set +# CONFIG_FEATURE_SWAPONOFF_LABEL is not set +# CONFIG_SWITCH_ROOT is not set +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +# CONFIG_UEVENT is not set +# CONFIG_UMOUNT is not set +# CONFIG_FEATURE_UMOUNT_ALL is not set +# CONFIG_UNSHARE is not set +# CONFIG_WALL is not set +# CONFIG_FEATURE_MOUNT_LOOP is not set +# CONFIG_FEATURE_MOUNT_LOOP_CREATE is not set +# CONFIG_FEATURE_MTAB_SUPPORT is not set +# CONFIG_VOLUMEID is not set +# CONFIG_FEATURE_VOLUMEID_BCACHE is not set +# CONFIG_FEATURE_VOLUMEID_BTRFS is not set +# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set +# CONFIG_FEATURE_VOLUMEID_EXFAT is not set +# CONFIG_FEATURE_VOLUMEID_EXT is not set +# CONFIG_FEATURE_VOLUMEID_F2FS is not set +# CONFIG_FEATURE_VOLUMEID_FAT is not set +# CONFIG_FEATURE_VOLUMEID_HFS is not set +# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set +# CONFIG_FEATURE_VOLUMEID_JFS is not set +# CONFIG_FEATURE_VOLUMEID_LFS is not set +# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set +# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set +# CONFIG_FEATURE_VOLUMEID_LUKS is not set +# CONFIG_FEATURE_VOLUMEID_MINIX is not set +# CONFIG_FEATURE_VOLUMEID_NILFS is not set +# CONFIG_FEATURE_VOLUMEID_NTFS is not set +# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set +# CONFIG_FEATURE_VOLUMEID_REISERFS is not set +# CONFIG_FEATURE_VOLUMEID_ROMFS is not set +# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set +# CONFIG_FEATURE_VOLUMEID_SYSV is not set +# CONFIG_FEATURE_VOLUMEID_UBIFS is not set +# CONFIG_FEATURE_VOLUMEID_UDF is not set +# CONFIG_FEATURE_VOLUMEID_XFS is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set +# CONFIG_BC is not set +# CONFIG_DC is not set +# CONFIG_FEATURE_DC_BIG is not set +# CONFIG_FEATURE_DC_LIBM is not set +# CONFIG_FEATURE_BC_INTERACTIVE is not set +# CONFIG_FEATURE_BC_LONG_OPTIONS is not set +# CONFIG_BEEP is not set +CONFIG_FEATURE_BEEP_FREQ=0 +CONFIG_FEATURE_BEEP_LENGTH_MS=0 +# CONFIG_CHAT is not set +# CONFIG_FEATURE_CHAT_NOFAIL is not set +# CONFIG_FEATURE_CHAT_TTY_HIFI is not set +# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set +# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set +# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set +# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set +# CONFIG_FEATURE_CHAT_CLR_ABORT is not set +# CONFIG_CONSPY is not set +# CONFIG_CROND is not set +# CONFIG_FEATURE_CROND_D is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +# CONFIG_FEATURE_CROND_SPECIAL_TIMES is not set +CONFIG_FEATURE_CROND_DIR="" +# CONFIG_CRONTAB is not set +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +# CONFIG_DEVMEM is not set +# CONFIG_FBSPLASH is not set +# CONFIG_FLASHCP is not set +# CONFIG_FLASH_ERASEALL is not set +# CONFIG_FLASH_LOCK is not set +# CONFIG_FLASH_UNLOCK is not set +# CONFIG_HDPARM is not set +# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +# CONFIG_HEXEDIT is not set +# CONFIG_I2CGET is not set +# CONFIG_I2CSET is not set +# CONFIG_I2CDUMP is not set +# CONFIG_I2CDETECT is not set +# CONFIG_I2CTRANSFER is not set +# CONFIG_INOTIFYD is not set +# CONFIG_LESS is not set +CONFIG_FEATURE_LESS_MAXLINES=0 +# CONFIG_FEATURE_LESS_BRACKETS is not set +# CONFIG_FEATURE_LESS_FLAGS is not set +# CONFIG_FEATURE_LESS_TRUNCATE is not set +# CONFIG_FEATURE_LESS_MARKS is not set +# CONFIG_FEATURE_LESS_REGEXP is not set +# CONFIG_FEATURE_LESS_WINCH is not set +# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set +# CONFIG_FEATURE_LESS_DASHCMD is not set +# CONFIG_FEATURE_LESS_LINENUMS is not set +# CONFIG_FEATURE_LESS_RAW is not set +# CONFIG_FEATURE_LESS_ENV is not set +# CONFIG_LSSCSI is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +# CONFIG_FEATURE_MAKEDEVS_TABLE is not set +# CONFIG_MAN is not set +# CONFIG_MICROCOM is not set +# CONFIG_MT is not set +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set +# CONFIG_PARTPROBE is not set +# CONFIG_RAIDAUTORUN is not set +CONFIG_READAHEAD=y +# CONFIG_RFKILL is not set +# CONFIG_RUNLEVEL is not set +# CONFIG_RX is not set +# CONFIG_SETFATTR is not set +# CONFIG_SETSERIAL is not set +# CONFIG_STRINGS is not set +# CONFIG_TIME is not set +# CONFIG_TS is not set +# CONFIG_TTYSIZE is not set +# CONFIG_UBIRENAME is not set +# CONFIG_UBIATTACH is not set +# CONFIG_UBIDETACH is not set +# CONFIG_UBIMKVOL is not set +# CONFIG_UBIRMVOL is not set +# CONFIG_UBIRSVOL is not set +# CONFIG_UBIUPDATEVOL is not set +# CONFIG_VOLNAME is not set +# CONFIG_WATCHDOG is not set + +# +# Networking Utilities +# +# CONFIG_FEATURE_IPV6 is not set +# CONFIG_FEATURE_UNIX_LOCAL is not set +# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +# CONFIG_FEATURE_TLS_SHA1 is not set +# CONFIG_ARP is not set +# CONFIG_ARPING is not set +# CONFIG_BRCTL is not set +# CONFIG_FEATURE_BRCTL_FANCY is not set +# CONFIG_FEATURE_BRCTL_SHOW is not set +# CONFIG_DNSD is not set +# CONFIG_ETHER_WAKE is not set +# CONFIG_FTPD is not set +# CONFIG_FEATURE_FTPD_WRITE is not set +# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set +# CONFIG_FEATURE_FTPD_AUTHENTICATION is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +# CONFIG_HOSTNAME is not set +# CONFIG_DNSDOMAINNAME is not set +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RANGES is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set +# CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set +# CONFIG_IFCONFIG is not set +# CONFIG_FEATURE_IFCONFIG_STATUS is not set +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +# CONFIG_FEATURE_IFCONFIG_HW is not set +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +# CONFIG_IFENSLAVE is not set +# CONFIG_IFPLUGD is not set +# CONFIG_IFUP is not set +# CONFIG_IFDOWN is not set +CONFIG_IFUPDOWN_IFSTATE_PATH="" +# CONFIG_FEATURE_IFUPDOWN_IP is not set +# CONFIG_FEATURE_IFUPDOWN_IPV4 is not set +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +# CONFIG_INETD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set +# CONFIG_FEATURE_INETD_RPC is not set +# CONFIG_IP is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_IPRULE is not set +# CONFIG_IPNEIGH is not set +# CONFIG_FEATURE_IP_ADDRESS is not set +# CONFIG_FEATURE_IP_LINK is not set +# CONFIG_FEATURE_IP_ROUTE is not set +CONFIG_FEATURE_IP_ROUTE_DIR="" +# CONFIG_FEATURE_IP_TUNNEL is not set +# CONFIG_FEATURE_IP_RULE is not set +# CONFIG_FEATURE_IP_NEIGH is not set +# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FAKEIDENTD is not set +# CONFIG_NAMEIF is not set +# CONFIG_FEATURE_NAMEIF_EXTENDED is not set +# CONFIG_NBDCLIENT is not set +# CONFIG_NC is not set +# CONFIG_NETCAT is not set +# CONFIG_NC_SERVER is not set +# CONFIG_NC_EXTRA is not set +# CONFIG_NC_110_COMPAT is not set +# CONFIG_NETSTAT is not set +# CONFIG_FEATURE_NETSTAT_WIDE is not set +# CONFIG_FEATURE_NETSTAT_PRG is not set +# CONFIG_NSLOOKUP is not set +# CONFIG_FEATURE_NSLOOKUP_BIG is not set +# CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS is not set +# CONFIG_NTPD is not set +# CONFIG_FEATURE_NTPD_SERVER is not set +# CONFIG_FEATURE_NTPD_CONF is not set +# CONFIG_FEATURE_NTP_AUTH is not set +# CONFIG_PING is not set +# CONFIG_PING6 is not set +# CONFIG_FEATURE_FANCY_PING is not set +# CONFIG_PSCAN is not set +# CONFIG_ROUTE is not set +# CONFIG_SLATTACH is not set +# CONFIG_SSL_CLIENT is not set +# CONFIG_TC is not set +# CONFIG_FEATURE_TC_INGRESS is not set +# CONFIG_TCPSVD is not set +# CONFIG_UDPSVD is not set +# CONFIG_TELNET is not set +# CONFIG_FEATURE_TELNET_TTYPE is not set +# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set +# CONFIG_FEATURE_TELNET_WIDTH is not set +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_STANDALONE is not set +# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set +# CONFIG_TFTP is not set +# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_FEATURE_TFTP_HPA_COMPAT is not set +# CONFIG_TFTPD is not set +# CONFIG_FEATURE_TFTP_GET is not set +# CONFIG_FEATURE_TFTP_PUT is not set +# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set +# CONFIG_TFTP_DEBUG is not set +# CONFIG_TLS is not set +# CONFIG_TRACEROUTE is not set +# CONFIG_TRACEROUTE6 is not set +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_TUNCTL is not set +# CONFIG_FEATURE_TUNCTL_UG is not set +# CONFIG_VCONFIG is not set +# CONFIG_WGET is not set +# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set +# CONFIG_FEATURE_WGET_STATUSBAR is not set +# CONFIG_FEATURE_WGET_AUTHENTICATION is not set +# CONFIG_FEATURE_WGET_TIMEOUT is not set +# CONFIG_FEATURE_WGET_HTTPS is not set +# CONFIG_FEATURE_WGET_OPENSSL is not set +# CONFIG_WHOIS is not set +# CONFIG_ZCIP is not set +# CONFIG_UDHCPD is not set +# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set +# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set +CONFIG_DHCPD_LEASES_FILE="" +# CONFIG_DUMPLEASES is not set +# CONFIG_DHCPRELAY is not set +# CONFIG_UDHCPC is not set +# CONFIG_FEATURE_UDHCPC_ARPING is not set +# CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set +CONFIG_UDHCPC_DEFAULT_SCRIPT="" +# CONFIG_UDHCPC6 is not set +# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set +# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set +# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set +# CONFIG_FEATURE_UDHCPC6_RFC5970 is not set +# CONFIG_FEATURE_UDHCP_PORT is not set +CONFIG_UDHCP_DEBUG=0 +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0 +# CONFIG_FEATURE_UDHCP_RFC3397 is not set +# CONFIG_FEATURE_UDHCP_8021Q is not set +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="" + +# +# Print Utilities +# +# CONFIG_LPD is not set +# CONFIG_LPR is not set +# CONFIG_LPQ is not set + +# +# Mail Utilities +# +# CONFIG_MAKEMIME is not set +# CONFIG_POPMAILDIR is not set +# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set +# CONFIG_REFORMIME is not set +# CONFIG_FEATURE_REFORMIME_COMPAT is not set +# CONFIG_SENDMAIL is not set +CONFIG_FEATURE_MIME_CHARSET="" + +# +# Process Utilities +# +# CONFIG_FREE is not set +# CONFIG_FUSER is not set +# CONFIG_IOSTAT is not set +# CONFIG_KILL is not set +# CONFIG_KILLALL is not set +# CONFIG_KILLALL5 is not set +# CONFIG_LSOF is not set +# CONFIG_MPSTAT is not set +# CONFIG_NMETER is not set +# CONFIG_PGREP is not set +# CONFIG_PKILL is not set +# CONFIG_PIDOF is not set +# CONFIG_FEATURE_PIDOF_SINGLE is not set +# CONFIG_FEATURE_PIDOF_OMIT is not set +# CONFIG_PMAP is not set +# CONFIG_POWERTOP is not set +# CONFIG_FEATURE_POWERTOP_INTERACTIVE is not set +# CONFIG_PS is not set +# CONFIG_FEATURE_PS_WIDE is not set +# CONFIG_FEATURE_PS_LONG is not set +# CONFIG_FEATURE_PS_TIME is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_PSTREE is not set +# CONFIG_PWDX is not set +# CONFIG_SMEMCAP is not set +# CONFIG_BB_SYSCTL is not set +# CONFIG_TOP is not set +# CONFIG_FEATURE_TOP_INTERACTIVE is not set +# CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE is not set +# CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS is not set +# CONFIG_FEATURE_TOP_SMP_CPU is not set +# CONFIG_FEATURE_TOP_DECIMALS is not set +# CONFIG_FEATURE_TOP_SMP_PROCESS is not set +# CONFIG_FEATURE_TOPMEM is not set +# CONFIG_UPTIME is not set +# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set +# CONFIG_WATCH is not set +# CONFIG_FEATURE_SHOW_THREADS is not set + +# +# Runit Utilities +# +# CONFIG_CHPST is not set +# CONFIG_SETUIDGID is not set +# CONFIG_ENVUIDGID is not set +# CONFIG_ENVDIR is not set +# CONFIG_SOFTLIMIT is not set +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +# CONFIG_SV is not set +CONFIG_SV_DEFAULT_SERVICE_DIR="" +# CONFIG_SVC is not set +# CONFIG_SVOK is not set +# CONFIG_SVLOGD is not set +# CONFIG_CHCON is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RUNCON is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SESTATUS is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_RESTORECON is not set +# CONFIG_SETSEBOOL is not set + +# +# Shells +# +CONFIG_SH_IS_ASH=y +# CONFIG_SH_IS_HUSH is not set +# CONFIG_SH_IS_NONE is not set +# CONFIG_BASH_IS_ASH is not set +# CONFIG_BASH_IS_HUSH is not set +CONFIG_BASH_IS_NONE=y +CONFIG_ASH=y +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +CONFIG_ASH_INTERNAL_GLOB=y +# CONFIG_ASH_BASH_COMPAT is not set +# CONFIG_ASH_BASH_SOURCE_CURDIR is not set +# CONFIG_ASH_BASH_NOT_FOUND_HOOK is not set +# CONFIG_ASH_JOB_CONTROL is not set +# CONFIG_ASH_ALIAS is not set +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_ASH_EXPAND_PRMT is not set +# CONFIG_ASH_IDLE_TIMEOUT is not set +# CONFIG_ASH_MAIL is not set +# CONFIG_ASH_ECHO is not set +# CONFIG_ASH_PRINTF is not set +CONFIG_ASH_TEST=y +# CONFIG_ASH_HELP is not set +# CONFIG_ASH_GETOPTS is not set +CONFIG_ASH_CMDCMD=y +# CONFIG_CTTYHACK is not set +# CONFIG_HUSH is not set +# CONFIG_HUSH_BASH_COMPAT is not set +# CONFIG_HUSH_BRACE_EXPANSION is not set +# CONFIG_HUSH_LINENO_VAR is not set +# CONFIG_HUSH_BASH_SOURCE_CURDIR is not set +# CONFIG_HUSH_INTERACTIVE is not set +# CONFIG_HUSH_SAVEHISTORY is not set +# CONFIG_HUSH_JOB is not set +# CONFIG_HUSH_TICK is not set +# CONFIG_HUSH_IF is not set +# CONFIG_HUSH_LOOPS is not set +# CONFIG_HUSH_CASE is not set +# CONFIG_HUSH_FUNCTIONS is not set +# CONFIG_HUSH_LOCAL is not set +# CONFIG_HUSH_RANDOM_SUPPORT is not set +# CONFIG_HUSH_MODE_X is not set +# CONFIG_HUSH_ECHO is not set +# CONFIG_HUSH_PRINTF is not set +# CONFIG_HUSH_TEST is not set +# CONFIG_HUSH_HELP is not set +# CONFIG_HUSH_EXPORT is not set +# CONFIG_HUSH_EXPORT_N is not set +# CONFIG_HUSH_READONLY is not set +# CONFIG_HUSH_KILL is not set +# CONFIG_HUSH_WAIT is not set +# CONFIG_HUSH_COMMAND is not set +# CONFIG_HUSH_TRAP is not set +# CONFIG_HUSH_TYPE is not set +# CONFIG_HUSH_TIMES is not set +# CONFIG_HUSH_READ is not set +# CONFIG_HUSH_SET is not set +# CONFIG_HUSH_UNSET is not set +# CONFIG_HUSH_ULIMIT is not set +# CONFIG_HUSH_UMASK is not set +# CONFIG_HUSH_GETOPTS is not set +# CONFIG_HUSH_MEMLEAK is not set + +# +# Options common to all shells +# +# CONFIG_FEATURE_SH_MATH is not set +# CONFIG_FEATURE_SH_MATH_64 is not set +# CONFIG_FEATURE_SH_MATH_BASE is not set +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set +# CONFIG_FEATURE_SH_READ_FRAC is not set +# CONFIG_FEATURE_SH_HISTFILESIZE is not set +# CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS is not set + +# +# System Logging Utilities +# +# CONFIG_KLOGD is not set +# CONFIG_FEATURE_KLOGD_KLOGCTL is not set +# CONFIG_LOGGER is not set +# CONFIG_LOGREAD is not set +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +# CONFIG_SYSLOGD is not set +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +# CONFIG_FEATURE_REMOTE_LOG is not set +# CONFIG_FEATURE_SYSLOGD_DUP is not set +# CONFIG_FEATURE_SYSLOGD_CFG is not set +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0 +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_FEATURE_KMSG_SYSLOG is not set diff --git a/gcc/download.sh b/gcc/download.sh new file mode 100755 index 0000000..2ac5dd2 --- /dev/null +++ b/gcc/download.sh @@ -0,0 +1,13 @@ +#!/bin/sh +set -eu + +mkdir -p sources +cd sources + +wget -c -i ../sources.wget-list + +mv gcc-boot-2.95.3.patch\?id=* gcc-boot-2.95.3.patch +mv glibc-boot-2.16.0.patch\?id=* glibc-boot-2.16.0.patch +mv glibc-boot-2.2.5.patch\?id=* glibc-boot-2.2.5.patch + +sha1sum -c ../sources.sha1 diff --git a/gcc/notes/busybox_programs.txt b/gcc/notes/busybox_programs.txt new file mode 100644 index 0000000..6b8ab3d --- /dev/null +++ b/gcc/notes/busybox_programs.txt @@ -0,0 +1,33 @@ +Required bootstrap binaries (sorted as in busybox menuconfig) + +Archival Utilities: +- zcat +- tar +Coreutils: +- basename +- cat +- chmod +- chroot (self dep) +- cp +- dirname +- echo +- env (self dep) +- expr +- install +- ln +- ls +- mkdir +- mv +- pwd +- rm +- sleep +- sort +- touch +- tr +- true +- uniq +Editors: +- cmp +- sed +Shells: +- ash diff --git a/gcc/notes/gentoo/gentoo.sha1 b/gcc/notes/gentoo/gentoo.sha1 new file mode 100644 index 0000000..f97c4ea --- /dev/null +++ b/gcc/notes/gentoo/gentoo.sha1 @@ -0,0 +1,15 @@ +534c7ee46331ff1f1fc96a378fd6a9f6b322a242 bison-3.7.1.tar.xz +f17235bc9c3aec538065a655681815c242a6d7d5 ca-certificates_20200601.tar.xz +8df6cb570c8d6596a67d1c0773bf00650154f7aa libffi-3.3.tar.gz +228604686ca23f42e48b98930babeb5d217f1899 m4-1.4.18.tar.xz +7d9d11eb36cfb752da1fb11bb3e521d2a3cc8830 make-4.2.1.tar.bz2 +6a4098623cd65b9037b301b8f71c62454ccab2d9 mktemp-1.7.tar.gz +b213a293f2127ec3e323fb3cfc0c9807664fd997 openssl-1.1.1g.tar.gz +1003c6aa71d8966501038178459a9fa4e9aba747 perl-5.30.3.tar.xz +2ef586fd14af9c99a8c01d9ff75ec656c5f9a175 portage-3.0.8.tar.bz2 +e1de02779a89a94000c0ed340ec126de25825f2f Python-3.7.9.tar.xz +00823f43901e7da39f3f0daf20ec9efae47e959e rsync-3.2.3.tar.gz +61bd770062d49cdab3f0f45df473e2bf950ba266 sed-4.8.tar.xz +2b886eab5b97267cc358ab35e42d14d33d6dfc95 wget-1.20.3.tar.gz +fa2ae4db119f639a01b02f99f1ba671ece2828eb xz-5.2.5.tar.gz +e6d119755acdf9104d7ba236b1242696940ed6dd zlib-1.2.11.tar.gz diff --git a/gcc/notes/gentoo/gentoo.wget-list b/gcc/notes/gentoo/gentoo.wget-list new file mode 100644 index 0000000..6635a4f --- /dev/null +++ b/gcc/notes/gentoo/gentoo.wget-list @@ -0,0 +1,15 @@ +https://tukaani.org/xz/xz-5.2.5.tar.gz +https://zlib.net/zlib-1.2.11.tar.gz +https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz +https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tar.xz +https://www.cpan.org/src/5.0/perl-5.30.3.tar.xz +https://www.openssl.org/source/old/1.1.1/openssl-1.1.1g.tar.gz +https://ftp.gnu.org/gnu/wget/wget-1.20.3.tar.gz +https://rsync.samba.org/ftp/rsync/src/rsync-3.2.3.tar.gz +https://www.mktemp.org/dist/mktemp-1.7.tar.gz +http://deb.debian.org/debian/pool/main/c/ca-certificates/ca-certificates_20200601.tar.xz +https://dev.gentoo.org/~zmedico/portage/archives/portage-3.0.8.tar.bz2 +https://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz +https://ftp.gnu.org/gnu/bison/bison-3.7.1.tar.xz +https://ftp.gnu.org/gnu/make/make-4.2.1.tar.bz2 +https://ftp.gnu.org/gnu/sed/sed-4.8.tar.xz diff --git a/gcc/notes/gentoo/gentoo_gen.sh b/gcc/notes/gentoo/gentoo_gen.sh new file mode 100755 index 0000000..889d71b --- /dev/null +++ b/gcc/notes/gentoo/gentoo_gen.sh @@ -0,0 +1,30 @@ +#!/bin/sh +set -e + +# Run this script in a recent stage3 tarball to grab all required software versions and URLs. + +root="${1:-/}" + +pkgs=" +app-arch/xz-utils +sys-libs/zlib +dev-libs/libffi +dev-lang/python +dev-lang/perl +dev-libs/openssl +net-misc/wget +net-misc/rsync +app-misc/ca-certificates +sys-apps/portage +sys-devel/m4 +sys-devel/bison +sys-devel/make +sys-apps/sed +" + +for x in $pkgs; do + ver="$(portageq best_visible "$root" ebuild "$x")" + echo "$ver" + portageq metadata "$root" ebuild "$ver" SRC_URI + echo +done diff --git a/gcc/notes/gentoo/gentoo_notes.txt b/gcc/notes/gentoo/gentoo_notes.txt new file mode 100644 index 0000000..6f88f70 --- /dev/null +++ b/gcc/notes/gentoo/gentoo_notes.txt @@ -0,0 +1,187 @@ +Based on portage-3.0.8 and gentoo-20201031 snapshot + +The specifics of this document (software versions and whatnot) are subject to +change as gentoo evolves, but I hope the big lines of it won't change too +much. + +This guide starts off with a system built from build_cross.sh, built for +x86_64 with i686 multilib. +It might be possible to adapt both that script, and this guide for other +architectures, but this guide won't go into detail. + +You should be running a system with a x86_64 kernel (with i686 support). +Install the required sources (listed in gentoo.wget-list) into /sources. + +To enter the bootstrap system as a chroot, use the following commands to set +up the filesystems and entering: +mkdir -p proc sys dev tmp +mount -t proc proc proc +mount -t sysfs sysfs sys +mount -t devtmpfs devtmpfs dev +mount -t devpts devpts dev/pts +mount -t tmpfs tmpfs dev/shm +mkdir -p etc +touch etc/resolv.conf +mount --bind /etc/resolv.conf etc/resolv.conf +./bootstrap/bin/chroot . /bootstrap/bin/env -i PATH=/bin:/sbin:/usr/bin:/usr/sbin:/bootstrap/bin:/bootstrap/sbin HOME=/root /bootstrap/bin/sh -l + +To install all the prerequisite tools, place the sources (listed in +gentoo.wget-list) under /sources, then run the gentoo_tools.sh script. + +Configure portage: +echo "root:x:0:0:root:/root:/bin/bash" > /etc/passwd +echo "root:x:0:root" > /etc/group +echo "portage:x:250:250:portage:/var/tmp/portage:/bin/false" >> /etc/passwd +echo "portage::250:portage" >> /etc/group +echo "C UTF-8" > /etc/locale.gen +mkdir -p /tmp /root +chown root.root /tmp /root +chmod 1777 /tmp +chmod 0700 /root +cat > /etc/portage/make.conf << 'EOF' +FEATURES='-pid-sandbox -news' +ROOTPATH=/bootstrap/bin:/bootstrap/sbin +EOF +ln -sf ../../var/db/repos/gentoo/profiles/default/linux/amd64/17.1/ /etc/portage/make.profile + +Install ebuild repository (pick appropriate date, see distfiles.gentoo.org/snapshots): +emerge-webrsync -v --revert=20201031 + +Install some ebuild prerequisites: +emerge -O1 sys-apps/gentoo-functions # Used by elt-patches and a ton of other things +emerge -O1 app-portage/elt-patches # required by elibtoolize(libtool.eclass), used to install any library +emerge -O1 sys-devel/gnuconfig # required by gnuconfig_update(gnuconfig.eclass), used by toolchain(-glibc).eclass, doesn't hurt to have +emerge -O1 sys-devel/binutils-config sys-devel/gcc-config + +First, we will build an updated binutils+gcc combo that targets /usr instead +of /bootstrap. This makes it easier to bootstrap glibc and everything else. We +will use portage for this, even though it's a mess. + +NOTE: Doing this is (probably) *BAAAAD*, since we're linking the compiler +support libraries with a potentially incompatible version of glibc in +/bootstrap, and upgrading it afterwards. Glibc should always be installed +first into a new prefix! However, due to the complex relationship between +glibc, gcc, libgcc and libstdc++, this is rather hard to do while wrangling +the change from /bootstrap to /usr, as well as the multilib libdir changes, so +for simplicity's sake, I won't bother. This just works™. + +Install temporary libc files for target compiler: +mkdir -p /lib64 /lib +ln -sf /bootstrap/lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 +ln -sf /bootstrap/lib32/ld-linux.so.2 /lib/ld-linux.so.2 +mkdir -p /usr/include +ln -sf /bootstrap/include/limits.h /usr/include/limits.h +mkdir -p /usr/lib64 /usr/lib +ln -sf /bootstrap/lib/{crti,crtn,Scrt1}.o \ + /bootstrap/lib/{libc,libm,libpthread}.so /usr/lib64/ +ln -sf /bootstrap/lib32/{crti,crtn,Scrt1}.o \ + /bootstrap/lib32/{libc,libm,libpthread}.so /usr/lib/ + +Install binutils+GCC (linked against /bootstrap): +USE='-*' emerge -O1 sys-devel/binutils +USE='-* static-libs' EXTRA_ECONF=--disable-shared \ + CPPFLAGS='-isystem/usr/include' LDFLAGS='-L/usr/lib64 -L/usr/lib' \ + emerge -O1 dev-libs/gmp dev-libs/mpfr dev-libs/mpc +USE='-*' EXTRA_ECONF=--disable-bootstrap GCC_MAKE_TARGET=all \ + CPPFLAGS='-isystem/usr/include' LDFLAGS='-L/usr/lib64 -L/usr/lib' \ + CPATH=/bootstrap/include \ + emerge -O1 sys-devel/gcc +emerge --rage-clean dev-libs/gmp dev-libs/mpfr dev-libs/mpc +gcc-config 1 # Not automatic unlike binutils-config... + +NOTE: The Glibc ebuild downloads a file called gcc-multilib-bootstrap, which +contains prebuilt binaries to bootstrap multilib gcc. This is _only_ used when +the command "echo 'int main(){}' | $CC -m32 -xc -" fails, and shouldn't be +being used in this bootstrap, but you can make sure of that by patching the +ebuild to `die` instead of running the `sed` command to enable its use. + +NOTE: BOOTSTRAP_RAP=1 is only used in the Glibc ebuild, to avoid a pre-install +check that might pick up programs from /bootstrap to test against the +installed glibc, as well as picking up python from $PATH instead of +eselect-python. I'm not aware of how the support status is for this variable, +and as such it might disappear in the future, or be used in more packages. + +Install initial glibc: +CC=/bootstrap/bin/gcc emerge -O1 sys-kernel/linux-headers +USE='-*' BOOTSTRAP_RAP=1 emerge -O1 sys-libs/glibc + +NOTE: `sandbox` outputs a failure message to stderr for every program still +built against /bootstrap, which includes the compiler. Some autoconf scripts +check stderr to determine a failure, so this causes builds to fail. This is +why it's (partially) disabled for this stage. + +Bootstrap the rest of the system: +USE=-seccomp emerge -O1 app-misc/pax-utils +cd /var/db/repos/gentoo/scripts +mkdir -p /var/run +ln -s /bootstrap/bin/python3 /usr/bin/python +rm -f /etc/profile.env +USE=-nls FEATURES=-usersandbox BOOTSTRAP_RAP=1 ./bootstrap.sh + +Reinitialize the environment: +env-update +exec bash -l +export PATH=$PATH:/bootstrap/bin:/bootstrap/sbin + +In the following stages, you'll get tons of LD_PRELOAD libsandbox.so errors +from programs still linked against /bootstrap. This is safe to ignore, and +will gradually disappear as programs are rebuilt. + +It'd be nice to remove the bootstrap tools now, but among wget/openssl, gawk, +gzip, grep, and other tools, they're still required for some reason. + +From this point onward, you're pretty much on your own to beat portage into +performing an `emerge -e @system` and fixing any unspecified dependencies you +encounter along the way. This can be done in a whole number of ways, and will +differ on any given day, since this is painfully unsupported by gentoo devs. +Because the order in which you install everything can differ wildly, and +consequently affect the output of your build, it is advised to do a second +`emerge -e @system` afterwards, for sanity. Below I detail my most recent +procedure, which, I can't stress enough, may or may not work at the time +you're reading this. + +Fix circular dependencies: +USE=-filecaps emerge -O1 sys-libs/pam +USE='-acl -xattr' emerge -O1 sys-apps/shadow # required by acct-group/acct-user + +Verify there's no circular deps left, for sanity: +emerge -fe @system + +Build everything: +emerge -e @system + +Clean up bootstrap tools/configs: +rm -rf /bootstrap /sources +rm -f /etc/portage/make.conf + +Reinitialize environment: +env-update +exec bash -l + +Consider rebuilding everything again without /bootstrap, since a lot of +packages couldn't be properly stripped, and a bunch of other tools have been +upgraded, during the first emerge -e @system: +emerge -be @system + +To install everything into a clean root: +ROOT=/final emerge -K @system + +Prepare files for catalyst: +mkdir -p /var/tmp/catalyst/snapshots +wget -O gentoo-latest.tar.xz http://distfiles.gentoo.org/snapshots/gentoo-latest.tar.xz +mkdir -p /var/tmp/catalyst/builds/default +cd /var/tmp/catalyst/builds/default +tar -C /final -cf stage3-amd64-latest.tar . +xz -9v stage3-amd64-latest.tar +rm -rf /final +wget -O stage1.spec "https://gitweb.gentoo.org/proj/releng.git/plain/releases/specs/amd64/stage1.spec" +wget -O stage2.spec "https://gitweb.gentoo.org/proj/releng.git/plain/releases/specs/amd64/stage2.spec" +wget -O stage3.spec "https://gitweb.gentoo.org/proj/releng.git/plain/releases/specs/amd64/stage3.spec" +sed -i -e 's/@TIMESTAMP@/latest/' -e '/^portage_confdir: /d' *.spec + +Build the stage3: +emerge catalyst +catalyst -f stage1.spec + +Clean up chroot: +umount -R proc sys dev etc/resolv.conf diff --git a/gcc/notes/gentoo/gentoo_notes_lfs.txt b/gcc/notes/gentoo/gentoo_notes_lfs.txt new file mode 100644 index 0000000..1cbc2ad --- /dev/null +++ b/gcc/notes/gentoo/gentoo_notes_lfs.txt @@ -0,0 +1,116 @@ +This is done in a chroot, from a 10.0 chapter 7 system. To do this on a live +system, you'll need a kernel, initscripts, and some way to connect to the +internet, such as iproute+dhcpcd. + +Make sure you bind-mount your host's /etc/resolv.conf to the chroot, such as: +touch $LFS/etc/resolv.conf +mount -v --bind /etc/resolv.conf $LFS/etc/resolv.conf +This will allow programs to resolve DNS names, which is necessary to download things. + +Also mount /dev/shm, in addition to the mounts in chapter 7.3: +mount -t tmpfs tmpfs $LFS/dev/shm + +Run the following chapters (avoid tests and docs): +- 8.9. Zlib-1.2.11 +- 8.10. Bzip2-1.0.8 +- 8.34. Bash-5.0 +- 8.47. Libffi-3.3 +- 8.48. OpenSSL-1.1.1g +- 8.49. Python-3.8.5 (!--with-system-expat --without-ensurepip) + +Symlink python3: +ln -sf python3 /usr/bin/python + +Install ca-certificates: +make +mkdir -p /usr/share/ca-certificates +make install +( cd /usr/share/ca-certificates + find . -name '*.crt' | LC_ALL=C sort | cut -b3- +) > /etc/ca-certificates.conf +mkdir -p /etc/ssl/certs +update-ca-certificates + +Install wget: +./configure --prefix=/usr --sysconfdir=/etc --with-ssl=openssl --with-libssl-prefix=/usr +make +make install + +Install portage (https://wiki.gentoo.org/wiki/Portage#Tarball): +python setup.py install +echo "portage:x:250:250:portage:/var/tmp/portage:/bin/false" >> /etc/passwd +echo "portage::250:portage" >> /etc/group + +Install repository (https://bouncer.gentoo.org/fetch/root/all/snapshots/, grab gentoo-*.tar.xz): +rm -rf /var/db/repos +mkdir -p /var/db/repos +mv gentoo-*/ /var/db/repos/gentoo + +Configure portage: +mkdir -p /etc/portage +ln -sf ../../var/db/repos/gentoo/profiles/default/linux/amd64/17.1/ /etc/portage/make.profile + +emerge -O1 sys-apps/baselayout +. /etc/profile +cat /var/lib/gentoo/news/news-gentoo.unread >> /var/lib/gentoo/news/news-gentoo.read +rm /var/lib/gentoo/news/news-gentoo.unread +touch /var/lib/gentoo/news/news-gentoo.unread +dispatch-conf + +Bootstrap multilib compiler: +emerge -O1 sys-apps/gentoo-functions sys-devel/binutils-config sys-devel/gcc-config app-portage/elt-patches sys-devel/binutils dev-libs/gmp dev-libs/mpfr dev-libs/mpc + +emerge -Of sys-devel/gcc +tar xf /var/cache/distfiles/gcc-*.tar.* && cd gcc-*/ && mkdir build && cd build +mkdir -p /tmp/gcc/include +touch /tmp/gcc/include/limits.h +../configure --prefix=/usr --with-local-prefix=/tmp/gcc --with-newlib --without-headers --disable-shared --disable-threads --disable-bootstrap --enable-multilib --enable-languages=c,c++ +make all-gcc all-target-libgcc +make install-gcc install-target-libgcc +rm -rf /tmp/gcc +cd ../.. && rm -rf gcc-*/ + +Remove use of gcc-multilib-bootstrap, since that defeats the point of building +everything from source, and we don't need it with this hack: +cd /var/db/repos/gentoo/sys-libs/glibc +cp -u glibc-2.31-r6.ebuild{,.orig} +sed -e '/gcc-multilib-bootstrap/d' glibc-2.31-r6.ebuild.orig > glibc-2.31-r6.ebuild +ebuild glibc-2.31-r6.ebuild manifest +PYTHON_COMPAT_OVERRIDE=python3 emerge -O1 sys-libs/glibc + +...in case of downgrade, reinstall any LFS programs that broke (using the +/tools toolchain?) until portage works again, and reinstall glibc, run +ldconfig and fix all warnings. +Alternatively, build LFS with an older glibc or unmask the same glibc version +that LFS has... + +Clean up glibc modifications: +cd /var/db/repos/gentoo/sys-libs/glibc +mv glibc-2.31-r6.ebuild.orig glibc-2.31-r6.ebuild +ebuild glibc-2.31-r6.ebuild manifest + +Not sure if this is necessary if not downgrading, but for good measure: +tar xf /var/cache/distfiles/gcc-*.tar.* && cd gcc-*/ && mkdir build && cd build +../libstdc++-v3/configure --prefix=/usr --enable-multilib +make +make install +cd ../.. && rm -rf gcc-*/ + +emerge -O1 sys-devel/gcc +PYTHON_COMPAT_OVERRIDE=python3 emerge -O1 sys-libs/glibc # might be necessary to merge _after_ pax-utils? + +Bootstrap rest of system: +emerge -O1 sys-libs/libseccomp app-misc/pax-utils # required by at least ncurses and sandbox +emerge -O1 sys-apps/sandbox +USE=-acl emerge -O1 sys-devel/gettext # circular dep, bundles libxml2, abusing this fact... +USE=-acl emerge -O1 net-misc/rsync # required by linux-headers +emerge -O1 dev-util/pkgconf # required by pax-utils +cd /var/db/repos/gentoo/scripts +./bootstrap.sh + +USE=-pam emerge -O1 sys-libs/libcap # circular dep +USE='-acl -xattr -pam' emerge -O1 sys-apps/shadow # required by acct-group +emerge -abe @system + +Unpollute the system by installing it somewhere else: +ROOT=/final emerge -K @system diff --git a/gcc/notes/gentoo/gentoo_notes_nogcc.txt b/gcc/notes/gentoo/gentoo_notes_nogcc.txt new file mode 100644 index 0000000..bf2a1aa --- /dev/null +++ b/gcc/notes/gentoo/gentoo_notes_nogcc.txt @@ -0,0 +1,182 @@ +Based on portage-3.0.8 and gentoo-20201029 + +The specifics of this document (software versions and whatnot) are subject to +change as gentoo evolves, but I hope the big lines of it won't change too +much. + +This guide starts off with a system built from build_cross.sh, built for +x86_64 with i686 multilib. +It might be possible to adapt both that script, and this guide for other +architectures, but this guide won't go into detail. + +You should be running a system with a x86_64 kernel (with i686 support). +Install the required sources (outlined in gentoo.wget-list) into /sources. + +To enter the bootstrap system as a chroot, use the following commands to set +up the filesystems and entering: +mkdir -p proc sys dev tmp +mount -t proc proc proc +mount -t sysfs sysfs sys +mount -t devtmpfs devtmpfs dev +mount -t devpts devpts dev/pts +mount -t tmpfs tmpfs dev/shm +mkdir -p etc +touch etc/resolv.conf +mount --bind /etc/resolv.conf etc/resolv.conf +./bootstrap/bin/chroot . /bootstrap/bin/env -i PATH=/bin:/sbin:/usr/bin:/usr/sbin:/bootstrap/bin:/bootstrap/sbin HOME=/root /bootstrap/bin/sh -l + +To install all the prerequisite tools, place the sources (listed in +gentoo.wget-list) under /sources, then run the gentoo_tools.sh script. + +Install ebuild repository: +tar xf gentoo-*.tar.xz +mkdir -p /var/db/repos/ +mv gentoo-*/ /var/db/repos/gentoo + +Configure portage: +echo "root:x:0:0:root:/root:/bin/bash" > /etc/passwd +echo "root:x:0:root" > /etc/group +echo "portage:x:250:250:portage:/var/tmp/portage:/bin/false" >> /etc/passwd +echo "portage::250:portage" >> /etc/group +mkdir -p /tmp /root +chown root.root /tmp /root +chmod 1777 /tmp +chmod 0700 /root +ln -sf ../../var/db/repos/gentoo/profiles/default/linux/amd64/17.1/ /etc/portage/make.profile +cat > /etc/portage/make.conf << 'EOF' +FEATURES=-pid-sandbox +ROOTPATH=/bootstrap/bin:/bootstrap/sbin +EOF + +Install some prerequisites: +emerge -O1 sys-apps/gentoo-functions # Used by elt-patches and a ton of other things +emerge -O1 app-portage/elt-patches # required by elibtoolize(libtool.eclass), used to install any library + +TODO: Doing this is *BAAAAD*, since we're linking the compiler and libraries +with a potentially incompatible version of glibc in /tools, and upgrading it +afterwards. Glibc should always be installed first into a new prefix! +I just can't be assed to discuss the manual upgrade of binutils+gcc and their +dependency tools. + +TODO: Consider installing sys-devel/gnuconfig for the config.sub and +config.guess scripts. + +Bootstrap GCC: +# Install linker at final location, +# so programs built with the new compiler can run... +mkdir -p /lib64 /lib +ln -sf /bootstrap/lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 +ln -sf /bootstrap/lib32/ld-linux.so.2 /lib/ld-linux.so.2 +# Target compiler expects target limits.h to be available in target prefix... +mkdir -p /usr/include +ln -sf /bootstrap/include/limits.h /usr/include/limits.h +# GCC errors out at the first incompatible startfile in LIBRARY_PATH, +# so multilib paths need to be fixed to match the final compiler... +mkdir -p /usr/lib64 /usr/lib +ln -sf /bootstrap/lib/crti.o /bootstrap/lib/crtn.o /bootstrap/lib/Scrt1.o /usr/lib64/ +ln -sf /bootstrap/lib32/crti.o /bootstrap/lib32/crtn.o /bootstrap/lib32/Scrt1.o /usr/lib/ +# Reconfigure GCC to match the config of the final compiler as much as possible. +cat > /etc/portage/gcc.specs << 'EOF' +*multilib: +. !m64 !m32;64:../lib64 m64 !m32;32:../lib !m64 m32; + +*startfile_prefix_spec: +/usr/lib/ + +*link: ++ %{!shared:%{!static:-dynamic-linker %{m32:/lib/ld-linux.so.2;:/lib64/ld-linux-x86-64.so.2}}} + +*cpp: ++ -isystem /usr/include +EOF +cat > /etc/portage/bashrc << 'EOF' +export C_INCLUDE_PATH=/usr/include:/bootstrap/include +export CPLUS_INCLUDE_PATH=/usr/include:/bootstrap/include +export LIBRARY_PATH=/usr/lib64:/usr/lib:/bootstrap/lib:/bootstrap/lib32 +export LD_LIBRARY_PATH=/usr/lib64:/usr/lib:/bootstrap/lib:/bootstrap/lib32 +export CC='gcc -specs=/etc/portage/gcc.specs' +export CXX='g++ -specs=/etc/portage/gcc.specs' +EOF +emerge -O1 sys-libs/zlib dev-libs/gmp dev-libs/mpfr dev-libs/mpc +emerge -O1 sys-devel/binutils-config sys-devel/binutils +emerge -O1 sys-devel/gcc-config sys-devel/gcc +/usr/bin/gcc-config 1 # Not automatic unlike binutils-config + +Make portage forget about everything it's just installed, so it's all rebuilt +first thing when running bootstrap.sh/emerge later: +rm -rf /var/db/pkg + +Install initial glibc: +CC=gcc emerge -O1 sys-kernel/linux-headers +mkdir -p /usr/bin/ +ln -sf /bootstrap/bin/python3 /usr/bin/python3tmp +PYTHON_COMPAT_OVERRIDE=python3tmp emerge -O1 sys-libs/glibc +rm -f /usr/bin/python3tmp + +This compiler and dynamic linker will now pick up everything correctly under +/usr instead of /bootstrap: +rm -f /etc/portage/bashrc /etc/portage/gcc.specs + +Build the remainder of bootstrap utilities: +cd /var/db/repos/gentoo/scripts +rm -f /etc/profile.env +mkdir -p /var/run +USE=-nls ./bootstrap.sh + +You'll get tons of LD_PRELOAD libsandbox.so errors from programs still linked +against /bootstrap. This is fine to ignore, and will gradually disappear as +programs are rebuilt. + +It'd be nice to remove the bootstrap tools now, but among wget/openssl, gawk, +gzip, grep, and other tools, they're still required for some reason. + +From this point onward, you're pretty much on your own to beat portage into +performing an `emerge -e @system` and fixing any unspecified dependencies you +encounter along the way. This can be done in a whole number of ways, and will +differ on any given day, since this is painfully unsupported by gentoo devs. +Because the order in which you install everything can differ wildly, and +consequently affect the output of your build, it is advised to do a second +`emerge -e @system` afterwards, for sanity. Below I detail my most recent +procedure, which, I can't stress enough, may or may not work at the time +you're reading this. + +Fix circular dependencies: +USE=-filecaps emerge -O1 sys-libs/pam +USE='-acl -xattr' emerge -O1 sys-apps/shadow # required by acct-group/acct-user + +Verify there's no circular deps left, for sanity: +emerge -fe @system + +Build everything: +emerge -be @system + +Clean up bootstrap tools/configs: +rm -rf /bootstrap /sources +rm -f /etc/portage/make.conf + +Reinitialize environment: +env-update +exec bash -l + +Consider rebuilding everything again without /bootstrap, as surely a lot +errors popped up during the first emerge -be @system, can't be sure enough. + +To install everything into a clean root: +ROOT=/final emerge -K @system + +Prepare files for catalyst: +mkdir -p /var/tmp/catalyst/snapshots +wget -O gentoo-latest.tar.xz http://distfiles.gentoo.org/snapshots/gentoo-latest.tar.xz +mkdir -p /var/tmp/catalyst/builds/default +cd /var/tmp/catalyst/builds/default +tar -C /final -cf stage3-amd64-latest.tar . +xz -9v stage3-amd64-latest.tar +rm -rf /final +wget -O stage1.spec "https://gitweb.gentoo.org/proj/releng.git/plain/releases/specs/amd64/stage1.spec" +wget -O stage2.spec "https://gitweb.gentoo.org/proj/releng.git/plain/releases/specs/amd64/stage2.spec" +wget -O stage3.spec "https://gitweb.gentoo.org/proj/releng.git/plain/releases/specs/amd64/stage3.spec" +sed -i -e 's/@TIMESTAMP@/latest/' -e '/^portage_confdir: /d' *.spec + +Build the stage3: +emerge catalyst +catalyst -f stage1.spec diff --git a/gcc/notes/gentoo/gentoo_tools.sh b/gcc/notes/gentoo/gentoo_tools.sh new file mode 100755 index 0000000..10bc0da --- /dev/null +++ b/gcc/notes/gentoo/gentoo_tools.sh @@ -0,0 +1,218 @@ +#!/bin/sh +set -e + +# This script builds and upgrades a bunch of prerequisite tools for gentoo +# There's just too many small details about these to cover properly in a text file... + +# Maintenance note: Run gentoo_gen.sh in a fully-updated stable system to get +# the appropriate package versions and URLs. +version_xz=5.2.5 +version_zlib=1.2.11 +version_libffi=3.3 +version_python=3.7.9 +version_perl=5.30.3 +version_openssl=1.1.1g +version_wget=1.20.3 +version_rsync=3.2.3 +version_mktemp=1.7 +version_ca_certificates=20200601 +version_portage=3.0.8 +version_m4=1.4.18 +version_bison=3.7.1 +version_make=4.2.1 +version_sed=4.8 + +export MAKEFLAGS="-j${NPROC:-$(getconf _NPROCESSORS_ONLN)}" + +# This symlink isn't provided by the bootstrap, but is necessary for a ton of tools +mkdir -p /usr/bin +ln -sf ../../bootstrap/bin/env /usr/bin/env + +cd /sources +export PATH=/bootstrap/bin + +# Xz is required to unpack a lot of tarballs, including the Portage tree. +# app-arch/xz-utils: +rm -rf xz-$version_xz +tar zxf xz-$version_xz.tar.gz +( cd xz-$version_xz + ./configure --prefix=/bootstrap + make + make install +) +rm -rf xz-$version_xz + +# Zlib is required for the zlib Python module, used by Portage. +# sys-libs/zlib: +rm -rf zlib-$version_zlib +tar zxf zlib-$version_zlib.tar.gz +( cd zlib-$version_zlib + ./configure --prefix=/bootstrap + make + make install +) +rm -rf zlib-$version_zlib + +# Libffi is required for the _ctypes Python module, used by Portage. +# dev-libs/libffi: +rm -rf libffi-$version_libffi +tar zxf libffi-$version_libffi.tar.gz +( cd libffi-$version_libffi + # Fix an error that crops up due to using coreutils-5.0 + sed -i -e 's/tail -1/tail -n 1/g' configure + ./configure --prefix=/bootstrap + make + make install +) +rm -rf libffi-$version_libffi + +# Portage is written in Python. Modern glibc also needs it to build. +# dev-lang/python: +rm -rf Python-$version_python +tar Jxf Python-$version_python.tar.xz +( cd Python-$version_python + ./configure --prefix=/bootstrap --without-ensurepip + make + make install + ln -sf python3 /bootstrap/bin/python +) +rm -rf Python-$version_python + +# Perl is required to build OpenSSL as well as some other things. +# dev-lang/perl: +rm -rf perl-$version_perl +tar Jxf perl-$version_perl.tar.xz +( cd perl-$version_perl + # Fix pwd hardcode + sed -i -e "s@'/bin/pwd'@'/bootstrap/bin/pwd'@" dist/PathTools/Cwd.pm + ./Configure -des -Dprefix=/bootstrap -Dcc=gcc -Dinstallusrbinperl=n + make + make install +) +rm -rf perl-$version_perl + +# OpenSSL is required for https support in wget. +# dev-libs/openssl: +rm -rf openssl-$version_openssl +tar zxf openssl-$version_openssl.tar.gz +( cd openssl-$version_openssl + ./config --prefix=/bootstrap --openssldir=/bootstrap/etc/ssl + make + make install +) +rm -rf openssl-$version_openssl + +# Wget is required to download the portage tree and packages. +# net-misc/wget: +rm -rf wget-$version_wget +tar zxf wget-$version_wget.tar.gz +( cd wget-$version_wget + ./configure --prefix=/bootstrap --with-ssl=openssl --with-libssl-prefix=/bootstrap + make + make install +) +rm -rf wget-$version_wget + +# Rsync is optional to run emerge-webrsync or emerge --sync, +# and required for linux-headers. +# net-misc/rsync: +rm -rf rsync-$version_rsync +tar zxf rsync-$version_rsync.tar.gz +( cd rsync-$version_rsync + ./configure --prefix=/bootstrap --disable-simd --disable-xxhash --disable-zstd --disable-lz4 + make + make install +) +rm -rf rsync-$version_rsync + +# Mktemp is required by ca-certificates as well as Portage for installing packages. +# To avoid upgrading all coreutils, this standalone version is used. +# custom/mktemp: +rm -rf mktemp-$version_mktemp +tar zxf mktemp-$version_mktemp.tar.gz +( cd mktemp-$version_mktemp + ./configure --prefix=/bootstrap + make + make install +) +rm -rf mktemp-$version_mktemp + +# To verify https connections, wget/openssl need some certificates. +# They're installed directly here, instead of properly installing +# update-ca-certificates. +# app-misc/ca-certificates: +rm -rf ca-certificates_$version_ca_certificates +tar Jxf ca-certificates_$version_ca_certificates.tar.xz +mv work ca-certificates_$version_ca_certificates +( cd ca-certificates_$version_ca_certificates + make -C mozilla + mkdir -p /bootstrap/share/ca-certificates/mozilla + make -C mozilla CERTSDIR=/bootstrap/share/ca-certificates/mozilla install + find mozilla -name '*.crt' | LC_ALL=C sort > ca-certificates.conf + ./sbin/update-ca-certificates \ + --certsconf "$PWD/ca-certificates.conf" \ + --certsdir /bootstrap/share/ca-certificates \ + --etccertsdir /bootstrap/etc/ssl/certs +) +rm -rf ca-certificates_$version_ca_certificates + +# Finally, install the package manager. +# sys-apps/portage: +rm -rf portage-$version_portage +tar jxf portage-$version_portage.tar.bz2 +( cd portage-$version_portage + python3 setup.py install --system-prefix=/bootstrap + + # This path is hardcoded... + # Symlinking the individual files so installing the final package will replace them properly. + mkdir -p /usr/share/portage/config/sets + ln -sf ../../../../bootstrap/share/portage/config/make.globals /usr/share/portage/config/make.globals + ln -sf ../../../../bootstrap/share/portage/config/repos.conf /usr/share/portage/config/repos.conf + ln -sf ../../../../../bootstrap/share/portage/config/sets/portage.conf /usr/share/portage/config/sets/portage.conf +) +rm -rf portage-$version_portage + + +## ...but that's not all! +## Here come the dependencies to build the initial gcc/glibc! +## These can be installed directly with portage but it's significantly cleaner not to... + +# sys-devel/m4 (required by glibc-2.31): +rm -rf m4-$version_m4 +tar Jxf m4-$version_m4.tar.xz +( cd m4-$version_m4 + ./configure --prefix=/bootstrap + make + make install +) +rm -rf m4-$version_m4 + +# sys-devel/bison (required by glibc-2.31): +rm -rf bison-$version_bison +tar Jxf bison-$version_bison.tar.xz +( cd bison-$version_bison + ./configure --prefix=/bootstrap + make + make install +) +rm -rf bison-$version_bison + +# sys-devel/make (>=4.0 required by glibc-2.31): +rm -rf make-$version_make +tar jxf make-$version_make.tar.bz2 +( cd make-$version_make + ./configure --prefix=/bootstrap + make + make install +) +rm -rf make-$version_make + +# sys-apps/sed (>=4.3 required by glibc-2.31 for -E option): +rm -rf sed-$version_sed +tar Jxf sed-$version_sed.tar.xz +( cd sed-$version_sed + ./configure --prefix=/bootstrap + make + make install +) +rm -rf sed-$version_sed diff --git a/gcc/notes/lfs_notes.txt b/gcc/notes/lfs_notes.txt new file mode 100644 index 0000000..502ec58 --- /dev/null +++ b/gcc/notes/lfs_notes.txt @@ -0,0 +1,131 @@ +Current LFS version: 10.0 + +Substantial changes were introduced in LFS 10.0, so these notes will probably +not apply to anything below this version. This version should be easier to +bootstrap like this, anyway. + +Ignore the Host System Requirements, a lot of these either don't apply or will +be procured as we go through this guide. +Ignore, as well, the creation of a new partition or user, as the necessary +tools to achieve this aren't available in the bootstrap toolset. We will be +building everything on whatever partition the bootstrap toolset was installed. + +Install the sources under /sources right next to the /bootstrap directory. +This can't be done when inside the bootstrap system as no networking utilities +are yet installed. For the "xz" package, download a .tar.gz or .tar.bz2 +package, as the xz utilities aren't included with the bootstrap utilities. + +To enter the bootstrap system as a chroot, use the following commands to set +up the filesystems and entering: +mkdir -p sys proc dev tmp +mount -o ro -t devtmpfs devtmpfs dev +mount -o ro -t devpts devpts dev/pts +mount -o ro -t sysfs sysfs sys +mount -o ro -t proc proc proc +./bootstrap/bin/chroot . /bootstrap/bin/env -i PATH=/bootstrap/bin HOME=/root /bin/sh -l + +Set the LFS variable to either / or keep it blank, as the bootstrap tools are +self-contained in /bootstrap, and can be removed afterwards, keeping a clean +system anyway. + +The bootstrap tools are all x86, if you're going to be cross-compiling for +x86_64, make sure the command `uname -m` returns `x86_64`, or manually +substitute it throughout the LFS commands you execute. + +In chapter 4.4 Setting Up the Environment, make sure LFS is set according to +what's been explained, and PATH=$LFS/tools/bin:/bootstrap/bin. We don't want +to use /usr/bin and /bin until chapter 7. Also define LFS_TGT after setting PATH. +Also `mkdir /root` before creating the files. If you don't want the "I have no +name!" prompt, you shouldn't use '\u' in the PS1 variable. +A finished bashrc/bash_profile looks like: +mkdir -p /root +cat > ~/.bash_profile << "EOF" +exec env -i HOME=$HOME TERM=$TERM PS1='\w\$ ' /bin/bash +EOF +cat > ~/.bashrc << "EOF" +set +h +umask 022 +LFS= +LC_ALL=POSIX +PATH=$LFS/tools/bin:/bootstrap/bin +LFS_TGT=$(uname -m)-lfs-linux-gnu +export LFS LC_ALL LFS_TGT PATH +EOF +source ~/.bash_profile + +Once you get to chapter 5, you will need to add a couple of tools to the +/bootstrap toolset, by building them from the sources you've downloaded for LFS. + +You'll need to build the following packages: +- xz-5.2.5 (required to unpack .tar.xz archives) +- sed-4.8 (required by linux-headers for -E option) +- m4-1.4.18 (required by bison) +- bison-3.7.1 (required by glibc) +- grep-3.4 (required by glibc for -o option) +- make-4.3 (required by glibc) +- Python-3.8.5 (required by glibc) + +Install them by unpacking them (see "General Compilation Instructions" chapter), +and running: +./configure --prefix=/bootstrap --build=i686-pc-linux-gnu +make +make install + +Python with: +./configure --prefix=/bootstrap --build=i686-pc-linux-gnu --without-ensurepip + +Now, you can run chapter 5 and 6, with the following exceptions: + +5.3. GCC-10.2.0 - Pass 1: + Add --with-stage1-libs='-lstdc++ -lsupc++' CC='gcc -std=c11' + to the ../configure command. + +6.3. Ncurses-6.2: + Use --disable-stripping during "main" ./configure + +6.4. Bash-5.0: + Do not move bash to /bin or replace the /bin/sh symlink. We'll do this + later. + +Once you reach chapter 7, run the finishing bash install commands we skipped earlier: +mv $LFS/usr/bin/bash $LFS/bin/bash +ln -sfv bash $LFS/bin/sh + +Now, if you're cross-building for x86_64, this is the point where you should +make sure you're either already running a compatible kernel, or you reboot +into one. You might be able to build one with the tools in /bootstrap and +/tools, but this guide won't cover this. Booting into this system instead of +chrooting will also require extra steps, not covered here. + +You may skip chapters 7.1 and 7.2, since we've built everything as root, and +7.3 may be skipped as well as we've already set up the chroot. However, you +should set up the PATH variable as described in chapter 7.4, by for example +modifying your bashrc: +cat > ~/.bash_profile << "EOF" +exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash +EOF +cat > ~/.bashrc << "EOF" +set +h +umask 022 +PATH=/bin:/usr/bin:/sbin:/usr/sbin +export PATH +EOF +source ~/.bash_profile + +Chapter 7.5 onwards can be followed without any modifications. This is all +standard LFS stuff from here on. + +It's probably not related to this specific bootstrap, but I had to run the +following extra commands during the remaining chapters: + +7.10. Perl-5.32.0: + Run the following command after sh Configure: + echo '#define MB_LEN_MAX 16' >> config.h + +7.13. Util-linux-2.36: + Run the following command after ./configure: + echo '#define SSIZE_MAX LONG_MAX' >> config.h + +8.15. M4-1.4.18: + Run the following command after ./configure: + echo '#define MB_LEN_MAX 16' >> lib/config.h diff --git a/gcc/notes/mktemp.txt b/gcc/notes/mktemp.txt new file mode 100644 index 0000000..27eb533 --- /dev/null +++ b/gcc/notes/mktemp.txt @@ -0,0 +1,24 @@ +mktemp is a peculiar phenomenon in the linux world. +Well, I'm sure things like this happen more often, but, + +Turns out, there once was an mktemp.c written for OpenBSD. +Distributions started including it, writing their own version, the usual. +Apparently, popularity of this tool became big enough, and incompatibilities +between versions arose significantly, that it was split off into its own +package and website, https://www.mktemp.org, around 2000. Written by Todd C. +Miller, the author of sudo! +This version was included in Debian under the package name "debianutils", with +the last known version being debianutils-2.8.4, where it was split into its +own "mktemp" package, both reflecting the state of version 1.5. + +https://lists.gnu.org/archive/html/bug-coreutils/2007-10/msg00051.html +In 2007, GNU coreutils adds its own, slightly incompatible version of mktemp +with coreutils version 6.10. +I can only assume most linux distributions switched to it, because come 2008, +mktemp-1.6 releases, featuring GNU compatibility. +Debian switches to coreutils inmediately, while Slackware keeps it for another +decade, citing the incompatibilities, and installing the GNU version as +mktemp-gnu, only reverting this decision in 2018. + +I could've sworn one of my scripts ran into the differences between mktemp-1.5 +and GNU mktemp, but I can't figure out what it was, and check for it, now. diff --git a/gcc/notes/scrapped.sh b/gcc/notes/scrapped.sh new file mode 100644 index 0000000..9a6da16 --- /dev/null +++ b/gcc/notes/scrapped.sh @@ -0,0 +1,98 @@ +# Contains a bunch of scrapped build procedures, for different purposes, +# so the research may be reused at a later date... + +# tar (1.13), not in guix: +# Builds and works correctly, but has the same bug with extracting gcc-4.6 +# as tar-1.12 does, and that one doesn't require patches... +rm -rf tar-1.13 +gzip -cd tar-1.13.tar.gz | tar x +( cd tar-1.13 + sed -e 's/if (case_sensitive$/if (1/' \ + lib/argmatch.c > /tmp/sed; mv /tmp/sed lib/argmatch.c + + CC=tcc ./configure --host=i686-pc-linux-gnu --disable-nls + + echo '#define __MES_MODE_T' >> config.h + echo '#define S_ISLNK(Mode) (((Mode) & S_IFMT) == S_IFLNK)' >> config.h + + make AR='tcc -ar' + install -Dm755 src/tar /bin/tar +) +rm -rf tar-1.13 + +# tar (1.14), not in guix: +# If this can be got to work, the build of tar-1.22 with gcc2 can be dropped. +# Builds, but extracting anything fails... +rm -rf tar-1.14 +bzip2 -cd tar-1.14.tar.bz2 | tar x +( cd tar-1.14 + # asctime doesn't exist in mes-libc and isn't used anyway... + sed -e 's/asctime (tm)/NULL/' \ + lib/time_r.c > /tmp/sed; mv /tmp/sed lib/time_r.c + + # mode_t and friends are in sys/stat.h... + sed -e 's@@@' \ + lib/modechange.h > /tmp/sed; mv /tmp/sed lib/modechange.h + + # rewrite src/xheader.c:xheader_set_option to not use strtok: + # char *token = string; + # for (;;) + # { + # char *t = strchr (token, ','); + # if (t) *t = '\0'; + # + # char *p = strchr (token, '='); + # if (!p) + # xheader_set_single_keyword (token); + # else + # xheader_set_keyword_equal (token, p); + # + # if (!t) break; + # token = t + 1; + # } + + CC=tcc LD=tcc ./configure --disable-nls + + # Add linux kernel defines that are missing from mes-libc + echo '#define MB_LEN_MAX 16' >> config.h + echo '#define CLOCK_REALTIME 0' >> config.h + echo '#define EPERM 1' >> config.h + + make AR='tcc -ar' + install -Dm755 src/tar /bin/tar +) +rm -rf tar-1.14 + +# Options for a "minimal" bash-2.05b build +# Left out because even though it holds up just fine, no patches can be avoided +# with the minimal config. +# It might however be interesting to use a minimal config as a bootstrap bin? + CC='tcc -D_POSIX_VERSION=1' AR='tcc -ar' ./configure \ + --build=i686-pc-linux-gnu \ + --without-bash-malloc \ + --enable-minimal-config \ + --enable-cond-command \ + --enable-dparen-arithmetic \ + --enable-arith-for-command \ + --enable-alias \ + --disable-nls \ + bash_cv_getcwd_calls_popen=no \ + bash_cv_signal_vintage=posix \ + ac_cv_func_working_mktime=yes + +# gcc-4.6.4 build for build_binaries.sh + mkdir build; cd build # Build breaks without a build directory + CFLAGS='-O2 -w' CXXFLAGS='-O2 -w' MAKEINFO=true ../configure \ + --target=i686-bootstrap-linux-gnu \ + --prefix="$prefix" \ + --with-sysroot="$prefix" \ + --with-local-prefix=/ \ + --with-newlib \ + --without-headers \ + --disable-shared \ + --disable-decimal-float \ + --disable-threads \ + --disable-nls \ + --enable-languages=c + make all-gcc all-target-libgcc + make install-gcc install-target-libgcc diff --git a/gcc/sources.sha1 b/gcc/sources.sha1 new file mode 100644 index 0000000..045c59a --- /dev/null +++ b/gcc/sources.sha1 @@ -0,0 +1,39 @@ +b3e158877f94e66ec1c8ef604e994851ee388b09 bash-2.05b.tar.gz +8de012df1e4f3e91f571c3eb8ec45b43d7c747eb bash-4.4.tar.gz +66b4f057bf687126d7cc11d0a68ed89182541ae7 binutils-2.14.tar.bz2 +3f0e3746a15f806a95dd079be2a7f43c17b18818 binutils-2.20.1a.tar.bz2 +d5514f5cf8eb89a3b20ac3b965f4463f14a5709a busybox-1.31.1.tar.bz2 +bf7badf7e248e0ecf465d33c2f5aeec774209227 bzip2-1.0.8.tar.gz +ce67aacedfc917a92b5be62dd32095393c2f220c coreutils-5.0.tar.bz2 +1638f4ee4a7bd269411c57874f9e761ddee6d5ae diffutils-2.7.tar.gz +f18e8aaee3f3d4173a1f598001003be8706d28b0 findutils-4.6.0.tar.gz +b9120c49429c309529a0af96203cec45a65790de gawk-3.0.0.tar.gz +da1091cc39089c320f53d21fd2112bd7ce407de5 gawk-3.1.8.tar.bz2 +5bb0b783a57a62b11f1f9bd2aa37145da221d3d0 gcc-4.9.4.tar.bz2 +b3e26d73b88c9606779a5ca277e3468e5ab163a1 gcc-boot-2.95.3.patch +705f2e5f854e12e56ac2f8351c36385a4426127e gcc-core-2.95.3.tar.gz +9b2f25ac248d81c97bbe46690dc2c350e51996a5 gcc-core-4.6.4.tar.bz2 +e9a47df1bc5e39a9ef995484c315f5d47114daeb gcc-g++-4.6.4.tar.bz2 +3bebc5a3120eafde2144ced6ee151e6c4934c781 glibc-2.16.0.tar.bz2 +a2254adbc3486d24b56571cb464f77657579f6f1 glibc-2.2.5.tar.gz +ae3fb503e081f01d31eca5ebca8f2a1071f98414 glibc-boot-2.16.0.patch +594fccd05081469bacf73fcdfa8e0ec49fb1f7d3 glibc-boot-2.2.5.patch +c011e8feaf1bb89158bd55eaabd7ef8fdd101a2c gmp-4.3.2.tar.bz2 +99e8f917557f1496cd3786e6c13f3900b8de24d8 grep-2.0.tar.gz +ca6794f49f3d838dab8add5d7895e90bd2479542 gzip-1.2.4.tar.gz +1631a93d870d11efc7ecaa1450c39ad0a7ad7408 linux-4.14.tar.gz +d2085842f08e57d58d3e1cd75a5f0342a60e5f45 make-3.80.tar.bz2 +b8a8a99e4cb636a213aad3816dda827a92b9bbed make-3.82.tar.bz2 +a318150059a2bcff6b58e765e203c05d0dfaccee mes-0.22.tar.gz +0d816fc6f2fea4e50f3ec75c644a6bd222294481 mescc-tools-Release_1.0.1.tar.gz +b8be66396c726fdc36ebb0f692ed8a8cca3bcc66 mpc-1.0.3.tar.gz +7ca93006e38ae6e53a995af836173cf10ee7c18c mpfr-2.4.2.tar.bz2 +031062cf1a3c3e81e3dbae5ad2edbeff02ca198f musl-1.2.1.tar.gz +1b513b0615d6d273e0f1ec83e57f71e137c22d03 nyacc-0.99.3.tar.gz +9a69f7191576549255f046487da420989d2834a6 patch-2.5.9.tar.gz +d37e775c2b72864e8c27b8bedcbf6dddf81598af sed-1.18.tar.gz +3a841f31e3ed38c684c2ca9249ae42e1e7bdd438 sed-4.0.6.tar.gz +a426b8551a4b61289a1bb6d677ada162f8bbc51a tar-1.12.tar.gz +ca99a6ade7308f9293bdb04048cb335e52c63215 tar-1.22.tar.bz2 +cfe72731b87047a0085e8a4b3487e208ea488224 tcc-0.9.26-1103-g6e62e0e.tar.gz +3bab3acd404ea92ba18e0c261d9d8cb2f366a8a5 tcc-0.9.27.tar.bz2 diff --git a/gcc/sources.wget-list b/gcc/sources.wget-list new file mode 100644 index 0000000..b9de214 --- /dev/null +++ b/gcc/sources.wget-list @@ -0,0 +1,39 @@ +https://ftp.gnu.org/gnu/bash/bash-2.05b.tar.gz +https://ftp.gnu.org/gnu/bash/bash-4.4.tar.gz +https://ftp.gnu.org/gnu/binutils/binutils-2.14.tar.bz2 +https://ftp.gnu.org/gnu/binutils/binutils-2.20.1a.tar.bz2 +https://ftp.gnu.org/gnu/coreutils/coreutils-5.0.tar.bz2 +https://ftp.gnu.org/gnu/diffutils/diffutils-2.7.tar.gz +https://ftp.gnu.org/gnu/findutils/findutils-4.6.0.tar.gz +https://ftp.gnu.org/gnu/gawk/gawk-3.0.0.tar.gz +https://ftp.gnu.org/gnu/gawk/gawk-3.1.8.tar.bz2 +https://ftp.gnu.org/gnu/gcc/gcc-2.95.3/gcc-core-2.95.3.tar.gz +https://ftp.gnu.org/gnu/gcc/gcc-4.6.4/gcc-core-4.6.4.tar.bz2 +https://ftp.gnu.org/gnu/gcc/gcc-4.6.4/gcc-g++-4.6.4.tar.bz2 +https://ftp.gnu.org/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.bz2 +https://ftp.gnu.org/gnu/glibc/glibc-2.16.0.tar.bz2 +https://ftp.gnu.org/gnu/glibc/glibc-2.2.5.tar.gz +https://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.bz2 +https://ftp.gnu.org/gnu/grep/grep-2.0.tar.gz +https://ftp.gnu.org/gnu/gzip/gzip-1.2.4.tar.gz +https://ftp.gnu.org/gnu/make/make-3.80.tar.bz2 +https://ftp.gnu.org/gnu/make/make-3.82.tar.bz2 +https://ftp.gnu.org/gnu/mes/mes-0.22.tar.gz +https://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz +https://ftp.gnu.org/gnu/mpfr/mpfr-2.4.2.tar.bz2 +https://ftp.gnu.org/gnu/patch/patch-2.5.9.tar.gz +https://ftp.gnu.org/gnu/sed/sed-1.18.tar.gz +https://ftp.gnu.org/gnu/sed/sed-4.0.6.tar.gz +https://ftp.gnu.org/gnu/tar/tar-1.12.tar.gz +https://ftp.gnu.org/gnu/tar/tar-1.22.tar.bz2 +https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz +http://lilypond.org/janneke/mes/20191117/tcc-0.9.26-1103-g6e62e0e.tar.gz +https://download.savannah.gnu.org/releases/tinycc/tcc-0.9.27.tar.bz2 +https://download.savannah.gnu.org/releases/nyacc/nyacc-0.99.3.tar.gz +https://github.com/oriansj/mescc-tools/archive/Release_1.0.1/mescc-tools-Release_1.0.1.tar.gz +https://busybox.net/downloads/busybox-1.31.1.tar.bz2 +https://musl.libc.org/releases/musl-1.2.1.tar.gz +https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.tar.gz +https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/patches/gcc-boot-2.95.3.patch?id=0b652851b187dd0451c221f6dc173afbd7a555f4 +https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/patches/glibc-boot-2.2.5.patch?id=0b652851b187dd0451c221f6dc173afbd7a555f4 +https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/patches/glibc-boot-2.16.0.patch?id=0b652851b187dd0451c221f6dc173afbd7a555f4