mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-09 21:05:24 +01:00
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:
parent
0907cfd073
commit
6ed2e09f3a
546 changed files with 700 additions and 1299 deletions
107
steps/binutils-2.30/pass1.sh
Executable file
107
steps/binutils-2.30/pass1.sh
Executable file
|
|
@ -0,0 +1,107 @@
|
|||
# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
||||
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
|
||||
# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Remove unused generated files
|
||||
rm etc/Makefile.in etc/configure
|
||||
|
||||
# Regenerate files
|
||||
for dir in bfd binutils gas gprof intl ld libiberty opcodes zlib; do
|
||||
(
|
||||
cd $dir
|
||||
AUTOPOINT=true ACLOCAL=aclocal-1.11 AUTOMAKE=automake-1.11 autoreconf-2.64 -fi
|
||||
)
|
||||
done
|
||||
|
||||
ACLOCAL=aclocal-1.11 autoreconf-2.64 -fi
|
||||
|
||||
# Rebuild bison files
|
||||
touch -- */*.y
|
||||
rm binutils/arparse.c binutils/arparse.h
|
||||
rm binutils/defparse.c binutils/defparse.h
|
||||
rm binutils/mcparse.c binutils/mcparse.h
|
||||
rm binutils/rcparse.c binutils/rcparse.h
|
||||
rm binutils/sysinfo.c binutils/sysinfo.h
|
||||
rm gas/bfin-parse.c gas/bfin-parse.h
|
||||
rm gas/m68k-parse.c gas/rl78-parse.c
|
||||
rm gas/rl78-parse.h gas/rx-parse.c
|
||||
rm gas/rx-parse.h gas/itbl-parse.c
|
||||
rm gas/itbl-parse.h gold/yyscript.c
|
||||
rm gold/yyscript.h intl/plural.c
|
||||
rm ld/deffilep.c ld/deffilep.h
|
||||
rm ld/ldgram.c ld/ldgram.h
|
||||
|
||||
# Rebuild flex generated files
|
||||
touch -- */*.l */*/*.l
|
||||
rm binutils/arlex.c binutils/deflex.c binutils/syslex.c
|
||||
rm gas/bfin-lex.c gas/itbl-lex.c
|
||||
rm ld/ldlex.c
|
||||
|
||||
# Remove prebuilt texinfo files
|
||||
rm bfd/doc/bfd.info binutils/doc/binutils.info
|
||||
rm gas/doc/as.info gprof/gprof.info ld/ld.info
|
||||
|
||||
# Remove pregenerated opcodes files
|
||||
rm opcodes/i386-init.h opcodes/i386-tbl.h
|
||||
rm opcodes/ia64-asmtab.c
|
||||
rm opcodes/z8k-opc.h
|
||||
rm opcodes/aarch64-asm-2.c opcodes/aarch64-opc-2.c opcodes/aarch64-dis-2.c
|
||||
rm $(grep -l 'MACHINE GENERATED' opcodes/*.c opcodes/*.h)
|
||||
|
||||
# Regenerate MeP sections
|
||||
./bfd/mep-relocs.pl
|
||||
|
||||
# Manpages
|
||||
rm */*.1 */*/*.1 */*/*.man
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
for dir in intl libiberty opcodes bfd binutils gas gprof ld zlib; do
|
||||
(
|
||||
cd $dir
|
||||
|
||||
LD="true" AR="tcc -ar" CC="tcc" ./configure \
|
||||
--disable-nls \
|
||||
--enable-deterministic-archives \
|
||||
--enable-64-bit-bfd \
|
||||
--build=i386-unknown-linux-gnu \
|
||||
--host=i386-unknown-linux-gnu \
|
||||
--target=i386-unknown-linux-gnu \
|
||||
--program-prefix="" \
|
||||
--prefix="${PREFIX}" \
|
||||
--libdir="${LIBDIR}" \
|
||||
--with-sysroot= \
|
||||
--srcdir=. \
|
||||
--enable-compressed-debug-sections=all \
|
||||
lt_cv_sys_max_cmd_len=32768
|
||||
)
|
||||
done
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
make -C bfd headers
|
||||
for dir in libiberty zlib bfd opcodes binutils gas gprof ld; do
|
||||
make "${MAKEJOBS}" -C $dir tooldir=${PREFIX} CPPFLAGS="-DPLUGIN_LITTLE_ENDIAN" MAKEINFO=true
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for dir in libiberty zlib bfd opcodes binutils gas gprof ld; do
|
||||
make -C $dir tooldir=${PREFIX} DESTDIR="${DESTDIR}" install MAKEINFO=true
|
||||
done
|
||||
|
||||
# Create triplet symlinks
|
||||
(
|
||||
cd "${DESTDIR}${PREFIX}/bin"
|
||||
for f in *; do
|
||||
ln -s "${PREFIX}/bin/${f}" "i386-unknown-linux-musl-${f}"
|
||||
done
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Add missing AC_CONFIG_MACRO_DIR.
|
||||
|
||||
Required by autoreconf to create aclocal.m4 correctly.
|
||||
|
||||
--- /libiberty/configure.ac 2022-01-22 14:14:09.000000000 +0200
|
||||
+++ libiberty/configure.ac 2022-09-04 00:01:02.941738129 +0300
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([xmalloc.c])
|
||||
+AC_CONFIG_MACRO_DIR(../config)
|
||||
|
||||
# This works around the fact that libtool configuration may change LD
|
||||
# for this particular configuration, but some shells, instead of
|
||||
17
steps/binutils-2.30/patches/new-gettext.patch
Normal file
17
steps/binutils-2.30/patches/new-gettext.patch
Normal 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:57:56.350832016 +1100
|
||||
+++ intl/configure.ac 2023-02-07 18:58:07.310054484 +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.])
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Ensure i386-init.h dependencies are satisfied.
|
||||
|
||||
--- opcodes/Makefile.am 2022-01-22 14:14:09.000000000 +0200
|
||||
+++ opcodes/Makefile.am 2022-09-13 21:09:04.353324699 +0300
|
||||
@@ -575,7 +575,7 @@ i386-gen.o: i386-gen.c i386-opc.h $(srcd
|
||||
$(srcdir)/i386-tbl.h: $(srcdir)/i386-init.h
|
||||
@echo $@
|
||||
|
||||
-$(srcdir)/i386-init.h: @MAINT@ i386-gen$(EXEEXT_FOR_BUILD) i386-opc.tbl i386-reg.tbl
|
||||
+$(srcdir)/i386-init.h: i386-gen$(EXEEXT_FOR_BUILD) i386-opc.tbl i386-reg.tbl
|
||||
./i386-gen$(EXEEXT_FOR_BUILD) --srcdir $(srcdir)
|
||||
|
||||
i386-opc.lo: $(srcdir)/i386-tbl.h
|
||||
1
steps/binutils-2.30/sources
Normal file
1
steps/binutils-2.30/sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
https://mirrors.kernel.org/gnu/binutils/binutils-2.30.tar.bz2 efeade848067e9a03f1918b1da0d37aaffa0b0127a06b5e9236229851d9d0c09
|
||||
Loading…
Add table
Add a link
Reference in a new issue