logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://hacktivis.me/git/bootstrap-initrd.git
commit: d1212bd5acc25f4f492c0e1669f2432891e1789b
parent 483b5b4d2712315f34ae00614e8031eef9cfb452
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 16 May 2024 16:03:16 +0200

bootstrap-iproute2.sh: TCC actually has static_assert

Diffstat:

Mbootstrap-iproute2.sh13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/bootstrap-iproute2.sh b/bootstrap-iproute2.sh @@ -15,11 +15,14 @@ cd ./iproute2-*/ ./configure --prefix /usr # tc(1) requires flex (or at least a lex with -o) -sed -e '/SUBDIRS=/s;tc ;;' Makefile > Makefile.new -mv Makefile.new Makefile -# tcc doesn't seems to support static_assert -sed -e '/static_assert/,/^$/s;^;//;' ip/ipstats.c > ip/ipstats.c.new -mv ip/ipstats.c.new ip/ipstats.c +# -maxdepth 1 is unsupported by both sbase and heirloom find(1) +printf '%s\n' \ + '/SUBDIRS=/s;tc ;;' \ + '/iproute2 -maxdepth 1/s;install;\# install;' \ + w q | ed Makefile + +# Requires static_assert which is guarded behind C11 +export CFLAGS="${CFLAGS} -std=c11" unset MAKE make clean