Remove the notion of "sys*"

- This idea originates from very early in the project and was, at the
  time, a very easy way to categorise things.
- Now, it doesn't really make much sense - it is fairly arbitary, often
  occuring when there is a change in kernel, but not from builder-hex0
  to fiwix, and sysb is in reality completely unnecessary.
- In short, the sys* stuff is a bit of a mess that makes the project
  more difficult to understand.
- This puts everything down into one folder and has a manifest file that
  is used to generate the build scripts on the fly rather than using
  coded scripts.
- This is created in the "seed" stage.

stage0-posix -- (calls) --> seed -- (generates) --> main steps

Alongside this change there are a variety of other smaller fixups to the
general structure of the live-bootstrap rootfs.

- Creating a rootfs has become much simpler and is defined as code in
  go.sh. The new structure, for an about-to-be booted system, is

/
-- /steps (direct copy of steps/)
-- /distfiles (direct copy of distfiles/)
-- all files from seed/*
-- all files from seed/stage0-posix/*

- There is no longer such a thing as /usr/include/musl, this didn't
  really make any sense, as musl is the final libc used. Rather, to
  separate musl and mes, we have /usr/include/mes, which is much easier
  to work with.
- This also makes mes easier to blow away later.
- A few things that weren't properly in packages have been changed;
  checksum-transcriber, simple-patch, kexec-fiwix have all been given
  fully qualified package names.
- Highly breaking change, scripts now exist in their package directory
  but NOT WITH THE packagename.sh. Rather, they use pass1.sh, pass2.sh,
  etc. This avoids manual definition of passes.
  - Ditto with patches; default directory is patches, but then any patch
    series specific to a pass are named patches-passX.
This commit is contained in:
fosslinux 2023-11-07 10:51:23 +11:00
parent 0907cfd073
commit 6ed2e09f3a
546 changed files with 700 additions and 1299 deletions

99
steps/gcc-13.1.0/pass1.sh Executable file
View file

@ -0,0 +1,99 @@
# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
default
# Remove vendored zlib
rm -r zlib/
# Regen gperf file (because GCC's make rules suck)
rm gcc/cp/cfns.h
# (taken directly from gcc/cp/Make-lang.in)
gperf -o -C -E -k '1-6,$' -j1 -D -N 'libc_name_p' -L C++ \
gcc/cp/cfns.gperf --output-file gcc/cp/cfns.h
# Regenerate autogen stuff
autogen Makefile.def
pushd fixincludes
./genfixes
popd
# Regenerate autotools
# configure
find . -name configure | sed 's:/configure::' | while read d; do
pushd "${d}"
AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fiv
popd
done
# Because GCC is stupid, copy depcomp back in
cp "${PREFIX}/share/automake-1.15/depcomp" .
# Makefile.in only
local BACK="${PWD}"
find . -type d \
-exec test -e "{}/Makefile.am" -a ! -e "{}/configure" \; \
-print | while read d; do
d="$(readlink -f "${d}")"
cd "${d}"
# Find the appropriate configure script for automake
while [ ! -e configure ]; do
cd ..
done
automake-1.15 -fai "${d}/Makefile"
cd "${BACK}"
done
# Remove bison generated files
rm intl/plural.c
# Remove flex generated files
rm gcc/gengtype-lex.cc
# Remove unused generated files
rm -r libgfortran/generated
# intl/ Makefile is a bit broken because of new gettext
sed -i 's/@USE_INCLUDED_LIBINTL@/no/' intl/Makefile.in
# Regenerate crc table in libiberty/crc32.c
pushd libiberty
sed -n -e '38,65p' crc32.c > crcgen.c
gcc -o crcgen crcgen.c
head -n 69 crc32.c > crc32.c.new
./crcgen >> crc32.c.new
tail -n +138 crc32.c >> crc32.c.new
mv crc32.c.new crc32.c
popd
# Remove docs/translation
find . -name "*.gmo" -delete
find . -name "*.info" -delete
}
src_configure() {
mkdir build
cd build
LDFLAGS="-static" \
../configure \
--prefix="${PREFIX}" \
--libdir="${LIBDIR}" \
--build=i386-unknown-linux-musl \
--target=i386-unknown-linux-musl \
--host=i386-unknown-linux-musl \
--enable-bootstrap \
--enable-static \
--disable-plugins \
--disable-libssp \
--disable-libsanitizer \
--program-transform-name= \
--enable-languages=c,c++ \
--with-system-zlib \
--disable-multilib \
--enable-threads=posix
}
src_compile() {
make "${MAKEJOBS}" BOOT_LDFLAGS="-static"
}

View file

@ -0,0 +1,17 @@
SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: GPL-3.0-or-later
In new gettext external is required for AM_GNU_GETTEXT.
--- intl/configure.ac 2023-02-07 18:43:58.989786230 +1100
+++ intl/configure.ac 2023-02-07 18:43:02.182632631 +1100
@@ -4,7 +4,7 @@
AC_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR(../config)
AM_GNU_GETTEXT_VERSION(0.12.1)
-AM_GNU_GETTEXT([], [need-ngettext])
+AM_GNU_GETTEXT([external], [need-ngettext])
# This replaces the extensive use of DEFS in the original Makefile.in.
AC_DEFINE(IN_LIBINTL, 1, [Define because this is libintl.])

1
steps/gcc-13.1.0/sources Normal file
View file

@ -0,0 +1 @@
https://ftp.gnu.org/gnu/gcc/gcc-13.1.0/gcc-13.1.0.tar.xz 61d684f0aa5e76ac6585ad8898a2427aade8979ed5e7f85492286c4dfc13ee86