mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-02 01:18:08 +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
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue