diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..21b72b2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "contrib/MLFS-S6-Bootscripts"] + path = contrib/MLFS-S6-Bootscripts + url = https://github.com/dslm4515/MLFS-S6-Bootscripts diff --git a/build-scripts/000-autobuild.config b/build-scripts/000-autobuild.config deleted file mode 100644 index 82d4bb3..0000000 --- a/build-scripts/000-autobuild.config +++ /dev/null @@ -1,14 +0,0 @@ -#! /bin/bash -# Setup environmental variables for auto-building system -# Build scripts expect this script to be in $MLFS/sources/scripts - -if [ "$2" != "" ]; then - export MJ="-j$2" -else - export MJ="" -fi - -echo "Unpacking $1 ..." && -tar xf $1 - - diff --git a/build-scripts/001-CT-BUILD b/build-scripts/001-CT-BUILD deleted file mode 100644 index 7a38e60..0000000 --- a/build-scripts/001-CT-BUILD +++ /dev/null @@ -1,18 +0,0 @@ -#! /bin/bash -# Run script in $MLFS/sources -# Syntax 001-CT_BUILD - - -SRCPKG="$( ls linux-* )" && -sh scripts/CT-00-headers $SRCPKG $1 && -SRCPKG="$( ls binutils-* )" && -sh scripts/CT-01-binutils $SRCPKG $1 && -SRCPKG="$( ls gcc-* )" && -sh scripts/CT-02-gcc-static $SRCPKG $1 && -SRCPKG="$( ls musl-* )" && -sh scripts/CT-03-musl $SRCPKG $1 && -SRCPKG="$( ls gcc-* )" && -sh scripts/CT-04-gcc-final $SRCPKG $1 && -SRCPKG="$( ls file-* )" && -sh scripts/CT-05-file $SRCPKG $1 - diff --git a/build-scripts/002-TC-BUILD b/build-scripts/002-TC-BUILD deleted file mode 100644 index d138ccf..0000000 --- a/build-scripts/002-TC-BUILD +++ /dev/null @@ -1,15 +0,0 @@ -#! /bin/bash -# Run script in $MLFS/sources -# Syntax 002-TC_BUILD - -SRCPKG="$( ls musl-* )" && -sh scripts/TC-00-musl $SRCPKG $1 && -sh scripts/TC-01-adjust && -SRCPKG="$( ls binutils-* )" && -sh scripts/TC-02-binutils $SRCPKG $1 && -SRCPKG="$( ls gcc-* )" && -sh scripts/TC-03-gcc $SRCPKG $1 && -SRCPKG="$( ls linux-* )" && -sh scripts/TC-04-headers $SRCPKG $1 && -SRCPKG="$( ls gcc-* )" && -sh scripts/TC-05-libstcxx $SRCPKG $1 diff --git a/build-scripts/CT-00-headers b/build-scripts/CT-00-headers deleted file mode 100644 index 4c07ec1..0000000 --- a/build-scripts/CT-00-headers +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/bash -# syntax *.build - -source $MLFS/sources/scripts/000-autobuild.config && - -#export PACKAGE=$(echo "$1" | cut -d "." -f -3 ) && -export PACKAGE=$(echo "$1" | sed -n '/\.tar\.xz$/s///p' ) -cd $PACKAGE && -############################################################ -echo "[ CT 1/6 - $PACKAGE ] Clean source..." |& tee -a ~/build.log && -make mrproper $MJ - -echo "[ CT 1/6 - $PACKAGE ] Extract headers.." |& tee -a ~/build.log && -make ARCH=${MLFS_ARCH} headers_check $MJ && -make ARCH=${MLFS_ARCH} headers $MJ && - -echo "[ CT 1/6 - $PACKAGE ] Install headers.." |& tee -a ~/build.log && -mkdir -pv /cross-tools/${MLFS_TARGET}/include && -cp -rv usr/include/* /cross-tools/${MLFS_TARGET}/include && -rm -v /cross-tools/${MLFS_TARGET}/include/Makefile && -cd .. && rm -rf $PACKAGE - diff --git a/build-scripts/CT-01-binutils b/build-scripts/CT-01-binutils deleted file mode 100644 index 763341b..0000000 --- a/build-scripts/CT-01-binutils +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/bash -# syntax *.build - -source $MLFS/sources/scripts/000-autobuild.config && - -export PACKAGE=$(echo "$1" | sed -n '/\.tar\.xz$/s///p' ) -cd $PACKAGE && -############################################################ -echo "[ CT 2/6 - $PACKAGE ] Configure source..." |& tee -a ~/build.log && -mkdir -v build && cd build -../configure \ - --prefix=/cross-tools \ - --target=${MLFS_TARGET} \ - --with-sysroot=/cross-tools/${MLFS_TARGET} \ - --disable-nls \ - --disable-multilib \ - --disable-werror \ - --enable-deterministic-archives \ - --disable-compressed-debug-sections && - -echo "[ CT 2/6 - $PACKAGE ] Compile.." |& tee -a ~/build.log && - make $MJ && - -echo "[ CT 2/6 - $PACKAGE ] Install ..." |& tee -a ~/build.log && -make install && -cd ../.. && rm -rf $PACKAGE - diff --git a/build-scripts/CT-02-gcc-static b/build-scripts/CT-02-gcc-static deleted file mode 100644 index 00ad149..0000000 --- a/build-scripts/CT-02-gcc-static +++ /dev/null @@ -1,41 +0,0 @@ -#! /bin/bash -# syntax *.build - -source $MLFS/sources/scripts/000-autobuild.config && - -export PACKAGE=$(echo "$1" | sed -n '/\.tar\.xz$/s///p' ) -cd $PACKAGE && -############################################################ -echo "[ CT 3/6 - $PACKAGE Static ] Adding auxillary sources ..." |& tee -a ~/build.log && -tar -xf ../mpfr-* -mv $( echo "$(ls ../mpfr-*)" | sed -n '/\.tar\.xz$/s///p' | cut -d "/" -f 2 ) mpfr -tar -xf ../gmp-* -mv $( echo "$(ls ../gmp-*)" | sed -n '/\.tar\.xz$/s///p' | cut -d "/" -f 2 ) gmp -tar -xf ../mpc-* && -mv $( echo "$(ls ../mpc-*)" | sed -n '/\.tar\.gz$/s///p' | cut -d "/" -f 2 ) mpc - -echo "[ CT 3/6 - $PACKAGE Static ] Configure source..." |& tee -a ~/build.log && -mkdir -v build && cd build && -CFLAGS='-g0 -O0' \ -CXXFLAGS='-g0 -O0' \ -../configure \ - --prefix=/cross-tools --build=${MLFS_HOST} \ - --host=${MLFS_HOST} --target=${MLFS_TARGET} \ - --with-sysroot=/cross-tools/${MLFS_TARGET} \ - --disable-nls --with-newlib \ - --disable-libitm --disable-libvtv \ - --disable-libssp --disable-shared \ - --disable-libgomp --without-headers \ - --disable-threads --disable-multilib \ - --disable-libatomic --disable-libstdcxx \ - --enable-languages=c --disable-libquadmath \ - --disable-libsanitizer --with-arch=${MLFS_CPU} \ - --disable-decimal-float --enable-clocale=generic && - -echo "[ CT 3/6 - $PACKAGE Static ] Compile.." |& tee -a ~/build.log && -make all-gcc all-target-libgcc $MJ && - -echo "[ CT 3/6 - $PACKAGE Static ] Install ..." |& tee -a ~/build.log && -make install-gcc install-target-libgcc && -cd ../.. && rm -rf $PACKAGE - diff --git a/build-scripts/CT-03-musl b/build-scripts/CT-03-musl deleted file mode 100644 index 65970cc..0000000 --- a/build-scripts/CT-03-musl +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/bash -# syntax *.build - -source $MLFS/sources/scripts/000-autobuild.config && - -export PACKAGE=$(echo "$1" | sed -n '/\.tar\.gz$/s///p' ) -cd $PACKAGE && -############################################################ -echo "[ CT 4/6 - $PACKAGE ] Configure source..." |& tee -a ~/build.log && -./configure \ - CROSS_COMPILE=${MLFS_TARGET}- \ - --prefix=/ \ - --target=${MLFS_TARGET} && - -echo "[ CT 4/6 - $PACKAGE ] Compile.." |& tee -a ~/build.log && -make $MJ && - -echo "[ CT 4/6 - $PACKAGE ] Install ..." |& tee -a ~/build.log && -DESTDIR=/cross-tools make install && -mkdir -pv /cross-tools/usr && -ln -sv ../include /cross-tools/usr/include && -case $(uname -m) in - x86_64) export ARCH="x86_64" - ;; - i686) export ARCH="i386" - ;; - arm*) export ARCH="arm" - ;; - aarch64) export ARCH="aarch64" - ;; -esac && - -ln -sv ../lib/ld-musl-$ARCH.so.1 /cross-tools/bin/ldd && -mkdir -v /cross-tools/etc && -touch /cross-tools/etc/ld-musl-$ARCH.path && -echo "/cross-tools/lib" >> /cross-tools/etc/ld-musl-$ARCH.path && -echo "/tools/lib" >> /cross-tools/etc/ld-musl-$ARCH.path && -unset ARCH && -cd .. && rm -rf $PACKAGE - diff --git a/build-scripts/CT-04-gcc-final b/build-scripts/CT-04-gcc-final deleted file mode 100644 index febb11f..0000000 --- a/build-scripts/CT-04-gcc-final +++ /dev/null @@ -1,60 +0,0 @@ -#! /bin/bash -# syntax *.build - -source $MLFS/sources/scripts/000-autobuild.config && - -export PACKAGE=$(echo "$1" | sed -n '/\.tar\.xz$/s///p' ) -cd $PACKAGE && -############################################################ -echo "[ CT 5/6 - $PACKAGE Final ] Adding auxillary sources ..." |& tee -a ~/build.log && -tar -xf ../mpfr-* && -mv $( echo "$(ls ../mpfr-*)" | sed -n '/\.tar\.xz$/s///p' | cut -d "/" -f 2 ) mpfr && -tar -xf ../gmp-* && -mv $( echo "$(ls ../gmp-*)" | sed -n '/\.tar\.xz$/s///p' | cut -d "/" -f 2 ) gmp && -tar -xf ../mpc-* && -mv $( echo "$(ls ../mpc-*)" | sed -n '/\.tar\.gz$/s///p' | cut -d "/" -f 2 ) mpc && - -echo "[ CT 5/6 - $PACKAGE Final ] Patching source..." |& tee -a ~/build.log && -patch -Np0 -i ../patches/gcc-9.1.0-void/ada-shared.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/fix-cxxflags-passing.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/fix-musl-execinfo.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/libgcc-musl-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/musl-ada.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/no-stack_chk_fail_local.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/non-nullness.patch -case $(uname -m) in - x86_64) - sed -e '/m64=/s/lib64/lib/' \ - -i.orig gcc/config/i386/t-linux64 - ;; -esac && -echo "[ CT 5/6 - $PACKAGE Final ] Configure source..." |& tee -a ~/build.log && -mkdir -v build && cd build && -AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \ -../configure \ - --prefix=/cross-tools \ - --build=${MLFS_HOST} \ - --host=${MLFS_HOST} \ - --target=${MLFS_TARGET} \ - --disable-multilib \ - --with-sysroot=/cross-tools \ - --disable-nls \ - --enable-shared \ - --enable-languages=c,c++ \ - --enable-threads=posix \ - --enable-clocale=generic \ - --enable-libstdcxx-time \ - --enable-fully-dynamic-string \ - --disable-symvers \ - --disable-libsanitizer \ - --disable-lto-plugin \ - --disable-libssp && - -echo "[ CT 5/6 - $PACKAGE Final ] Compile.." |& tee -a ~/build.log && -make AS_FOR_TARGET="${MLFS_TARGET}-as" \ - LD_FOR_TARGET="${MLFS_TARGET}-ld" $MJ && - -echo "[ CT 5/6 - $PACKAGE Final ] Install ..." |& tee -a ~/build.log && -make install && -cd ../.. && rm -rf $PACKAGE - diff --git a/build-scripts/CT-05-file b/build-scripts/CT-05-file deleted file mode 100644 index 6e63688..0000000 --- a/build-scripts/CT-05-file +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/bash -# syntax *.build - -source $MLFS/sources/scripts/000-autobuild.config && - -export PACKAGE=$(echo "$1" | sed -n '/\.tar\.gz$/s///p' ) -cd $PACKAGE && -############################################################ -echo "[ CT 6/6 - $PACKAGE ] Configure source..." |& tee -a ~/build.log && -./configure --prefix=/cross-tools \ - --disable-libseccomp && - -echo "[ CT 6/6 - $PACKAGE ] Compile.." |& tee -a ~/build.log && -make $MJ && - -echo "[ CT 6/6 - $PACKAGE ] Install ..." |& tee -a ~/build.log && -make install && -cd .. && rm -rf $PACKAGE - diff --git a/build-scripts/README.md b/build-scripts/README.md deleted file mode 100644 index b8bc042..0000000 --- a/build-scripts/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Musl-LFS Automated Build Script - -As a means of convenience, these buld scripts will automate building the cross tools for x86 CPU's. Eventually there will be scripts to automate the tool-chain to build the final system. - -## Usage - -Scripts should be placed in a `scripts` directory under the source tree, i.e. `$MLFS/sources/scripts` but executed in `$MLFS/sources`. - -To build the cross-tools: -``` -cd $MLFS/sources -sh scripts/001-CT-BUILD 4 -``` -Syntax: `001-CT-BUILD ` - -## Configuration - -The `000-autobuild.config` will be used to configure the build, such as setting target arch, and any often used code.` diff --git a/build-scripts/TC-00-musl b/build-scripts/TC-00-musl deleted file mode 100644 index ba23272..0000000 --- a/build-scripts/TC-00-musl +++ /dev/null @@ -1,33 +0,0 @@ -#! /bin/bash -# syntax *.build - -source $MLFS/sources/scripts/000-autobuild.config && - -export PACKAGE=$(echo "$1" | sed -n '/\.tar\.gz$/s///p' ) -cd $PACKAGE && -############################################################ -echo "[ TC 1/31 - $PACKAGE ] Configuring ..." |& tee -a ~/build.log && -./configure \ - CROSS_COMPILE=${MLFS_TARGET}- \ - --prefix=/ \ - --target=${MLFS_TARGET} && - -echo "[ TC 1/31 - $PACKAGE ] Compiling ..." |& tee -a ~/build.log && -time { make $MJ ; } && - -echo "[ TC 1/31 - $PACKAGE ] Installing ..." |& tee -a ~/build.log && -make DESTDIR=/tools install && - -case $(uname -m) in - x86_64) rm -v /tools/lib/ld-musl-x86_64.so.1 - ln -sv libc.so /tools/lib/ld-musl-x86_64.so.1 - ;; - i686) rm -v /tools/lib/ld-musl-i686.so.1 - ln -sv libc.so /tools/lib/ld-musl-i686.so.1 - ;; - arm*) rm -v /tools/lib/ld-musl-arm.so.1 - ln -sv libc.so /tools/lib/ld-musl-arm.so.1 - ;; -esac && -############################################################ -cd .. && rm -rf $PACKAGE diff --git a/build-scripts/TC-01-adjust b/build-scripts/TC-01-adjust deleted file mode 100644 index ddbca19..0000000 --- a/build-scripts/TC-01-adjust +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/bash -echo "[ TC - MODIFY ] Adjusting Toolchain..." && -export SPECFILE=`dirname $(${MLFS_TARGET}-gcc -print-libgcc-file-name)`/specs && -${MLFS_TARGET}-gcc -dumpspecs > specs && - -# Modify dumped specs file for every instance of: -# /lib/ld-musl-$ARCH.so.1 to /tools/lib/ld-musl-$ARCH.so.1 -echo "[ TC - INSPECT ] Modified GCC Specs:" |& tee -a ~/build.log && -case $(uname -m) in - x86_64) sed -i 's/\/lib\/ld-musl-x86_64.so.1/\/tools\/lib\/ld-musl-x86_64.so.1/g' specs - # check with - grep "/tools/lib/ld-musl-x86_64.so.1" specs --color=auto |& tee -a ~/build.log - ;; - i686) sed -i 's/\/lib\/ld-musl-i386.so.1/\/tools\/lib\/ld-musl-i386.so.1/g' specs - # check with - grep "/tools/lib/ld-musl-i386.so.1" specs --color=auto |& tee -a ~/build.log - ;; - arm*) sed -i 's/\/lib\/ld-musl-arm/\/tools\/lib\/ld-musl-arm/g' specs - # check with - grep "/tools/lib/ld-musl-arm" specs --color=auto |& tee -a ~/build.log - ;; -esac && -mv -v specs $SPECFILE -unset SPECFILE - -echo "[ TC - TEST ] Testing Tolchain: " |& tee -a ~/build.log && -echo 'int main(){}' > dummy.c && -${MLFS_TARGET}-gcc dummy.c && -${MLFS_TARGET}-readelf -l a.out | grep Requesting |& tee -a ~/build.log && -rm -v a.out dummy.c diff --git a/build-scripts/TC-02-binutils b/build-scripts/TC-02-binutils deleted file mode 100644 index 8c33d49..0000000 --- a/build-scripts/TC-02-binutils +++ /dev/null @@ -1,45 +0,0 @@ -#! /bin/bash -# syntax *.build - -source $MLFS/sources/scripts/000-autobuild.config && - -export PACKAGE=$(echo "$1" | sed -n '/\.tar\.xz$/s///p' ) -cd $PACKAGE && -############################################################ - -export CC="${MLFS_TARGET}-gcc" && -export CXX="${MLFS_TARGET}-g++" && -export AR="${MLFS_TARGET}-ar" && -export AS="${MLFS_TARGET}-as" && -export RANLIB="${MLFS_TARGET}-ranlib" && -export LD="${MLFS_TARGET}-ld" && -export STRIP="${MLFS_TARGET}-strip" && - -case $(uname -m) in - x86_64) ln -sv lib /tools/lib64 ;; -esac && - -echo "[ TC 2/31 - $PACKAGE ] Configuring ..." |& tee -a ~/build.log && -mkdir -v build && cd build -../configure \ - --target=${MLFS_TARGET} \ - --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --disable-nls \ - --disable-werror \ - --with-lib-path=/tools/lib \ - --with-sysroot && - -echo "[ TC 2/31 - $PACKAGE ] Compiling ..." |& tee -a ~/build.log && -make $MJ && - -echo "[ TC 2/31 - $PACKAGE ] Installing ..." |& tee -a ~/build.log && -make install && -make -C ld clean $MJ && -make -C ld LIB_PATH=/usr/lib:/lib $MJ && -cp -v ld/ld-new /tools/bin -############################################################ -cd ../.. && rm -rf $PACKAGE - - diff --git a/build-scripts/TC-03-gcc b/build-scripts/TC-03-gcc deleted file mode 100644 index 9417141..0000000 --- a/build-scripts/TC-03-gcc +++ /dev/null @@ -1,91 +0,0 @@ -#! /bin/bash -# syntax *.build - -source $MLFS/sources/scripts/000-autobuild.config && - -export PACKAGE=$(echo "$1" | sed -n '/\.tar\.xz$/s///p' ) -cd $PACKAGE && -############################################################ -export CC="${MLFS_TARGET}-gcc" && -export CXX="${MLFS_TARGET}-g++" && -export AR="${MLFS_TARGET}-ar" && -export AS="${MLFS_TARGET}-as" && -export RANLIB="${MLFS_TARGET}-ranlib" && -export LD="${MLFS_TARGET}-ld" && -export STRIP="${MLFS_TARGET}-strip" && - -echo "[ TC 3/31 - $PACKAGE ] Adding auxillary sources ..." |& tee -a ~/build.log && -tar -xf ../mpfr-* && -mv $( echo "$(ls ../mpfr-*)" | sed -n '/\.tar\.xz$/s///p' | cut -d "/" -f 2 ) mpfr && -tar -xf ../gmp-* && -mv $( echo "$(ls ../gmp-*)" | sed -n '/\.tar\.xz$/s///p' | cut -d "/" -f 2 ) gmp && -tar -xf ../mpc-* && -mv $( echo "$(ls ../mpc-*)" | sed -n '/\.tar\.gz$/s///p' | cut -d "/" -f 2 ) mpc && - -echo "[ TC 3/31 - $PACKAGE ] Patching source ..." |& tee -a ~/build.log && -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/0010-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/ada-shared.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/fix-cxxflags-passing.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/fix-musl-execinfo.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/libgcc-musl-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/musl-ada.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/no-stack_chk_fail_local.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/non-nullness.patch - -echo "[ TC 3/31 - $PACKAGE ] Re-create internal header ..." |& tee -a ~/build.log && -cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ - `dirname $($MLFS_TARGET-gcc -print-libgcc-file-name)`/include-fixed/limits.h && - -echo "[ TC 3/31 - $PACKAGE ] Change the location of GCC's default dynamic linker ..." |& tee -a ~/build.log && -for file in gcc/config/{linux,i386/linux{,64}}.h -do - cp -uv $file{,.orig} - sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ - -e 's@/usr@/tools@g' $file.orig > $file - echo ' -#undef STANDARD_STARTFILE_PREFIX_1 -#undef STANDARD_STARTFILE_PREFIX_2 -#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/" -#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file - touch $file.orig -done && - -echo "[ TC 3/31 - $PACKAGE ] Configure source ..." |& tee -a ~/build.log && -mkdir -v build && cd build -../configure \ - --target=${MLFS_TARGET} \ - --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --with-local-prefix=/tools \ - --with-native-system-header-dir=/tools/include \ - --enable-languages=c,c++ \ - --disable-libstdcxx-pch \ - --disable-multilib \ - --disable-bootstrap \ - --disable-libgomp \ - --disable-libquadmath \ - --disable-libssp \ - --disable-libvtv \ - --disable-symvers \ - --disable-libitm \ - --disable-libsanitizer && - -echo "[ TC 3/31 - $PACKAGE ] Compiling ..." |& tee -a ~/build.log && -PATH=/bin:/usr/bin:/cross-tools/bin:/tools/bin make $MJ && - -echo "[ TC 3/31 - $PACKAGE ] Installing ..." |& tee -a ~/build.log && -make install && ln -sv gcc /tools/bin/cc && - -GCC_INCLUDEDIR=`dirname $(${MLFS_TARGET}-gcc -print-libgcc-file-name)`/include && -find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; && -rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` && -unset GCC_INCLUDEDIR && - -echo "[ TC - TEST ] Testing Tolchain: " |& tee -a ~/build.log && -echo 'int main(){}' > dummy.c && -cc dummy.c && -readelf -l a.out | grep ': /tools' |& tee -a ~/build.log && -rm -v dummy.c a.out && -############################################################ -cd ../.. && rm -rf $PACKAGE diff --git a/build-scripts/TC-04-headers b/build-scripts/TC-04-headers deleted file mode 100644 index 7dadd1a..0000000 --- a/build-scripts/TC-04-headers +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/bash -# syntax *.build - -source $MLFS/sources/scripts/000-autobuild.config && - -export PACKAGE=$(echo "$1" | sed -n '/\.tar\.xz$/s///p' ) -cd $PACKAGE && -############################################################ -echo "[ TC 4/31 - $PACKAGE ] Clean source ..." |& tee -a ~/build.log && -make mrproper $MJ && - -echo "[ TC 4/31 - $PACKAGE ] Extract headers ..." |& tee -a ~/build.log && -ARCH=${MLFS_ARCH} make headers $MJ && -find usr/include \( -name .install -o -name ..install.cmd \) -delete && - -echo "[ TC 4/31 - $PACKAGE ] Installing ..." |& tee -a ~/build.log && -cp -rv usr/include/* /tools/include && -rm -v /tools/include/Makefile && - -############################################################ -cd .. && rm -rf $PACKAGE diff --git a/build-scripts/TC-05-libstcxx b/build-scripts/TC-05-libstcxx deleted file mode 100644 index 625d728..0000000 --- a/build-scripts/TC-05-libstcxx +++ /dev/null @@ -1,48 +0,0 @@ -#! /bin/bash -# syntax *.build - -source $MLFS/sources/scripts/000-autobuild.config && - -export PACKAGE=$(echo "$1" | sed -n '/\.tar\.xz$/s///p' ) && -export PVER=$(echo "$1" | sed -n '/\.tar\.xz$/s///p' | cut -d "-" -f 2 ) && -cd $PACKAGE && -############################################################ -export CC="${MLFS_TARGET}-gcc" && -export CXX="${MLFS_TARGET}-g++" && -export AR="${MLFS_TARGET}-ar" && -export AS="${MLFS_TARGET}-as" && -export RANLIB="${MLFS_TARGET}-ranlib" && -export LD="${MLFS_TARGET}-ld" && -export STRIP="${MLFS_TARGET}-strip" && - -echo "[ TC 4/31 - $PACKAGE LIBSTDCXX ] Patching source ..." |& tee -a ~/build.log && -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/0010-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/ada-shared.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/fix-cxxflags-passing.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/fix-musl-execinfo.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/libgcc-musl-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/musl-ada.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/no-stack_chk_fail_local.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/non-nullness.patch - -echo "[ TC 4/31 - $PACKAGE LIBSTDCXX ] Configure source ..." |& tee -a ~/build.log && -mkdir -v build && cd build -../libstdc++-v3/configure \ - --target=${MLFS_TARGET} \ - --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --disable-multilib \ - --disable-nls \ - --disable-libstdcxx-threads \ - --disable-libstdcxx-pch \ - --with-gxx-include-dir=/tools/${MLFS_TARGET}/include/c++/$PVER && - -echo "[ TC 4/31 - $PACKAGE LIBSTDCXX ] Compiling ..." |& tee -a ~/build.log && -make $MJ && - -echo "[ TC 4/31 - $PACKAGE LIBSTDCXX ] Installing ..." |& tee -a ~/build.log && -make install && - -############################################################ -cd ../.. && rm -rf $PACKAGE diff --git a/build-scripts/archive/01-cross/00-headers b/build-scripts/archive/01-cross/00-headers deleted file mode 100644 index 0069bca..0000000 --- a/build-scripts/archive/01-cross/00-headers +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/bash - -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") - -read -p "Number of make jobs: $MJ" && - -echo "[$PACKAGE] Clean source..." && -make mrproper $MJ - -echo "[$PACKAGE] Extract headers.." && -read -p "Press Enter to continue" && -make ARCH=${MLFS_ARCH} headers_check $MJ -make ARCH=${MLFS_ARCH} headers $MJ -rm -v usr/include/Makefile - -echo "[$PACKAGE] Install headers.." && -read -p "Press Enter to continue" && -mkdir -pv /cross-tools/${MLFS_TARGET}/include -cp -rv usr/include/* /cross-tools/${MLFS_TARGET}/include - diff --git a/build-scripts/archive/01-cross/01-binutils b/build-scripts/archive/01-cross/01-binutils deleted file mode 100644 index e59a0c3..0000000 --- a/build-scripts/archive/01-cross/01-binutils +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/bash - - -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -echo "[ $PACKAGE ] Configuring ..." && -mkdir -v build && cd build -../configure \ - --prefix=/cross-tools \ - --target=${MLFS_TARGET} \ - --with-sysroot=/cross-tools/${MLFS_TARGET} \ - --disable-nls \ - --disable-multilib \ - --disable-werror \ - --enable-deterministic-archives \ - --disable-compressed-debug-sections -read -p "[ $PACKAGE ] Compile?" && -time { make $MJ ; } && -read -p "[ $PACKAGE ] Install?" && make install - diff --git a/build-scripts/archive/01-cross/03-musl b/build-scripts/archive/01-cross/03-musl deleted file mode 100644 index 2bd2ab0..0000000 --- a/build-scripts/archive/01-cross/03-musl +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/bash - - -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -echo "[ $PACKAGE ] Configuring ..." && -./configure \ - CROSS_COMPILE=${MLFS_TARGET}- \ - --prefix=/ \ - --target=${MLFS_TARGET} && - -read -p "[ $PACKAGE Static] Compile?" && -time { make $MJ ; } && - -read -p "Install?" && -DESTDIR=/cross-tools make install -mkdir -v /cross-tools/usr -ln -sv ../include /cross-tools/usr/include diff --git a/build-scripts/archive/01-cross/04-gcc_final b/build-scripts/archive/01-cross/04-gcc_final deleted file mode 100644 index ba26130..0000000 --- a/build-scripts/archive/01-cross/04-gcc_final +++ /dev/null @@ -1,64 +0,0 @@ -#! /bin/bash - - -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -echo "[ $PACKAGE Final ] Adding auxillary sources ..." && -tar -xf ../mpfr-4.0.2.tar.xz -mv -v mpfr-4.0.2 mpfr -tar -xf ../gmp-6.1.2.tar.xz -mv -v gmp-6.1.2 gmp -tar -xf ../mpc-1.1.0.tar.gz -mv -v mpc-1.1.0 mpc - -echo "[ $PACKAGE Final ] Patching source ..." && -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/0010-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/ada-shared.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/fix-cxxflags-passing.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/fix-musl-execinfo.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/libgcc-musl-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/musl-ada.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/no-stack_chk_fail_local.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/non-nullness.patch - -case $(uname -m) in - x86_64) - sed -e '/m64=/s/lib64/lib/' \ - -i.orig gcc/config/i386/t-linux64 - ;; -esac - -echo "[ $PACKAGE Final ] Configuring ..." && -mkdir build && cd build -AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \ -../configure \ - --prefix=/cross-tools \ - --build=${MLFS_HOST} \ - --host=${MLFS_HOST} \ - --target=${MLFS_TARGET} \ - --disable-multilib \ - --with-sysroot=/cross-tools \ - --disable-nls \ - --enable-shared \ - --enable-languages=c,c++ \ - --enable-threads=posix \ - --enable-clocale=generic \ - --enable-libstdcxx-time \ - --enable-fully-dynamic-string \ - --disable-symvers \ - --disable-libsanitizer \ - --disable-lto-plugin \ - --disable-libssp && - -read -p "[ $PACKAGE Final] Compile?" && -time { make AS_FOR_TARGET="${MLFS_TARGET}-as" \ - LD_FOR_TARGET="${MLFS_TARGET}-ld" $MJ ; } && - -read -p "[ $PACKAGE Final ] Install?" && -make install diff --git a/build-scripts/archive/01-cross/05-file b/build-scripts/archive/01-cross/05-file deleted file mode 100644 index d5fbb78..0000000 --- a/build-scripts/archive/01-cross/05-file +++ /dev/null @@ -1,17 +0,0 @@ -#! /bin/bash - - -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -echo "[ $PACKAGE ] Configuring ..." && -./configure --prefix=/cross-tools --disable-libseccomp -read -p "[ $PACKAGE ] Compile?" && -time { make $MJ ; } && -read -p "[ $PACKAGE ] Install?" -make install diff --git a/build-scripts/archive/02-tools/00-Musl b/build-scripts/archive/02-tools/00-Musl deleted file mode 100644 index baa42cc..0000000 --- a/build-scripts/archive/02-tools/00-Musl +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/bash - - -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -echo "[ TC - $PACKAGE ] Configuring ..." && -./configure \ - CROSS_COMPILE=${MLFS_TARGET}- \ - --prefix=/ \ - --target=${MLFS_TARGET} && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" -make DESTDIR=/tools install - -case $(uname -m) in - x86_64) rm -v /tools/lib/ld-musl-x86_64.so.1 - ln -sv libc.so /tools/lib/ld-musl-x86_64.so.1 - ;; - i686) rm -v /tools/lib/ld-musl-i686.so.1 - ln -sv libc.so /tools/lib/ld-musl-i686.so.1 - ;; - arm*) rm -v /tools/lib/ld-musl-arm.so.1 - ln -sv libc.so /tools/lib/ld-musl-arm.so.1 - ;; -esac diff --git a/build-scripts/archive/02-tools/01-Adjust_toolchain b/build-scripts/archive/02-tools/01-Adjust_toolchain deleted file mode 100644 index 972e272..0000000 --- a/build-scripts/archive/02-tools/01-Adjust_toolchain +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/bash - -echo "Adjusting Tollchain..." && -export SPECFILE=`dirname $(${MLFS_TARGET}-gcc -print-libgcc-file-name)`/specs -${MLFS_TARGET}-gcc -dumpspecs > specs - -# Modify dumped specs file for every instance of: -# /lib/ld-musl-$ARCH.so.1 to /tools/lib/ld-musl-$ARCH.so.1 -case $(uname -m) in - x86_64) sed -i 's/\/lib\/ld-musl-x86_64.so.1/\/tools\/lib\/ld-musl-x86_64.so.1/g' specs - # check with - grep "/tools/lib/ld-musl-x86_64.so.1" specs --color=auto - ;; - i686) sed -i 's/\/lib\/ld-musl-i386.so.1/\/tools\/lib\/ld-musl-i386.so.1/g' specs - # check with - grep "/tools/lib/ld-musl-i386.so.1" specs --color=auto - ;; - arm*) sed -i 's/\/lib\/ld-musl-arm/\/tools\/lib\/ld-musl-arm/g' specs - # check with - grep "/tools/lib/ld-musl-arm" specs --color=auto - ;; -esac -mv -v specs $SPECFILE -unset SPECFILE - -echo ">> Testing Tolchain: " && -echo 'int main(){}' > dummy.c -${MLFS_TARGET}-gcc dummy.c -${MLFS_TARGET}-readelf -l a.out | grep Requesting -read -p "Output good? [ Yes = enter | No = ctrl+C] " && rm -v a.out dummy.c - diff --git a/build-scripts/archive/02-tools/02-Binutils b/build-scripts/archive/02-tools/02-Binutils deleted file mode 100644 index c9fcdb8..0000000 --- a/build-scripts/archive/02-tools/02-Binutils +++ /dev/null @@ -1,43 +0,0 @@ -#! /bin/bash -# step 14 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -case $(uname -m) in - x86_64) ln -sv lib /tools/lib64 ;; -esac - - -echo "[ TC - $PACKAGE ] Configuring ..." && -mkdir -v build && cd build -../configure \ - --target=${MLFS_TARGET} \ - --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --disable-nls \ - --disable-werror \ - --with-lib-path=/tools/lib \ - --with-sysroot - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install && -make -C ld clean $MJ && -make -C ld LIB_PATH=/usr/lib:/lib $MJ && -cp -v ld/ld-new /tools/bin diff --git a/build-scripts/archive/02-tools/03-GCC b/build-scripts/archive/02-tools/03-GCC deleted file mode 100644 index 5fdbc8c..0000000 --- a/build-scripts/archive/02-tools/03-GCC +++ /dev/null @@ -1,98 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Adding auxillary sources ..." && -tar -xf ../mpfr-4.0.2.tar.xz -mv -v mpfr-4.0.2 mpfr -tar -xf ../gmp-6.1.2.tar.xz -mv -v gmp-6.1.2 gmp -tar -xf ../mpc-1.1.0.tar.gz -mv -v mpc-1.1.0 mpc - -echo "[ TC - $PACKAGE ] Patching source ..." && -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/0010-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/ada-shared.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/fix-cxxflags-passing.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/fix-musl-execinfo.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/libgcc-musl-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/musl-ada.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/no-stack_chk_fail_local.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/non-nullness.patch - -echo "[ TC - $PACKAGE ] Re-create internal header ..." && -cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ - `dirname $($MLFS_TARGET-gcc -print-libgcc-file-name)`/include-fixed/limits.h - -echo "[ TC - $PACKAGE ] Change the location of GCC's default dynamic linker ..." && -for file in gcc/config/{linux,i386/linux{,64}}.h -do - cp -uv $file{,.orig} - sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ - -e 's@/usr@/tools@g' $file.orig > $file - echo ' -#undef STANDARD_STARTFILE_PREFIX_1 -#undef STANDARD_STARTFILE_PREFIX_2 -#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/" -#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file - touch $file.orig -done - -echo "[ TC - $PACKAGE ] Configure source ..." && -mkdir -v build && cd build -../configure \ - --target=${MLFS_TARGET} \ - --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --with-local-prefix=/tools \ - --with-native-system-header-dir=/tools/include \ - --enable-languages=c,c++ \ - --disable-libstdcxx-pch \ - --disable-multilib \ - --disable-bootstrap \ - --disable-libgomp \ - --disable-libquadmath \ - --disable-libssp \ - --disable-libvtv \ - --disable-symvers \ - --disable-libitm \ - --disable-libsanitizer && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { PATH=/bin:/usr/bin:/cross-tools/bin:/tools/bin make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install && ln -sv gcc /tools/bin/cc && - -GCC_INCLUDEDIR=`dirname $(${MLFS_TARGET}-gcc -print-libgcc-file-name)`/include && -find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; && -rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` && -unset GCC_INCLUDEDIR - - -read -p ">> Test Tool chain sanity:" && -echo 'int main(){}' > dummy.c && -cc dummy.c && -readelf -l a.out | grep ': /tools' && -read -p "Output good? [ Yes = enter | No = ctrl+C ] " && -rm -v dummy.c a.out - - - - - diff --git a/build-scripts/archive/02-tools/04-Headers b/build-scripts/archive/02-tools/04-Headers deleted file mode 100644 index 69a3a7b..0000000 --- a/build-scripts/archive/02-tools/04-Headers +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -echo "[ TC - $PACKAGE ] Clean source ..." && -make mrproper $MJ && - -echo "[ TC - $PACKAGE ] Extract headers ..." && -ARCH=${MLFS_ARCH} make headers $MJ -find usr/include \( -name .install -o -name ..install.cmd \) -delete - -read -p "[ TC - $PACKAGE ] Install?" && -cp -rv usr/include/* /tools/include -rm -v /tools/include/Makefile diff --git a/build-scripts/archive/02-tools/05-libstcxx b/build-scripts/archive/02-tools/05-libstcxx deleted file mode 100644 index 48daa1b..0000000 --- a/build-scripts/archive/02-tools/05-libstcxx +++ /dev/null @@ -1,46 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE LIBSTDCXX ] Patching source ..." && -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/0010-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/ada-shared.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/fix-cxxflags-passing.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/fix-musl-execinfo.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/libgcc-musl-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/musl-ada.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/no-stack_chk_fail_local.patch -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/non-nullness.patch - -echo "[ TC - $PACKAGE LIBSTDCXX ] Configure source ..." && -mkdir -v build && cd build -../libstdc++-v3/configure \ - --target=${MLFS_TARGET} \ - --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --disable-multilib \ - --disable-nls \ - --disable-libstdcxx-threads \ - --disable-libstdcxx-pch \ - --with-gxx-include-dir=/tools/${MLFS_TARGET}/include/c++/9.2.0 && - -read -p "[ TC - $PACKAGE LIBSTDCXX ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE LIBSTDCXX ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/06-TCL b/build-scripts/archive/02-tools/06-TCL deleted file mode 100644 index 9c4de8f..0000000 --- a/build-scripts/archive/02-tools/06-TCL +++ /dev/null @@ -1,35 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -cd unix && -ac_cv_func_strtod=yes \ -tcl_cv_strtod_buggy=1 \ -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install && -chmod -v u+w /tools/lib/libtcl8.6.so -make install-private-headers -ln -sv tclsh8.6 /tools/bin/tcls - diff --git a/build-scripts/archive/02-tools/07-Expect b/build-scripts/archive/02-tools/07-Expect deleted file mode 100644 index 0929a97..0000000 --- a/build-scripts/archive/02-tools/07-Expect +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Patching source ..." && -patch -Np1 -i ../patches/expect-5.45.3-dont-put-toolchain-in-libpath.patch -patch -Np1 -i ../patches/expect-5.45.3-dont-configure-testsuites.patch -patch -Np1 -i ../patches/expect-5.45.3-allow-cross-compile.patch -cp -v ../files/config.guess-musl tclconfig/config.guess -cp -v ../files/config.sub-musl tclconfig/config.sub -cp -v configure{,.orig} -sed 's:/usr/local/bin:/bin:' configure.orig > configure - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --with-tcl=/tools/lib \ - --with-tclinclude=/tools/include && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make SCRIPTS="" install - diff --git a/build-scripts/archive/02-tools/08-dejagnu b/build-scripts/archive/02-tools/08-dejagnu deleted file mode 100644 index 1fe9dcd..0000000 --- a/build-scripts/archive/02-tools/08-dejagnu +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/09-M4 b/build-scripts/archive/02-tools/09-M4 deleted file mode 100644 index 1fe9dcd..0000000 --- a/build-scripts/archive/02-tools/09-M4 +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/10-ncurses b/build-scripts/archive/02-tools/10-ncurses deleted file mode 100644 index c4523fd..0000000 --- a/build-scripts/archive/02-tools/10-ncurses +++ /dev/null @@ -1,36 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --prefix=/tools \ - --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --with-shared \ - --without-debug \ - --without-ada \ - --enable-widec \ - --enable-overwrite \ - --with-build-cc="gcc -D_GNU_SOURCE" && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/11-Bash b/build-scripts/archive/02-tools/11-Bash deleted file mode 100644 index 0dd1be7..0000000 --- a/build-scripts/archive/02-tools/11-Bash +++ /dev/null @@ -1,41 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -ac_cv_func_mmap_fixed_mapped=yes \ -ac_cv_func_strcoll_works=yes \ -ac_cv_func_working_mktime=yes \ -bash_cv_func_sigsetjmp=present \ -bash_cv_getcwd_malloc=yes \ -bash_cv_job_control_missing=present \ -bash_cv_printf_a_format=yes \ -bash_cv_sys_named_pipes=present \ -bash_cv_ulimit_maxfds=yes \ -bash_cv_under_sys_siglist=yes \ -bash_cv_unusable_rtsigs=no \ -gt_cv_int_divbyzero_sigfpe=yes \ -./configure --prefix=/tools \ - --without-bash-malloc \ - --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/12-Bison b/build-scripts/archive/02-tools/12-Bison deleted file mode 100644 index 1fe9dcd..0000000 --- a/build-scripts/archive/02-tools/12-Bison +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/13-Bzip2 b/build-scripts/archive/02-tools/13-Bzip2 deleted file mode 100644 index 054cb33..0000000 --- a/build-scripts/archive/02-tools/13-Bzip2 +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Patch source ..." && -cp Makefile{,.orig} -sed -e "/^all:/s/ test//" Makefile.orig > Makefile -sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile -sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile - - -echo "[ TC - $PACKAGE ] Configure source ..." && -make -f Makefile-libbz2_so CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" $MJ -make clean $MJ - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make PREFIX=/tools install diff --git a/build-scripts/archive/02-tools/14-coreutils b/build-scripts/archive/02-tools/14-coreutils deleted file mode 100644 index 546bd48..0000000 --- a/build-scripts/archive/02-tools/14-coreutils +++ /dev/null @@ -1,41 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Patch source ..." && -patch -Np1 -i ../patches/coreutils-8.31-fix-strtod.patch - -echo "[ TC - $PACKAGE ] Re-create configure script ..." && -autoreconf -vif && -sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk - -echo "[ TC - $PACKAGE ] Configure source ..." && -fu_cv_sys_stat_statfs2_bsize=no \ -ac_cv_func_syncfs=no \ -gl_cv_func_working_mkstemp=yes \ -gl_cv_func_working_acl_get_file=yes \ - -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --enable-install-program=hostname && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/15-diffutils b/build-scripts/archive/02-tools/15-diffutils deleted file mode 100644 index 1fe9dcd..0000000 --- a/build-scripts/archive/02-tools/15-diffutils +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/16-file b/build-scripts/archive/02-tools/16-file deleted file mode 100644 index 1fe9dcd..0000000 --- a/build-scripts/archive/02-tools/16-file +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/17-Findutils b/build-scripts/archive/02-tools/17-Findutils deleted file mode 100644 index b45510d..0000000 --- a/build-scripts/archive/02-tools/17-Findutils +++ /dev/null @@ -1,33 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Adjust source ..." && -sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' gl/lib/*.c -sed -i '/unistd/a #include ' gl/lib/mountlist.c -echo "#define _IO_IN_BACKUP 0x100" >> gl/lib/stdio-impl.h - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/18-gawk b/build-scripts/archive/02-tools/18-gawk deleted file mode 100644 index 1fe9dcd..0000000 --- a/build-scripts/archive/02-tools/18-gawk +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/19-gettext b/build-scripts/archive/02-tools/19-gettext deleted file mode 100644 index f0df18b..0000000 --- a/build-scripts/archive/02-tools/19-gettext +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --disable-shared && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /tools/bin diff --git a/build-scripts/archive/02-tools/20-grep b/build-scripts/archive/02-tools/20-grep deleted file mode 100644 index 1fe9dcd..0000000 --- a/build-scripts/archive/02-tools/20-grep +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/21-gzip b/build-scripts/archive/02-tools/21-gzip deleted file mode 100644 index 1fe9dcd..0000000 --- a/build-scripts/archive/02-tools/21-gzip +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/22-Make b/build-scripts/archive/02-tools/22-Make deleted file mode 100644 index 5a5636a..0000000 --- a/build-scripts/archive/02-tools/22-Make +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --without-guile && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/23-Patch b/build-scripts/archive/02-tools/23-Patch deleted file mode 100644 index 1fe9dcd..0000000 --- a/build-scripts/archive/02-tools/23-Patch +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/24-Perl b/build-scripts/archive/02-tools/24-Perl deleted file mode 100644 index 9ba2ed4..0000000 --- a/build-scripts/archive/02-tools/24-Perl +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Merge perl-cross source " && -cd .. && -tar xf perl-cross-1.3.tar.gz -cd perl-5.30.0 && -mv -v ../perl-cross-1.3/* ./ -mv -v ../perl-cross-1.3/utils/* utils/ - -echo "[ TC - $PACKAGE ] Patch source " && -patch -p1 < ../patches/perl-5.30-alpine/musl-locale.patch - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --prefix=/tools \ - --target=${MLFS_TARGET} && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -cp -v perl cpan/podlators/scripts/pod2man /tools/bin && -mkdir -pv /tools/lib/perl5/5.30.0 && -cp -Rv lib/* /tools/lib/perl5/5.30.0 - diff --git a/build-scripts/archive/02-tools/25-Sed b/build-scripts/archive/02-tools/25-Sed deleted file mode 100644 index 1fe9dcd..0000000 --- a/build-scripts/archive/02-tools/25-Sed +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/26-Tar b/build-scripts/archive/02-tools/26-Tar deleted file mode 100644 index 1fe9dcd..0000000 --- a/build-scripts/archive/02-tools/26-Tar +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/27-Texinfo b/build-scripts/archive/02-tools/27-Texinfo deleted file mode 100644 index 1fe9dcd..0000000 --- a/build-scripts/archive/02-tools/27-Texinfo +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/28-Xz b/build-scripts/archive/02-tools/28-Xz deleted file mode 100644 index 1fe9dcd..0000000 --- a/build-scripts/archive/02-tools/28-Xz +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools && - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/02-tools/29-Lzip b/build-scripts/archive/02-tools/29-Lzip deleted file mode 100644 index bfc057c..0000000 --- a/build-scripts/archive/02-tools/29-Lzip +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/bash -# step 15 originally -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -echo "[ TC - $PACKAGE ] Configure source ..." && -./configure --prefix=/tools && -sed -i 's/CXX = g++/CXX = ${MLFS_TARGET}-g++/g' Makefile - -read -p "[ TC - $PACKAGE ] Compile?" && -time { make $MJ ; } && - -read -p "[ TC - $PACKAGE ] Install?" && -make install diff --git a/build-scripts/archive/README.md b/build-scripts/archive/README.md deleted file mode 100644 index bba82d0..0000000 --- a/build-scripts/archive/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Musl LFS Build Scripts - -As a means of convenience, these buld scripts will automate building the cross tools and tool chain for x86 CPU's. - -To Use: -Unpack each pacakge and run script inside: -``` -tar xf binutils-2.32.tar.xz -cd binutils-2.32 -sh ../scripts/cross/01-binutils 2 -``` - -Each build script accepts 1 argument for number of make jobs. For example, to buld with 8 make jobs (`-j8`) then: -``` -sh ../scripts/cross/01-binutils 8 -``` - -Omiting the argument will run `make` without any specified number of jobs. - - -Directory -
    -
  • 01-cross -- Build scripts to build `/cross-tools`
  • -
  • 02-tools -- Build scripts to build `/tools`
  • -
diff --git a/build-scripts/build-cross-tools.sh b/build-scripts/build-cross-tools.sh new file mode 100755 index 0000000..d5f11de --- /dev/null +++ b/build-scripts/build-cross-tools.sh @@ -0,0 +1,196 @@ +#! /bin/bash + +# Auto-build Cross-toolchain for MLFS-9.00 +# Please check Build Config section before running script + +#### Build Config +export MLFS_HOST="$(echo $MACHTYPE | \ + sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")" +export MLFS_TARGET="armv7l-mlfs-linux-musleabihf" +export MLFS_ARCH="arm" +export MLFS_CPU="armv7-a+neon-vfpv4" +export BUILD_ROOT="/mnt/mlfs" +export SRC_ROOT=${BUILD_ROOT}/sources +export SRC_PKGS=${SRC_ROOT}/packages +export SRC_PATCHES=${SRC_ROOT}/patches +export SRC_FILES=${SRC_ROOT}/files +export MJ="-j8" +export PRGRSS=/tmp +export CSPEC="--with-tune=cortex-a15.cortex-a7 \ + --with-float=hard \ + --with-abi=aapcs-linux \ + --with-mode=thumb " + +#### Build environment check +# WIP +# Check source packages are present +# Check source patches are present +# Check host for required packages installed +# Check if /cross-tools is present +# Check if executed as Non-root user + +export MLFS=${BUILD_ROOT} +# Script requires the following layout: +# ${MLFS}/sources +# +--files +# +--packages +# +--patches +# +--scripts (contains auto-build scripts, including this scripts + +read -p "Check build progress at $PRGRSS/ct.progess" && + +#### Build kernel headers +export PKG_NAME="linux" && +export PKG_PATH=${SRC_PKGS}/${PKG_NAME}* && +export PKG_DIR=$(echo ${SRC_ROOT}/${PKG_NAME}* ) && +echo "Building kernel headers..." >> ${PRGRSS}/ct.progress && +tar xf ${PKG_PATH} && +cd ${PKG_DIR} && +make mrproper ${MJ} && +make ARCH=${MLFS_ARCH} headers_check ${MJ} && +mkdir -pv /cross-tools/${MLFS_TARGET}/include && +cp -rv usr/include/* /cross-tools/${MLFS_TARGET}/include && +rm -v /cross-tools/${MLFS_TARGET}/include/Makefile && +cd ${SRC_ROOT} && + +#### Build Binutils +export PKG_NAME="binutils" && +export PKG_PATH=${SRC_PKGS}/${PKG_NAME}* && +export PKG_DIR=$(echo ${SRC_ROOT}/${PKG_NAME}* ) && +echo "Building binutils..." >> ${PRGRSS}/ct.progress && +tar xf ${PKG_PATH} && cd ${PKG_DIR} && +mkdir -v build && cd build && +../configure \ + --prefix=/cross-tools \ + --target=${MLFS_TARGET} \ + --with-sysroot=/cross-tools/${MLFS_TARGET} \ + --disable-nls \ + --disable-multilib \ + --disable-werror \ + --enable-deterministic-archives \ + --disable-compressed-debug-sections && +make configure-host ${MJ} && +make ${MJ} && make install && +cd ${SRC_ROOT} && +rm -rvf ${PKG_DIR} && + +#### Build GCC +export PKG_NAME="gcc" && +export PKG_PATH=${SRC_PKGS}/${PKG_NAME}* && +export PKG_DIR=$(echo ${SRC_ROOT}/${PKG_NAME}* ) && +echo "Building GCC Static..." >> ${PRGRSS}/ct.progress && +tar xf ${PKG_PATH} && cd ${PKG_DIR} && +tar xf ${SRC_PKGS}/mpfr* && +tar xf ${SRC_PKGS}/gmp* && +tar xf ${SRC_PKGS}/mpc* && +mv -v mpfr* mpfr && +mv -v gmp* gmp && +mv -v mpc* mpc && +mkdir -v build && cd build && +CFLAGS='-g0 -O0' \ +CXXFLAGS='-g0 -O0' \ +../configure \ + --prefix=/cross-tools --build=${MLFS_HOST} \ + --host=${MLFS_HOST} --target=${MLFS_TARGET} \ + --with-sysroot=/cross-tools/${MLFS_TARGET} \ + --disable-nls --with-newlib \ + --disable-libitm --disable-libvtv \ + --disable-libssp --disable-shared \ + --disable-libgomp --without-headers \ + --disable-threads --disable-multilib \ + --disable-libatomic --disable-libstdcxx \ + --enable-languages=c --disable-libquadmath \ + --disable-libsanitizer --with-arch=${MLFS_CPU} \ + --disable-decimal-float --enable-clocale=generic ${CSPEC} && +make all-gcc all-target-libgcc ${MJ} && +make install-gcc install-target-libgcc && +cd ${SRC_ROOT} && rm -rf gcc* && + +#### Build Musl Libc +export PKG_NAME="musl-1" && +export PKG_PATH=${SRC_PKGS}/${PKG_NAME}* && +export PKG_DIR=$(echo ${SRC_ROOT}/${PKG_NAME}* ) && +echo "Building Musl Libc..." >> ${PRGRSS}/ct.progress && +tar xf ${PKG_PATH} && cd ${PKG_DIR} && +./configure \ + CROSS_COMPILE=${MLFS_TARGET}- \ + --prefix=/ \ + --target=${MLFS_TARGET} && +make ${MJ} && DESTDIR=/cross-tools make install && +mkdir -pv /cross-tools/usr && +ln -sv ../include /cross-tools/usr/include && +case $(uname -m) in + x86_64) export ARCH="x86_64" ;; + i686) export ARCH="i386" ;; + arm*) export ARCH="arm" ARCH2="armhf" ;; + aarch64) export ARCH="aarch64" ;; +esac && +rm -vf /cross-tools/lib/ld-musl* && +ln -sv libc.so /cross-tools/lib/ld-musl-${ARCH}.so.1 && +ln -sv ../lib/libc.so \ + /cross-tools/bin/ldd && +mkdir -v /cross-tools/etc && +printf "/cross-tools/lib \n" >> /cross-tools/etc/ld-musl-$ARCH.path && +printf "/tools/lib \n" >> /cross-tools/etc/ld-musl-$ARCH.path && +case $(uname -m) in + arm*) ln -sv libc.so /cross-tools/lib/ld-musl-${ARCH2}.so.1 + cp -v /cross-tools/etc/ld-musl-$ARCH.path \ + /cross-tools/etc/ld-musl-$ARCH2.path ;; +esac && + +unset ARCH ARCH2 && +cd ${SRC_ROOT} && rm -rf musl-1* && + +#### Build GCC Final +export PKG_NAME="gcc" && +export PKG_PATH=${SRC_PKGS}/${PKG_NAME}* && +export PKG_DIR=$(echo ${SRC_ROOT}/${PKG_NAME}* ) && +echo "Building GCC Final... " >> ${PRGRSS}/ct.progress && +tar xf ${PKG_PATH} && cd ${PKG_DIR} && +tar xf ${SRC_PKGS}/mpfr* && +tar xf ${SRC_PKGS}/gmp* && +tar xf ${SRC_PKGS}/mpc* && +mv -v mpfr* mpfr && +mv -v gmp* gmp && +mv -v mpc* mpc && +bash ../patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh && \ +case $(uname -m) in + x86_64) sed -e '/m64=/s/lib64/lib/' \ + -i.orig gcc/config/i386/t-linux64 ;; +esac && mkdir -pv build && cd build && +AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \ +../configure \ + --prefix=/cross-tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_HOST} \ + --target=${MLFS_TARGET} \ + --disable-multilib \ + --with-sysroot=/cross-tools \ + --disable-nls \ + --enable-shared \ + --enable-languages=c,c++ \ + --enable-threads=posix \ + --enable-clocale=generic \ + --enable-libstdcxx-time \ + --enable-fully-dynamic-string \ + --disable-symvers \ + --disable-libsanitizer \ + --disable-lto-plugin \ + --disable-libssp \ + --with-arch=${MLFS_CPU} ${CSPEC} && +make AS_FOR_TARGET="${MLFS_TARGET}-as" \ + LD_FOR_TARGET="${MLFS_TARGET}-ld" ${MJ} && +make install && +cd ${SRC_ROOT} && rm -rf gcc* + +#### Build File +export PKG_NAME="file-5" && +export PKG_PATH=${SRC_PKGS}/${PKG_NAME}* && +export PKG_DIR=$(echo ${SRC_ROOT}/${PKG_NAME}* ) && +echo "Building File... " >> ${PRGRSS}/ct.progress && +tar xf ${PKG_PATH} && cd ${PKG_DIR} && +./configure --prefix=/cross-tools --disable-libseccomp && +make ${MJ} && make install && +rm -rf file-* && +echo "Cross Toolchain complete!" + diff --git a/build-scripts/build-toolchain.sh b/build-scripts/build-toolchain.sh new file mode 100755 index 0000000..be724c3 --- /dev/null +++ b/build-scripts/build-toolchain.sh @@ -0,0 +1,51 @@ +#! /bin/bash + +export MLFS=/mnt/mlfs +# Script requires the following layout: +# ${MLFS}/sources +# +--files +# +--packages +# +--patches +# +--scripts (contains auto-build scripts, including this script) + +cd ${MLFS}/sources + +export PRGRSS=/tmp +source scripts/toolchain.conf + +read -p "Check build progress at ${PRGRSS}/tc.progess" && \ + +printf "01/33: Musl Libc ............." >> ${PRGRSS}/tc.progress && bash scripts/tc-musl.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "02/33: Adjust Cross toolchain." >> ${PRGRSS}/tc.progress && bash scripts/tc-Adjust_CT.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "03/33: Binutils..............." >> ${PRGRSS}/tc.progress && bash scripts/tc-binutils.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "04/33: GCC...................." >> ${PRGRSS}/tc.progress && bash scripts/tc-gcc.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "05/33: Kernel Headers........." >> ${PRGRSS}/tc.progress && bash scripts/tc-headers.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "06/33: Adjust Toolchain......." >> ${PRGRSS}/tc.progress && bash scripts/tc-Adjust_TC.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "07/33: Libstdc++ (GCC)........" >> ${PRGRSS}/tc.progress && bash scripts/tc-libstdcxx.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "08/33: TCL...................." >> ${PRGRSS}/tc.progress && bash scripts/tc-tcl.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "09/33: Expect................." >> ${PRGRSS}/tc.progress && bash scripts/tc-expect.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "10/33: DejaGnu................" >> ${PRGRSS}/tc.progress && bash scripts/tc-dejagnu.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "11/33: M4....................." >> ${PRGRSS}/tc.progress && bash scripts/tc-m4.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "12/33: Ncurses................" >> ${PRGRSS}/tc.progress && bash scripts/tc-ncurses.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "13/33: Bash..................." >> ${PRGRSS}/tc.progress && bash scripts/tc-bash.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "14/33: Bison.................." >> ${PRGRSS}/tc.progress && bash scripts/tc-bison.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "15/33: Bzip2.................." >> ${PRGRSS}/tc.progress && bash scripts/tc-bzip2.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "16/33: Coreutils.............." >> ${PRGRSS}/tc.progress && bash scripts/tc-coreutils.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "17/33: diffutils.............." >> ${PRGRSS}/tc.progress && bash scripts/tc-diffutils.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "18/33: file..................." >> ${PRGRSS}/tc.progress && bash scripts/tc-file.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "19/33: findutils.............." >> ${PRGRSS}/tc.progress && bash scripts/tc-findutils.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "20/33: Gawk..................." >> ${PRGRSS}/tc.progress && bash scripts/tc-gawk.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "21/33: Gettext-tiny..........." >> ${PRGRSS}/tc.progress && bash scripts/tc-gettext-tiny.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "22/33: Grep..................." >> ${PRGRSS}/tc.progress && bash scripts/tc-grep.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "23/33: Gzip..................." >> ${PRGRSS}/tc.progress && bash scripts/tc-gzip.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "24/33: Make..................." >> ${PRGRSS}/tc.progress && bash scripts/tc-make.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "25/33: Patch.................." >> ${PRGRSS}/tc.progress && bash scripts/tc-patch.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "26/33: Perl..................." >> ${PRGRSS}/tc.progress && bash scripts/tc-perl.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "27/33: Sed...................." >> ${PRGRSS}/tc.progress && bash scripts/tc-sed.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "28/33: Tar...................." >> ${PRGRSS}/tc.progress && bash scripts/tc-tar.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "39/33: Texinfo................" >> ${PRGRSS}/tc.progress && bash scripts/tc-texinfo.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "30/33: Xz....................." >> ${PRGRSS}/tc.progress && bash scripts/tc-xz.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "31/33: flex..................." >> ${PRGRSS}/tc.progress && bash scripts/tc-flex.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "32/33: nano..................." >> ${PRGRSS}/tc.progress && bash scripts/tc-nano.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +printf "33/33: Vim...................." >> ${PRGRSS}/tc.progress && bash scripts/tc-vim.sh && printf " [ DONE ]\n" >> ${PRGRSS}/tc.progress && \ +echo "Toolchain Complete!" >> ${PRGRSS}/tc.progress diff --git a/build-scripts/tc-Adjust_CT.sh b/build-scripts/tc-Adjust_CT.sh new file mode 100755 index 0000000..ec53ede --- /dev/null +++ b/build-scripts/tc-Adjust_CT.sh @@ -0,0 +1,37 @@ +#! /bin/bash + +export SPECFILE=`dirname $(${MLFS_TARGET}-gcc -print-libgcc-file-name)`/specs && +${MLFS_TARGET}-gcc -dumpspecs > specs && + +case ${MLFS_ARCH} in + x86_64) sed -i 's/\/lib\/ld-musl-x86_64.so.1/\/tools\/lib\/ld-musl-x86_64.so.1/g' specs + # check with + grep "/tools/lib/ld-musl-x86_64.so.1" specs --color=auto + ;; + i686) sed -i 's/\/lib\/ld-musl-i386.so.1/\/tools\/lib\/ld-musl-i386.so.1/g' specs + # check with + grep "/tools/lib/ld-musl-i386.so.1" specs --color=auto + ;; + arm*) sed -i 's/\/lib\/ld-musl-arm/\/tools\/lib\/ld-musl-arm/g' specs + # check with + grep "/tools/lib/ld-musl-arm" specs --color=auto + ;; + aarch64) sed -i 's/\/lib\/ld-musl-aarch64/\/tools\/lib\/ld-musl-aarch64/g' specs + # check with + grep "/tools/lib/ld-musl-aarch64" specs --color=auto + ;; +esac && +echo "Install modified specs to the cross toolchain" && +mv -v specs ${SPECFILE} && +unset SPECFILE && +echo 'int main(){}' > dummy.c && +${MLFS_TARGET}-gcc dummy.c && +${MLFS_TARGET}-readelf -l a.out | grep Requesting >> ${PRGRSS}/tc.progress && +#echo "The above should match one of the below:" && +#echo "# [Requesting program interpreter: /tools/lib/ld-musl-x86_64.so.1]" && +#echo "# [Requesting program interpreter: /tools/lib/ld-musl-i386.so.1]" && +#echo "# [Requesting program interpreter: /tools/lib/ld-musl-arm.so.1]" && +#echo "# [Requesting program interpreter: /tools/lib/ld-musl-aarch64.so.1]" && +#read -p "Press [ENTER] to continue or [CTRL]+[C] to stop " && +rm -rvf a.out dummy.c + diff --git a/build-scripts/tc-Adjust_TC.sh b/build-scripts/tc-Adjust_TC.sh new file mode 100755 index 0000000..43026ff --- /dev/null +++ b/build-scripts/tc-Adjust_TC.sh @@ -0,0 +1,51 @@ +#! /bin/bash + +echo "Dump gcc specs..." && +SPECFILE=`dirname $(${MLFS_TARGET}-gcc -print-libgcc-file-name)`/specs && +${MLFS_TARGET}-gcc -dumpspecs > tempspecfile && +echo "Modify dumped tempspecfile file for every instance of:" && +echo "/lib/ld-musl-$ARCH.so.1 to /tools/lib/ld-musl-$ARCH.so.1" && +case ${MLFS_ARCH} in + i686) # for i386 + sed -i 's/\/lib\/ld-musl-i386.so.1/\/tools\/lib\/ld-musl-i386.so.1/g' tempspecfile + # check with sed + grep "/tools/lib/ld-musl-i386.so.1" tempspecfile --color=auto + ;; + x86_64) # for x86_64 + sed -i 's/\/lib\/ld-musl-x86_64.so.1/\/tools\/lib\/ld-musl-x86_64.so.1/g' tempspecfile + # check with + grep "/tools/lib/ld-musl-x86_64.so.1" tempspecfile --color=auto + ;; + arm*) # for arm + sed -i 's/\/lib\/ld-musl-arm/\/tools\/lib\/ld-musl-arm/g' tempspecfile + # check with + grep "/tools/lib/ld-musl-arm" tempspecfile --color=auto + ;; + aarch64) # for 64-bit arm64 + sed -i 's/\/lib\/ld-musl-aarch64/\/tools\/lib\/ld-musl-aarch64/g' tempspecfile + # check with + grep "/tools/lib/ld-musl-aarch64" tempspecfile --color=auto + ;; +esac && + +echo "Install modified specs to the toolchain" && +mv -vf tempspecfile $SPECFILE && +unset SPECFILE && +GCC_INCLUDEDIR=`dirname $(${MLFS_TARGET}-gcc -print-libgcc-file-name)`/include && +find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; && +rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` && +unset GCC_INCLUDEDIR && + +echo "Testing toolchain..." && + +echo 'int main(){}' > dummy.c && +${MLFS_TARGET}-gcc -B/tools/lib dummy.c && +readelf -l a.out | grep ': /tools' >> ${PRGRSS}/tc.progress && +#echo "The above should match one of the below:" && +#echo "# [Requesting program interpreter: /tools/lib/ld-musl-x86_64.so.1]" && +#echo "# [Requesting program interpreter: /tools/lib/ld-musl-i386.so.1]" && +#echo "# [Requesting program interpreter: /tools/lib/ld-musl-arm.so.1]" && +#echo "# [Requesting program interpreter: /tools/lib/ld-musl-aarch64.so.1]" && +#read -p "Press [ENTER] to continue or [CTRL]+[C] to stop " && +rm -rvf a.out dummy.c + diff --git a/build-scripts/tc-bash.sh b/build-scripts/tc-bash.sh new file mode 100755 index 0000000..501c43a --- /dev/null +++ b/build-scripts/tc-bash.sh @@ -0,0 +1,35 @@ +#! /bin/bash + +export PKGNAME="bash" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +printf "ac_cv_func_mmap_fixed_mapped=yes +ac_cv_func_strcoll_works=yes +ac_cv_func_working_mktime=yes +bash_cv_func_sigsetjmp=present +bash_cv_getcwd_malloc=yes +bash_cv_job_control_missing=present +bash_cv_printf_a_format=yes +bash_cv_sys_named_pipes=present +bash_cv_ulimit_maxfds=yes +bash_cv_under_sys_siglist=yes +bash_cv_unusable_rtsigs=no +gt_cv_int_divbyzero_sigfpe=yes" > config.cache && +./configure --prefix=/tools \ + --without-bash-malloc \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --cache-file=config.cache && +make ${MJ} && make install && + +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-binutils.sh b/build-scripts/tc-binutils.sh new file mode 100755 index 0000000..eaa2a45 --- /dev/null +++ b/build-scripts/tc-binutils.sh @@ -0,0 +1,32 @@ +#! /bin/bash + +tar xf ${SRC_PKGS}/binutils* && +cd binutils* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +case ${MLFS_CPU} in + x86_64) ln -sv lib /tools/lib64 ;; +esac && + +mkdir -v build && cd build && +../configure --prefix=/tools \ + --with-lib-path=/tools/lib \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --target=${MLFS_TARGET} \ + --disable-nls \ + --disable-werror \ + --with-sysroot && + +make ${MJ} && make install && +make -C ld clean ${MJ} && +make -C ld LIB_PATH=/usr/lib:/lib ${MJ} && +cp -v ld/ld-new /tools/bin && +cd ${SRC_ROOT} && rm -rf binutils* diff --git a/build-scripts/tc-bison.sh b/build-scripts/tc-bison.sh new file mode 100755 index 0000000..7bda6fe --- /dev/null +++ b/build-scripts/tc-bison.sh @@ -0,0 +1,21 @@ +#! /bin/bash + +export PKGNAME="bison" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && + +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-bzip2.sh b/build-scripts/tc-bzip2.sh new file mode 100755 index 0000000..4ea9c2a --- /dev/null +++ b/build-scripts/tc-bzip2.sh @@ -0,0 +1,25 @@ +#! /bin/bash + +export PKGNAME="bzip2" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +cp Makefile{,.orig} && +sed -e "/^all:/s/ test//" Makefile.orig > Makefile && +sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile && +sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile && +make -f Makefile-libbz2_so CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" ${MJ} && +make ${MJ} clean && +make CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" ${MJ} && +make PREFIX=/tools install && + +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-coreutils.sh b/build-scripts/tc-coreutils.sh new file mode 100755 index 0000000..74c5a8a --- /dev/null +++ b/build-scripts/tc-coreutils.sh @@ -0,0 +1,30 @@ +#! /bin/bash + +export PKGNAME="coreutils" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +autoreconf -vif && +patch -Np0 -i ../patches/coreutils-void/0001-ls-restore-8.31-behavior-on-removed-directories.patch && +printf "fu_cv_sys_stat_statfs2_bsize=no +ac_cv_func_syncfs=no +gl_cv_func_working_mkstemp=yes +gl_cv_func_working_acl_get_file=yes" > config.cache && +sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools \ + --enable-install-program=hostname \ + --cache-file=config.cache && +make ${MJ} && make install && + +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-dejagnu.sh b/build-scripts/tc-dejagnu.sh new file mode 100755 index 0000000..368560c --- /dev/null +++ b/build-scripts/tc-dejagnu.sh @@ -0,0 +1,21 @@ +#! /bin/bash + +export PKGNAME="dejagnu" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && + +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-diffutils.sh b/build-scripts/tc-diffutils.sh new file mode 100755 index 0000000..05fc6ee --- /dev/null +++ b/build-scripts/tc-diffutils.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +export PKGNAME="diffutils" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-expect.sh b/build-scripts/tc-expect.sh new file mode 100755 index 0000000..85521c8 --- /dev/null +++ b/build-scripts/tc-expect.sh @@ -0,0 +1,32 @@ +#! /bin/bash + +export PKGNAME="expect" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +patch -Np1 -i ../patches/expect-5.45.3/dont-put-toolchain-in-libpath.patch && +patch -Np1 -i ../patches/expect-5.45.3/dont-configure-testsuites.patch && +patch -Np1 -i ../patches/expect-5.45.3/allow-cross-compile.patch && + +cp -v ../files/config.guess-musl tclconfig/config.guess && +cp -v ../files/config.sub-musl tclconfig/config.sub && +cp -v configure{,.orig} && +sed 's:/usr/local/bin:/bin:' configure.orig > configure && + +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools \ + --with-tcl=/tools/lib \ + --with-tclinclude=/tools/include && +make ${MJ} && make SCRIPTS="" install && + +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-file.sh b/build-scripts/tc-file.sh new file mode 100755 index 0000000..75ccead --- /dev/null +++ b/build-scripts/tc-file.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +export PKGNAME="file" +tar xf ${SRC_PKGS}/${PKGNAME}-* && +cd ${PKGNAME}-* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}-* diff --git a/build-scripts/tc-findutils.sh b/build-scripts/tc-findutils.sh new file mode 100755 index 0000000..310eedc --- /dev/null +++ b/build-scripts/tc-findutils.sh @@ -0,0 +1,23 @@ +#! /bin/bash + +export PKGNAME="findutils" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' gl/lib/*.c && +sed -i '/unistd/a #include ' gl/lib/mountlist.c && +echo "#define _IO_IN_BACKUP 0x100" >> gl/lib/stdio-impl.h && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-flex.sh b/build-scripts/tc-flex.sh new file mode 100755 index 0000000..436f87a --- /dev/null +++ b/build-scripts/tc-flex.sh @@ -0,0 +1,23 @@ +#! /bin/bash + +export PKGNAME="flex" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +ac_cv_func_malloc_0_nonnull=yes \ +ac_cv_func_realloc_0_nonnull=yes \ +HELP2MAN=/tools/bin/true \ +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-gawk.sh b/build-scripts/tc-gawk.sh new file mode 100755 index 0000000..fc83162 --- /dev/null +++ b/build-scripts/tc-gawk.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +export PKGNAME="gawk" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-gcc.sh b/build-scripts/tc-gcc.sh new file mode 100755 index 0000000..c902e59 --- /dev/null +++ b/build-scripts/tc-gcc.sh @@ -0,0 +1,97 @@ +#! /bin/bash + +tar xf ${SRC_PKGS}/gcc* && +cd gcc* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +tar xf ${SRC_PKGS}/mpfr* && +tar xf ${SRC_PKGS}/gmp* && +tar xf ${SRC_PKGS}/mpc* && +mv -v mpfr* mpfr && +mv -v gmp* gmp && +mv -v mpc* mpc && +# Apply alpine patches, except patch for libssp. +bash ../patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh + +cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ + `dirname $($MLFS_TARGET-gcc -print-libgcc-file-name)`/include-fixed/limits.h && +for file in gcc/config/{linux,i386/linux{,64}}.h +do + cp -uv $file{,.orig} + sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ + -e 's@/usr@/tools@g' $file.orig > $file + echo ' +#undef STANDARD_STARTFILE_PREFIX_1 +#undef STANDARD_STARTFILE_PREFIX_2 +#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/" +#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file + touch $file.orig +done && + +for file in gcc/config/arm/linux-eabi.h +do + cp -uv $file{,.orig} + sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ + -e 's@/usr@/tools@g' $file.orig > $file + echo ' +#undef STANDARD_STARTFILE_PREFIX_1 +#undef STANDARD_STARTFILE_PREFIX_2 +#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/" +#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file + touch $file.orig +done && +for file in gcc/config/aarch64/aarch64-linux.h +do + cp -uv $file{,.orig} + sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ + -e 's@/usr@/tools@g' $file.orig > $file + echo ' +#undef STANDARD_STARTFILE_PREFIX_1 +#undef STANDARD_STARTFILE_PREFIX_2 +#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/" +#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file + touch $file.orig +done && +mkdir -v build && cd build && +CFLAGS='-g0 -O0' \ +CXXFLAGS='-g0 -O0' \ +../configure \ + --target=${MLFS_TARGET} \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools \ + --with-local-prefix=/tools \ + --with-native-system-header-dir=/tools/include \ + --enable-languages=c,c++ \ + --disable-libstdcxx-pch \ + --disable-multilib \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-libquadmath \ + --disable-libssp \ + --disable-libvtv \ + --disable-symvers \ + --disable-libitm \ + --disable-libsanitizer \ + --with-arch=${MLFS_CPU} ${CSPEC} && +PATH=/bin:/usr/bin:/cross-tools/bin:/tools/bin make ${MJ} && +make install && +ln -sv gcc /tools/bin/cc && +GCC_INCLUDEDIR=`dirname $(${MLFS_TARGET}-gcc -print-libgcc-file-name)`/include && +find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; && +rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` && +unset GCC_INCLUDEDIR && + +# Test toolchain +echo 'int main(){}' > dummy.c && +cc dummy.c && +readelf -l a.out | grep ': /tools' >> ${PRGRSS}/tc.progress && +rm -v dummy.c a.out && +cd ${SRC_ROOT} && rm -rf gcc* diff --git a/build-scripts/tc-gettext-tiny.sh b/build-scripts/tc-gettext-tiny.sh new file mode 100755 index 0000000..81dac4b --- /dev/null +++ b/build-scripts/tc-gettext-tiny.sh @@ -0,0 +1,19 @@ +#! /bin/bash + +export PKGNAME="gettext-tiny" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && + +make ${MJ} LIBINTL=MUSL prefix=/tools && +cp -v msgfmt msgmerge xgettext /tools/bin && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-grep.sh b/build-scripts/tc-grep.sh new file mode 100755 index 0000000..3f7f908 --- /dev/null +++ b/build-scripts/tc-grep.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +export PKGNAME="grep" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-gzip.sh b/build-scripts/tc-gzip.sh new file mode 100755 index 0000000..97d65ed --- /dev/null +++ b/build-scripts/tc-gzip.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +export PKGNAME="gzip" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-headers.sh b/build-scripts/tc-headers.sh new file mode 100755 index 0000000..5512b60 --- /dev/null +++ b/build-scripts/tc-headers.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +#tar xf ${SRC_PKGS}/linux-* && +cd linux-* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +make mrproper ${MJ} && +ARCH=${MLFS_ARCH} make headers ${MJ} && +find usr/include \( -name .install -o -name ..install.cmd \) -delete && +cp -rv usr/include/* /tools/include && +rm -v /tools/include/Makefile && + +cd ${SRC_ROOT} diff --git a/build-scripts/tc-libstdcxx.sh b/build-scripts/tc-libstdcxx.sh new file mode 100755 index 0000000..5971918 --- /dev/null +++ b/build-scripts/tc-libstdcxx.sh @@ -0,0 +1,29 @@ +#! /bin/bash + +tar xf ${SRC_PKGS}/gcc* && +cd gcc* && +export VER=$(echo $PWD | cut -d - -f 2 | cut -d _ -f 1 ) && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +bash ../patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh && \ + +mkdir -v build && cd build && +../libstdc++-v3/configure \ + --target=${MLFS_TARGET} \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools \ + --disable-multilib \ + --disable-nls \ + --disable-libstdcxx-threads \ + --disable-libstdcxx-pch \ + --with-gxx-include-dir=/tools/${MLFS_TARGET}/include/c++/${VER} && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf gcc-* diff --git a/build-scripts/tc-m4.sh b/build-scripts/tc-m4.sh new file mode 100755 index 0000000..0cc55cd --- /dev/null +++ b/build-scripts/tc-m4.sh @@ -0,0 +1,21 @@ +#! /bin/bash + +export PKGNAME="m4" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} && +make ${MJ} && make install && + +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-make.sh b/build-scripts/tc-make.sh new file mode 100755 index 0000000..7c2b916 --- /dev/null +++ b/build-scripts/tc-make.sh @@ -0,0 +1,21 @@ +#! /bin/bash + +export PKGNAME="make" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools \ + --without-guile && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-musl.sh b/build-scripts/tc-musl.sh new file mode 100755 index 0000000..6470ea5 --- /dev/null +++ b/build-scripts/tc-musl.sh @@ -0,0 +1,36 @@ +#! /bin/bash + +tar xf ${SRC_PKGS}/musl-1* && +cd musl-1* && + +./configure \ + CROSS_COMPILE=${MLFS_TARGET}- \ + --prefix=/ \ + --target=${MLFS_TARGET} && +make ${MJ} && make DESTDIR=/tools install && +mkdir -pv /tools/etc && +case ${MLFS_ARCH} in + x86_64) rm -v /tools/lib/ld-musl-x86_64.so.1 + ln -sv libc.so /tools/lib/ld-musl-x86_64.so.1 + export barch="x86_64" + ;; + i686) rm -v /tools/lib/ld-musl-i386.so.1 + ln -sv libc.so /tools/lib/ld-musl-i386.so.1 + export barch=i386 + ;; + arm*) rm -v /tools/lib/ld-musl-arm.so.1 + rm -v /tools/lib/ld-musl-armhf.so.1 + ln -sv libc.so /tools/lib/ld-musl-arm.so.1 + ln -sv libc.so /tools/lib/ld-musl-armhf.so.1 + export barch=arm + echo "/tools/lib" > /tools/etc/ld-musl-armhf.path + ;; + aarch64) rm -v /tools/lib/ld-musl-aarch64.so.1 + ln -sv libc.so /tools/lib/ld-musl-aarch64.so.1 + export barch="aarch64" + ;; +esac && + +echo "/tools/lib" > /tools/etc/ld-musl-${barch}.path && +unset barch && +cd ${SRC_ROOT} && rm -rf musl-1* diff --git a/build-scripts/tc-nano.sh b/build-scripts/tc-nano.sh new file mode 100755 index 0000000..ccd0a76 --- /dev/null +++ b/build-scripts/tc-nano.sh @@ -0,0 +1,22 @@ +#! /bin/bash + +export PKGNAME="nano" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && +export LDFLAGS="-L/tools/lib" && +export CPPFLAGS="-I/tools/include" && +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools \ + --enable-tiny && +make ${MJ} && make install && unset LDFLAGS CPPFLAGS && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-ncurses.sh b/build-scripts/tc-ncurses.sh new file mode 100755 index 0000000..07c2d0a --- /dev/null +++ b/build-scripts/tc-ncurses.sh @@ -0,0 +1,27 @@ +#! /bin/bash + +export PKGNAME="ncurses" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +sed -i s/mawk// configure && +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --with-shared \ + --without-debug \ + --without-ada \ + --enable-widec \ + --enable-overwrite && +make ${MJ} && make install && + +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-patch.sh b/build-scripts/tc-patch.sh new file mode 100755 index 0000000..5a10b20 --- /dev/null +++ b/build-scripts/tc-patch.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +export PKGNAME="patch-" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-perl.sh b/build-scripts/tc-perl.sh new file mode 100755 index 0000000..98dcf6a --- /dev/null +++ b/build-scripts/tc-perl.sh @@ -0,0 +1,25 @@ +#! /bin/bash + +export PKGNAME="perl" +tar xf ${SRC_PKGS}/${PKGNAME}-5* && +tar xf ${SRC_PKGS}/${PKGNAME}-cross* && +cd ${PKGNAME}-5* && +export VER="5.32.0" && +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +cp -r ../perl-cross-*/* ./ && +patch -p1 < ../patches/perl-5.30-alpine/musl-locale.patch && +./configure --prefix=/tools \ + --target=${MLFS_TARGET} && +make ${MJ} && +cp -v perl cpan/podlators/scripts/pod2man /tools/bin && +mkdir -pv /tools/lib/perl5/${VER} && +cp -Rv lib/* /tools/lib/perl5/${VER} && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* ${PKGNAME}-* diff --git a/build-scripts/tc-pkgtools.sh b/build-scripts/tc-pkgtools.sh new file mode 100755 index 0000000..3fb41d6 --- /dev/null +++ b/build-scripts/tc-pkgtools.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +export PKGNAME="pkgtools" +cd ${SRC_PKGS}/${PKGNAME} && +for prog in installpkg makepkg removepkg explodepkg \ + pkgdiff upgradepkg; do + install -v -m755 $prog /tools/bin/ +done && + +cd ${SRC_ROOT} diff --git a/build-scripts/tc-sed.sh b/build-scripts/tc-sed.sh new file mode 100755 index 0000000..7723d62 --- /dev/null +++ b/build-scripts/tc-sed.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +export PKGNAME="sed" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-tar.sh b/build-scripts/tc-tar.sh new file mode 100755 index 0000000..8483eeb --- /dev/null +++ b/build-scripts/tc-tar.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +export PKGNAME="tar-1.3" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-tcl.sh b/build-scripts/tc-tcl.sh new file mode 100755 index 0000000..eb5da86 --- /dev/null +++ b/build-scripts/tc-tcl.sh @@ -0,0 +1,26 @@ +#! /bin/bash + +tar xf ${SRC_PKGS}/tcl* && +cd tcl* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building TCL..." && +cd unix && +ac_cv_func_strtod=yes \ +tcl_cv_strtod_buggy=1 \ +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && +chmod -v u+w /tools/lib/libtcl8.6.so && +make install-private-headers && +ln -sv tclsh8.6 /tools/bin/tclsh && + +cd ${SRC_ROOT} && rm -rf tcl* diff --git a/build-scripts/tc-texinfo.sh b/build-scripts/tc-texinfo.sh new file mode 100755 index 0000000..0aabad5 --- /dev/null +++ b/build-scripts/tc-texinfo.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +export PKGNAME="texinfo" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-vim.sh b/build-scripts/tc-vim.sh new file mode 100755 index 0000000..0571133 --- /dev/null +++ b/build-scripts/tc-vim.sh @@ -0,0 +1,23 @@ +#! /bin/bash + +export PKGNAME="vim" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && +export LDFLAGS="-L/tools/lib" && +export CPPFLAGS="-I/tools/include" && +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools \ + --disbale-gui \ + --without-x && +make ${MJ} && make install && unset LDFLAGS CPPFLAGS && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/tc-xz.sh b/build-scripts/tc-xz.sh new file mode 100755 index 0000000..e7b7adb --- /dev/null +++ b/build-scripts/tc-xz.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +export PKGNAME="xz" +tar xf ${SRC_PKGS}/${PKGNAME}* && +cd ${PKGNAME}* && + +export CC="${MLFS_TARGET}-gcc" && +export CXX="${MLFS_TARGET}-g++" && +export AR="${MLFS_TARGET}-ar" && +export AS="${MLFS_TARGET}-as" && +export RANLIB="${MLFS_TARGET}-ranlib" && +export LD="${MLFS_TARGET}-ld" && +export STRIP="${MLFS_TARGET}-strip" && + +echo "Building $PKGNAME..." && +./configure --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools && +make ${MJ} && make install && +cd ${SRC_ROOT} && rm -rf ${PKGNAME}* diff --git a/build-scripts/toolchain.conf b/build-scripts/toolchain.conf new file mode 100755 index 0000000..6306441 --- /dev/null +++ b/build-scripts/toolchain.conf @@ -0,0 +1,22 @@ +#! /bin/bash + +# Auto-build toolchain for MLFS-8.00 +# Please check Build Config section before running script + +#### Build Config +export MLFS_HOST="$(echo $MACHTYPE | \ + sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")" +export MLFS_TARGET="armv7l-mlfs-linux-musleabihf" +export MLFS_ARCH="arm" +export MLFS_CPU="armv7-a+neon-vfpv4" +export MLFS_CPU_ARCH="arm" +export BUILD_ROOT="/mnt/mlfs" +export SRC_ROOT=${BUILD_ROOT}/sources +export SRC_PKGS=${SRC_ROOT}/packages +export SRC_PATCHES=${SRC_ROOT}/patches +export SRC_FILES=${SRC_ROOT}/files +export MJ="-j8" +export CSPEC="--with-tune=cortex-a15.cortex-a7 \ + --with-float=hard \ + --with-abi=aapcs-linux \ + --with-mode=thumb " diff --git a/contrib/MLFS-S6-Bootscripts b/contrib/MLFS-S6-Bootscripts new file mode 160000 index 0000000..bb10543 --- /dev/null +++ b/contrib/MLFS-S6-Bootscripts @@ -0,0 +1 @@ +Subproject commit bb1054343d8a99b96a5b9ceb73d934604ad6ecc0 diff --git a/contrib/mlfs-bash_startup_scripts/.bash_logout b/contrib/mlfs-bash_startup_scripts/.bash_logout new file mode 100644 index 0000000..375164f --- /dev/null +++ b/contrib/mlfs-bash_startup_scripts/.bash_logout @@ -0,0 +1,7 @@ +# Begin ~/.bash_logout +# Written for Beyond Linux From Scratch +# by James Robertson + +# Personal items to perform on logout. + +# End ~/.bash_logout diff --git a/contrib/mlfs-bash_startup_scripts/.bash_profile b/contrib/mlfs-bash_startup_scripts/.bash_profile new file mode 100755 index 0000000..331f7dc --- /dev/null +++ b/contrib/mlfs-bash_startup_scripts/.bash_profile @@ -0,0 +1,8 @@ +if [ -f "$HOME/.bashrc" ] ; then + source $HOME/.bashrc +fi + +if [ -d "$HOME/bin" ] ; then + export PATH=$HOME/bin:$PATH +fi + diff --git a/contrib/mlfs-bash_startup_scripts/.bashrc b/contrib/mlfs-bash_startup_scripts/.bashrc new file mode 100755 index 0000000..4a047f9 --- /dev/null +++ b/contrib/mlfs-bash_startup_scripts/.bashrc @@ -0,0 +1,19 @@ +if [ -f "/etc/bashrc" ] ; then + source /etc/bashrc +fi + +export LANG=en_US.utf8 +#export SUDO_ASKPASS="/usr/libexec/openssh/ssh-askpass" + + +#export XORG_PREFIX="/usr" +#export XORG_CONFIG="--prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-static" +#export PATH=$PATH:/opt/xorg/bin +#export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/xorg/lib/pkgconfig:/opt/xorg/share/pkgconfig +#export ACLOCAL="aclocal -I /opt/xorg/share/aclocal" +export ACLOCAL="aclocal -I /usr/share/aclocal" + +#export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/qt5/lib/pkgconfig +#export PATH=$PATH:/opt/qt5/bin + +export PS1_GIT="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\n\$ " diff --git a/contrib/mlfs-bash_startup_scripts/.profile b/contrib/mlfs-bash_startup_scripts/.profile new file mode 100644 index 0000000..9317dcb --- /dev/null +++ b/contrib/mlfs-bash_startup_scripts/.profile @@ -0,0 +1,11 @@ +# Begin ~/.profile +# Personal environment variables and startup programs. + +if [ -d "$HOME/bin" ] ; then + pathprepend $HOME/bin +fi + +# Set up user specific i18n variables +#export LANG=_.<@modifiers> + +# End ~/.profile diff --git a/contrib/mlfs-bash_startup_scripts/bash_completion.sh b/contrib/mlfs-bash_startup_scripts/bash_completion.sh new file mode 100755 index 0000000..df67815 --- /dev/null +++ b/contrib/mlfs-bash_startup_scripts/bash_completion.sh @@ -0,0 +1,5 @@ +for script in /etc/bash_completion.d/*.sh ; do + if [ -r $script ] ; then + . $script + fi +done diff --git a/contrib/mlfs-bash_startup_scripts/bashrc b/contrib/mlfs-bash_startup_scripts/bashrc new file mode 100644 index 0000000..25cbe03 --- /dev/null +++ b/contrib/mlfs-bash_startup_scripts/bashrc @@ -0,0 +1,15 @@ +alias ls='ls --color=auto' +alias grep='grep --color=auto' + +# Setup a red prompt for root and a green one for users. +RESET="\[\033[0m\]" +NORMAL="\[\e[0m\]" +RED="\[\e[1;31m\]" +GREEN="\[\e[1;32m\]" +if [[ $EUID == 0 ]] ; then + PS1="\A | $RED\u [ $NORMAL\w$RED ]\n# $NORMAL$RESET" + else + PS1="\A | $GREEN\u [ $NORMAL\w$GREEN ]\n\$ $NORMAL$RESET" +fi +unset RED GREEN NORMAL + diff --git a/contrib/mlfs-bash_startup_scripts/dircolors.sh b/contrib/mlfs-bash_startup_scripts/dircolors.sh new file mode 100755 index 0000000..7060776 --- /dev/null +++ b/contrib/mlfs-bash_startup_scripts/dircolors.sh @@ -0,0 +1,12 @@ +if [ -f "/etc/dircolors" ] ; then + eval $(dircolors -b /etc/dircolors) +fi + +if [ -f "$HOME/.dircolors" ] ; then + eval $(dircolors -b $HOME/.dircolors) +fi + +alias ls='ls --color=auto' +alias grep='grep --color=auto' + + diff --git a/contrib/mlfs-bash_startup_scripts/extrapaths.sh b/contrib/mlfs-bash_startup_scripts/extrapaths.sh new file mode 100755 index 0000000..a60c736 --- /dev/null +++ b/contrib/mlfs-bash_startup_scripts/extrapaths.sh @@ -0,0 +1,15 @@ + +if [ -d /usr/local/lib/pkgconfig ] ; then + export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig +fi + +if [ -d /usr/local/bin ] ; then + export PATH=/usr/local/bin:$PATH +fi + +if [ -d /usr/local/sbin -a $EUID -eq 0 ] ; then + export PATH=/usr/local/sbin:$PATH +fi + +export MANPATH=/usr/share/man +export INFOPATH=/usr/share/info diff --git a/contrib/mlfs-bash_startup_scripts/i18n.sh b/contrib/mlfs-bash_startup_scripts/i18n.sh new file mode 100755 index 0000000..3fd68ef --- /dev/null +++ b/contrib/mlfs-bash_startup_scripts/i18n.sh @@ -0,0 +1 @@ +export=en_US.utf8 diff --git a/contrib/mlfs-bash_startup_scripts/inputrc b/contrib/mlfs-bash_startup_scripts/inputrc new file mode 100644 index 0000000..3f3cf46 --- /dev/null +++ b/contrib/mlfs-bash_startup_scripts/inputrc @@ -0,0 +1,41 @@ +# Begin /etc/inputrc +# Modified by Chris Lynn + +# Allow the command prompt to wrap to the next line +set horizontal-scroll-mode Off + +# Enable 8bit input +set meta-flag On +set input-meta On + +# Turns off 8th bit stripping +set convert-meta Off + +# Keep the 8th bit for display +set output-meta On + +# none, visible or audible +set bell-style none + +# All of the following map the escape sequence of the value +# contained in the 1st argument to the readline specific functions +"\eOd": backward-word +"\eOc": forward-word + +# for linux console +"\e[1~": beginning-of-line +"\e[4~": end-of-line +"\e[5~": beginning-of-history +"\e[6~": end-of-history +"\e[3~": delete-char +"\e[2~": quoted-insert + +# for xterm +"\eOH": beginning-of-line +"\eOF": end-of-line + +# for Konsole +"\e[H": beginning-of-line +"\e[F": end-of-line + +# End /etc/inputrc diff --git a/contrib/mlfs-bash_startup_scripts/profile b/contrib/mlfs-bash_startup_scripts/profile new file mode 100755 index 0000000..357de2f --- /dev/null +++ b/contrib/mlfs-bash_startup_scripts/profile @@ -0,0 +1,38 @@ +# Setup a red prompt for root and a green one for users. +RESET="\[\033[0m\]" +NORMAL="\[\e[0m\]" +RED="\[\e[1;31m\]" +GREEN="\[\e[1;32m\]" +if [[ $EUID == 0 ]] ; then + PS1="\A | $RED\u [ $NORMAL\w$RED ]\n# $NORMAL$RESET" + else + PS1="\A | $GREEN\u [ $NORMAL\w$GREEN ]\n\$ $NORMAL$RESET" +fi +unset RED GREEN NORMAL + +export PATH=/bin:/usr/bin +export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkconfig + +#if root, add paths and remove history +if [ $EUID -eq 0 ] ; then + export PATH=/sbin:/usr/sbin:$PATH + unset HISTFILE +fi + +# Setup some environment variables +export HISTSIZE=1000 +export HISTIGNORE="&:[bf]g:exit" + +#Set some defaultsfor graphical systems +export XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/share/} +export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS:-/etc/xdg/} +export XDG_RUNTIME_DIRS=${XDG_RUNTIME_DIRS:-/tmp/-$USER} + + +#Run script ins /etc/profile.d +for script in /etc/profile.d/*.sh ; do + if [ -r $script ] ; then + . $script + fi +done + diff --git a/contrib/mlfs-bash_startup_scripts/readline.sh b/contrib/mlfs-bash_startup_scripts/readline.sh new file mode 100755 index 0000000..816d7c1 --- /dev/null +++ b/contrib/mlfs-bash_startup_scripts/readline.sh @@ -0,0 +1,5 @@ +# Setup the INPUTRC environment variable. +if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] ; then + INPUTRC=/etc/inputrc +fi +export INPUTRC diff --git a/contrib/mlfs-bash_startup_scripts/umask.sh b/contrib/mlfs-bash_startup_scripts/umask.sh new file mode 100755 index 0000000..9073b35 --- /dev/null +++ b/contrib/mlfs-bash_startup_scripts/umask.sh @@ -0,0 +1,5 @@ +if [ "$(id -gn)" = "$(id -un)" -a $EUID -gt 99 ] ; then + umask 002 +else + umask 022 +fi diff --git a/contrib/refind-bin-0.12.0.tar.xz b/contrib/refind-bin-0.12.0.tar.xz deleted file mode 100644 index 0f8f4b8..0000000 Binary files a/contrib/refind-bin-0.12.0.tar.xz and /dev/null differ diff --git a/doc/003-Cross-Tools-GCC-Static b/doc/003-Cross-Tools-GCC-Static deleted file mode 100755 index 9574732..0000000 --- a/doc/003-Cross-Tools-GCC-Static +++ /dev/null @@ -1,39 +0,0 @@ -# Cross-Tools: GCC STATIC -# Build and install as mlfs -# Source: http://ftp.gnu.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz - -# GCC now requires the GMP, MPFR and MPC packages to build. -# Unpack them in-tree. -tar -xf ../mpfr-4.1.0.tar.xz -mv -v mpfr-4.1.0 mpfr -tar -xf ../gmp-6.2.0.tar.xz -mv -v gmp-6.2.0 gmp -tar -xf ../mpc-1.1.0.tar.gz -mv -v mpc-1.1.0 mpc - -# The GCC documentation recommends building GCC in -# a dedicated build directory -mkdir -v build && cd build - -# Configure source -CFLAGS='-g0 -O0' \ -CXXFLAGS='-g0 -O0' \ -../configure \ - --prefix=/cross-tools --build=${MLFS_HOST} \ - --host=${MLFS_HOST} --target=${MLFS_TARGET} \ - --with-sysroot=/cross-tools/${MLFS_TARGET} \ - --disable-nls --with-newlib \ - --disable-libitm --disable-libvtv \ - --disable-libssp --disable-shared \ - --disable-libgomp --without-headers \ - --disable-threads --disable-multilib \ - --disable-libatomic --disable-libstdcxx \ - --enable-languages=c --disable-libquadmath \ - --disable-libsanitizer --with-arch=${MLFS_CPU} \ - --disable-decimal-float --enable-clocale=generic - -# Build only the mininum -make all-gcc all-target-libgcc - -# Install -make install-gcc install-target-libgcc diff --git a/doc/013-Tool_Chain-Libstdcxx b/doc/013-Tool_Chain-Libstdcxx deleted file mode 100755 index 76e10a2..0000000 --- a/doc/013-Tool_Chain-Libstdcxx +++ /dev/null @@ -1,40 +0,0 @@ -# Tool Chain: Libstdc++ 10.2.0 -# Source: http://ftp.gnu.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz -# Build and install as mlfs - -# Set up environment for cross-compile -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Apply patches [from void-linux] .. works for version 10.2.0 -patch -Np0 -i ../patches/gcc-9.1.0-void/ada-shared.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/fix-cxxflags-passing.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/fix-musl-execinfo.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/libgcc-musl-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/musl-ada.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/no-stack_chk_fail_local.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/non-nullness.patch -# Fix CET for cross-compiling -#patch -Np1 -i ../patches/gcc-10.1.0-Enable-CET-in-cross-compiler-if-possible.patch -# Fixed in 10.2.0 - -# Configure source -mkdir -v build && cd build -../libstdc++-v3/configure \ - --target=${MLFS_TARGET} \ - --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --disable-multilib \ - --disable-nls \ - --disable-libstdcxx-threads \ - --disable-libstdcxx-pch \ - --with-gxx-include-dir=/tools/${MLFS_TARGET}/include/c++/10.2.0 - -# Build & install to toolchain -make && make install diff --git a/doc/017-Tool_Chain-M4 b/doc/017-Tool_Chain-M4 deleted file mode 100755 index 37fe390..0000000 --- a/doc/017-Tool_Chain-M4 +++ /dev/null @@ -1,20 +0,0 @@ -# Toolchain: M4-1.4.18 -# Source: http://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --prefix=/tools \ - --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} - -# Build and install to toolchain -make && make install diff --git a/doc/020-Tool_Chain-Bison b/doc/020-Tool_Chain-Bison deleted file mode 100755 index 9e5d740..0000000 --- a/doc/020-Tool_Chain-Bison +++ /dev/null @@ -1,20 +0,0 @@ -# Toolchain: Bison 3.7.1 -# Source: http://ftp.gnu.org/gnu/bison/bison-3.7.1.tar.xz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools - -# Build and install to toolchain -make && make install diff --git a/doc/023-Tool_Chain-Diffutils b/doc/023-Tool_Chain-Diffutils deleted file mode 100755 index cda88fa..0000000 --- a/doc/023-Tool_Chain-Diffutils +++ /dev/null @@ -1,20 +0,0 @@ -# Toolchain: Diffutils 3.7 -# Source: http://ftp.gnu.org/gnu/diffutils/diffutils-3.7.tar.xz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools - -# Build and install to toolchain -make && make install diff --git a/doc/024-Tool_Chain-File b/doc/024-Tool_Chain-File deleted file mode 100755 index d45cc5b..0000000 --- a/doc/024-Tool_Chain-File +++ /dev/null @@ -1,23 +0,0 @@ -# Toolchain: File 5.39 -# Source: ftp://ftp.astron.com/pub/file/file-5.39.tar.gz -# Build and install as mlfs -# Must use same version for cross-tools, tools, -# and final system. - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools - -# Build and install to toolchain -make && make install - diff --git a/doc/025-Tool_Chain-Findutils b/doc/025-Tool_Chain-Findutils deleted file mode 100755 index ea237fc..0000000 --- a/doc/025-Tool_Chain-Findutils +++ /dev/null @@ -1,24 +0,0 @@ -# Toolchain: Findutils - 4.7.0 -# Source: http://ftp.gnu.org/gnu/findutils/findutils-4.7.0.tar.xz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' gl/lib/*.c -sed -i '/unistd/a #include ' gl/lib/mountlist.c -echo "#define _IO_IN_BACKUP 0x100" >> gl/lib/stdio-impl.h - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools - -# Build and install to toolchain -make && make install diff --git a/doc/026-Tool_Chain-Gawk b/doc/026-Tool_Chain-Gawk deleted file mode 100755 index e109307..0000000 --- a/doc/026-Tool_Chain-Gawk +++ /dev/null @@ -1,20 +0,0 @@ -# Toolchain: Gawk 5.1.0 -# Source: http://ftp.gnu.org/gnu/gawk/gawk-5.1.0.tar.xz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools - -# Build and install to toolchain -make && make install diff --git a/doc/027-Tool_Chain-Gettext b/doc/027-Tool_Chain-Gettext deleted file mode 100755 index 198c243..0000000 --- a/doc/027-Tool_Chain-Gettext +++ /dev/null @@ -1,24 +0,0 @@ -# Toolchain: Gettext 0.21 -# Source: http://ftp.gnu.org/gnu/gettext/gettext-0.21.tar.xz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --disable-shared -# Build -make - -# Install the msgfmt, msgmerge and xgettext programs to toolchain -cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /tools/bin - diff --git a/doc/028-Tool_Chain-Grep b/doc/028-Tool_Chain-Grep deleted file mode 100755 index 85d1044..0000000 --- a/doc/028-Tool_Chain-Grep +++ /dev/null @@ -1,20 +0,0 @@ -# Toolchain: Grep 3.4 -# Source: http://ftp.gnu.org/gnu/grep/grep-3.4.tar.xz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools - -# Install to toolchain -make && make install diff --git a/doc/029-Tool_Chain-Gzip b/doc/029-Tool_Chain-Gzip deleted file mode 100755 index 6dc0f30..0000000 --- a/doc/029-Tool_Chain-Gzip +++ /dev/null @@ -1,20 +0,0 @@ -# Toolchain: Gzip 1.10 -# Source: http://ftp.gnu.org/gnu/gzip/gzip-1.10.tar.xz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools - -# Install to toolchain -make && make install diff --git a/doc/030-Tool_Chain-Make b/doc/030-Tool_Chain-Make deleted file mode 100755 index b90a177..0000000 --- a/doc/030-Tool_Chain-Make +++ /dev/null @@ -1,21 +0,0 @@ -# Toolchain: Make 4.3 -# Source: http://ftp.gnu.org/gnu/make/make-4.3.tar.gz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --without-guile - -# Install to toolchain -make && make install diff --git a/doc/031-Tool_Chain-Patch b/doc/031-Tool_Chain-Patch deleted file mode 100755 index ca047e1..0000000 --- a/doc/031-Tool_Chain-Patch +++ /dev/null @@ -1,20 +0,0 @@ -# Toolchain: Patch 2.7.6 -# Source: http://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools - -# Install to toolchain -make && make install diff --git a/doc/032-Tool_Chain-Perl b/doc/032-Tool_Chain-Perl deleted file mode 100755 index 8f3c07d..0000000 --- a/doc/032-Tool_Chain-Perl +++ /dev/null @@ -1,37 +0,0 @@ -# Toolchain: Perl 5.32.0 -# Source: https://www.cpan.org/src/5.0/perl-5.32.0.tar.xz -# Source: https://github.com/arsv/perl-cross/releases/download/1.3.4/perl-cross-1.3.4.tar.gz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Use perl-cross, by copying over perl source -# ignore warnings by mv -cd .. && -tar xf perl-cross-1.3.4.tar.gz -cd perl-5.32.0 && -mv -v ../perl-cross-1.3.4/* ./ -mv -v ../perl-cross-1.3.4/utils/* utils/ - -# Apply patch from Alpine to fix locale.c errors -# in programs such as rxvt-unicode -patch -p1 < ../patches/perl-5.30-alpine/musl-locale.patch - -# Configure source -./configure --prefix=/tools \ - --target=${MLFS_TARGET} - -# Build -make - -# Only a few of the utilities and libraries need to be installed to toolchain -cp -v perl cpan/podlators/scripts/pod2man /tools/bin -mkdir -pv /tools/lib/perl5/5.32.0 -cp -Rv lib/* /tools/lib/perl5/5.32.0 diff --git a/doc/033-Tool_Chain-Sed b/doc/033-Tool_Chain-Sed deleted file mode 100755 index 01c9832..0000000 --- a/doc/033-Tool_Chain-Sed +++ /dev/null @@ -1,20 +0,0 @@ -# Toolchain: Sed 4.8 -# Source: http://ftp.gnu.org/gnu/sed/sed-4.8.tar.xz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools - -# Build and install to toolchain -make && make install diff --git a/doc/034-Tool_Chain-Tar b/doc/034-Tool_Chain-Tar deleted file mode 100755 index b1f7986..0000000 --- a/doc/034-Tool_Chain-Tar +++ /dev/null @@ -1,20 +0,0 @@ -# Toolchain: Tar 1.32 -# Source: http://ftp.gnu.org/gnu/tar/tar-1.32.tar.xz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools - -# Build and install to toolchain -make && make install diff --git a/doc/035-Tool_Chain-Texinfo b/doc/035-Tool_Chain-Texinfo deleted file mode 100755 index e16eefa..0000000 --- a/doc/035-Tool_Chain-Texinfo +++ /dev/null @@ -1,21 +0,0 @@ -# Toolchain: Texinfo 6.7 -# Source: http://ftp.gnu.org/gnu/texinfo/texinfo-6.7.tar.xz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools - -# Build and install to toolchain -make && make install - diff --git a/doc/036-Tool_Chain-Xz b/doc/036-Tool_Chain-Xz deleted file mode 100755 index 3eeec90..0000000 --- a/doc/036-Tool_Chain-Xz +++ /dev/null @@ -1,20 +0,0 @@ -# Toolchain: Xz 5.2.5 -# Source: https://tukaani.org/xz/xz-5.2.5.tar.xz -# Build and install as mlfs - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools - -# Build and Install to toolchain -make && make install diff --git a/doc/037-Tool_Chain-Lzip b/doc/037-Tool_Chain-Lzip deleted file mode 100755 index 28c1afd..0000000 --- a/doc/037-Tool_Chain-Lzip +++ /dev/null @@ -1,24 +0,0 @@ -# Toolchain: Lzip 1.21 -# Source: http://download.savannah.gnu.org/releases/lzip/lzip-1.21.tar.gz -# Build and install as mlfs - - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Configure source -# configure doesn't accept --host and --build flags -./configure --prefix=/tools - -# configure doesn't update g++ and tries to build with host g++ -# run sed to fix it -sed -i 's/CXX = g++/CXX = ${MLFS_TARGET}-g++/g' Makefile - -# Build and Install to toolchain -make && make install diff --git a/doc/038-Tool_Chain-Nano b/doc/038-Tool_Chain-Nano deleted file mode 100755 index 8602a8a..0000000 --- a/doc/038-Tool_Chain-Nano +++ /dev/null @@ -1,29 +0,0 @@ -# Toolchain: Nano 5.1 -# Source: https://www.nano-editor.org/dist/v5/nano-5.1.tar.xz -# Build and install as mlfs -# Optional package: Text editor for convenience or trouble shooting - -# Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" - -# Set flags, so ncurses header can be found in /tools/include -export LDFLAGS="-L/tools/lib" -export CPPFLAGS="-I/tools/include" - -# Configure source -./configure --build=${MLFS_HOST} \ - --host=${MLFS_TARGET} \ - --prefix=/tools \ - --enable-tiny - -# Compile and install -make && make install - -unset LDFLAGS CPPFLAGS - diff --git a/doc/045-Final_System-Man_pages b/doc/045-Final_System-Man_pages deleted file mode 100755 index 308727e..0000000 --- a/doc/045-Final_System-Man_pages +++ /dev/null @@ -1,5 +0,0 @@ -# Final System: Man Pages 5.08 -# Source: https://www.kernel.org/pub/linux/docs/man-pages/man-pages-5.08.tar.xz -# This section is done in Chroot environment - -make install diff --git a/doc/046-Final_System-Musl b/doc/046-Final_System-Musl deleted file mode 100755 index 11c0c02..0000000 --- a/doc/046-Final_System-Musl +++ /dev/null @@ -1,56 +0,0 @@ -# Final System: Musl Libc -# Source: https://www.musl-libc.org/releases/musl-1.2.1.tar.gz -# This section is done in Chroot environment - -# Apply a patch to prevent a crash with a NULL pointer -# dereference when dcngettext() is called with -# NULL msgid[12] arguments. -patch -Np0 -i ../patches/musl-1.2.1-void/mo_lookup.patch - -# For i686(32 bit), there is a rounding error that -# causes fonts to not display for SeaMonkey and -# Palemoon browsers: -patch -Np1 -i ../patches/musl-1.2.1/i686-fix-rounding.patch - -# Configure -./configure --prefix=/usr -disable-gcc-wrapper - -# Build and install -make && make install - -# provide minimal libssp_nonshared.a so we don't need libssp from gcc -/tools/bin/$(uname -m)-mlfs-*-gcc -fpie -c ../files/__stack_chk_fail_local.c -o __stack_chk_fail_local.o -/tools/bin/$(uname -m)-mlfs-*-gcc-ar r libssp_nonshared.a __stack_chk_fail_local.o -cp -v libssp_nonshared.a /usr/lib/ - -case $(uname -m) in - x86_64) export ARCH="x86_64" - ;; - i686) export ARCH="i386" - ;; - arm*) export ARCH="arm" - ;; - aarch64) export ARCH="aarch64" - ;; -esac - -# Create link for ldd: -ln -sv /lib/ld-musl-$ARCH.so.1 /bin/ldd - -# Create config for dynamic library loading: - -cat > /etc/ld-musl-$ARCH.path << "EOF" -/lib -/usr/local/lib -/usr/lib -EOF - -unset ARCH - -# Fake ldconfig -ln -s /bin/true /usr/bin/ldconfig - -# If desired, install legacy compatability headers: -cp -v ../files/musl-legacy-compat-void/cdefs.h /usr/include/sys/ -cp -v ../files/musl-legacy-compat-void/queue.h /usr/include/sys/ -cp -v ../files/musl-legacy-compat-void/tree.h /usr/include/sys/ diff --git a/doc/048-Final_System-Time_Zone_Utilities b/doc/048-Final_System-Time_Zone_Utilities deleted file mode 100644 index f947053..0000000 --- a/doc/048-Final_System-Time_Zone_Utilities +++ /dev/null @@ -1,26 +0,0 @@ -# Final System: TimeZone Utilites & Data -# Source: https://data.iana.org/time-zones/releases/tzdb-2020a.tar.lz -# This section is done in Chroot environment -# https://www.iana.org/time-zones - -# Build -make TZDIR=/usr/share/zoneinfo - -# Install tools -cp -v zic zdump /usr/sbin -cp -v tzselect /usr/bin - -# Install timezone data -mkdir -pv /usr/share/zoneinfo/{posix,right} -install -m444 -t /usr/share/zoneinfo iso3166.tab zone1970.tab zone.tab -export timezones="africa antarctica asia australasia europe northamerica \ - southamerica pacificnew etcetera backward systemv factory" -zic -y ./yearistype -d /usr/share/zoneinfo ${timezones} -zic -y ./yearistype -d /usr/share/zoneinfo/posix ${timezones} -zic -y ./yearistype -d /usr/share/zoneinfo/right -L leapseconds ${timezones} -zic -y ./yearistype -d /usr/share/zoneinfo -p America/New_York -unset timezones - -# use tzselect to determine -cp -v /usr/share/zoneinfo/ /etc/localtime - diff --git a/doc/049-Final-System-Argp-standalone b/doc/049-Final-System-Argp-standalone deleted file mode 100644 index 62ae04d..0000000 --- a/doc/049-Final-System-Argp-standalone +++ /dev/null @@ -1,16 +0,0 @@ -# Final System: Argp-Standalone -# Source: http://www.lysator.liu.se/~nisse/misc/argp-standalone-1.3.tar.gz -# This section is done in Chroot environment - -# Patch source to compile under Musl libc -patch -Np0 -i ../patches/argp-standalone-1.3-void-fix-no_use_inline.patch - -# Configure source -CFLAGS=" -fPIC" ./configure --prefix=/usr --disable-static - -# Build -make - -# Install -cp -v libargp.a /usr/lib/ -cp -v argp.h /usr/include/ diff --git a/doc/051-Final-System-File b/doc/051-Final-System-File deleted file mode 100644 index 1f49f38..0000000 --- a/doc/051-Final-System-File +++ /dev/null @@ -1,9 +0,0 @@ -# Final System: File 5.39 -# Source: ftp://ftp.astron.com/pub/file/file-5.39.tar.gz -# This section is done in Chroot environment - -# Configure -./configure --prefix=/usr - -# Build and install -make && make install diff --git a/doc/062-Final_System-Pkg_config b/doc/062-Final_System-Pkg_config deleted file mode 100644 index a1969e1..0000000 --- a/doc/062-Final_System-Pkg_config +++ /dev/null @@ -1,12 +0,0 @@ -# Final System: Pkg-Config -# Source: https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz -# This section is done in Chroot environment - -# Configure source -./configure --prefix=/usr \ - --with-internal-glib \ - --disable-host-tool \ - --docdir=/usr/share/doc/pkg-config-0.29.2 - -# Build and Install -make && make install diff --git a/doc/068-Final_System-PSMisc b/doc/068-Final_System-PSMisc deleted file mode 100644 index 1e8c829..0000000 --- a/doc/068-Final_System-PSMisc +++ /dev/null @@ -1,7 +0,0 @@ -# Final System: Psmisc -# Source: https://sourceforge.net/projects/psmisc/files/psmisc/psmisc-23.2.tar.xz -# This section is done in Chroot environment - -./configure --prefix=/usr && make && make install -mv -v /usr/bin/fuser /bin -mv -v /usr/bin/killall /bin diff --git a/doc/070-Final_System-Bison b/doc/070-Final_System-Bison deleted file mode 100644 index 1e06d70..0000000 --- a/doc/070-Final_System-Bison +++ /dev/null @@ -1,7 +0,0 @@ -# Final System: Bison 3.7.1 -# Source: http://ftp.gnu.org/gnu/bison/bison-3.7.1.tar.xz -# This section is done in Chroot environment - -./configure --prefix=/usr --docdir=/usr/share/doc/bison-3.7.1 - -make && make install diff --git a/doc/074-Final_System-Libtool b/doc/074-Final_System-Libtool deleted file mode 100644 index 5c5d2ad..0000000 --- a/doc/074-Final_System-Libtool +++ /dev/null @@ -1,6 +0,0 @@ -# Final System: Libtool 2.4.6 -# Source: http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz -# This section is done in Chroot environment - -./configure --prefix=/usr && make && make install - diff --git a/doc/082-Final_System-Autoconf b/doc/082-Final_System-Autoconf deleted file mode 100644 index c2eaa3b..0000000 --- a/doc/082-Final_System-Autoconf +++ /dev/null @@ -1,8 +0,0 @@ -# Final System: Autoconf 2.69 -# Source: http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xz -# This section is done in Chroot environment - -patch -Np1 -i ../patches/autoconf-2.69-musl.patch - -./configure --prefix=/usr -make && make install diff --git a/doc/086-Final_System-Musl_rpmatch b/doc/086-Final_System-Musl_rpmatch deleted file mode 100644 index d4071da..0000000 --- a/doc/086-Final_System-Musl_rpmatch +++ /dev/null @@ -1,7 +0,0 @@ -# Final System: Musl-rpmatch -# Source: https://github.com/pullmoll/musl-rpmatch/archive/v1.0.tar.gz -# This section is done in Chroot environment - -./bootstrap.sh -./configure --prefix=/usr --enable-shared --enable-static -make && make install diff --git a/doc/089-Final_System-Gettext b/doc/089-Final_System-Gettext deleted file mode 100644 index cea8a96..0000000 --- a/doc/089-Final_System-Gettext +++ /dev/null @@ -1,29 +0,0 @@ -# Final System: Gettext -# Source: http://ftp.gnu.org/gnu/gettext/gettext-0.21.tar.xz -# This section is done in Chroot environment - -# Suppress two invocations of test-lock which on some machines can loop forever: -sed -i '/^TESTS =/d' gettext-runtime/tests/Makefile.in && -sed -i 's/test-lock..EXEEXT.//' gettext-tools/gnulib-tests/Makefile.in - -# Configure .. -./configure --prefix=/usr \ - --disable-static \ - --with-included-gettext \ - --enable-threads=posix \ - --disable-rpath \ - --docdir=/usr/share/doc/gettext-0.21 gl_cv_func_gettimeofday_clobber=no && - -# Build -make - -# Fix conflict with musl before installing by first backing up header... -mv -v /usr/include/libintl.h /usr/include/libintl.h.musl - -# Install -make install - -# Move file to avoid conflict -mkdir -v /usr/include/gettext -mv -v /usr/include/libintl.h /usr/include/gettext -mv -v /usr/include/libintl.h.musl /usr/include/libintl.h diff --git a/doc/090-Final_System-libelf b/doc/090-Final_System-libelf deleted file mode 100644 index f026e02..0000000 --- a/doc/090-Final_System-libelf +++ /dev/null @@ -1,31 +0,0 @@ -# Final System: Libelf -# Source: https://sourceware.org/ftp/elfutils/0.180/elfutils-0.180.tar.bz2 -# This section is done in Chroot environment - -# Add missing files -cp -vr ../files/elfutils-void/error.h lib/ -cp -vr ../files/elfutils-void/error.h src/ - -# Patch source for musl -patch -Np0 -i ../patches/elfutils-void/fix-aarch64_fregs.patch -patch -Np0 -i ../patches/elfutils-void/musl-cdefs.patch -patch -Np0 -i ../patches/elfutils-void/musl-fts-obstack.patch -patch -Np0 -i ../patches/elfutils-void/musl-macros.patch -patch -Np0 -i ../patches/elfutils-void/musl-qsort_r.patch -patch -Np0 -i ../patches/elfutils-void/musl-strerror_r.patch -patch -Np0 -i ../patches/elfutils-void/musl-strndupa.patch -patch -Np0 -i ../patches/elfutils-void/fix-uninitialized.patch -patch -Np0 -i ../patches/elfutils-void/musl-asm_ptrace_h.patch - -# Re-create configure script -autoreconf -ifv - -# Configure source & build -CFLAGS="-Wno-error -Wno-error=null-dereference" \ -./configure --prefix=/usr --disable-debuginfod && make - -# Install library -make -C libelf install - -# Install pkgconfig file for library -install -vm644 config/libelf.pc /usr/lib/pkgconfig diff --git a/doc/001-Cross-Tools-Kernel_Headers b/doc/1-cross-tools/1-kernel_headers old mode 100755 new mode 100644 similarity index 77% rename from doc/001-Cross-Tools-Kernel_Headers rename to doc/1-cross-tools/1-kernel_headers index 8fba3eb..6ebb37c --- a/doc/001-Cross-Tools-Kernel_Headers +++ b/doc/1-cross-tools/1-kernel_headers @@ -1,6 +1,5 @@ # Cross-Tools: Kernel Headers # Build & install as user mlfs -# Source: https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.1.tar.xz # Clean sources make mrproper @@ -9,10 +8,15 @@ make mrproper make ARCH=${MLFS_ARCH} headers_check # Install -# For kernel up to 5.2.x: + +## For kernel up to 5.2.x: # make ARCH=${MLFS_ARCH} INSTALL_HDR_PATH=/cross-tools/${MLFS_TARGET} headers_install -# For kernels 5.3.x: + +## For kernels 5.3.x+: make ARCH=${MLFS_ARCH} headers mkdir -pv /cross-tools/${MLFS_TARGET}/include + cp -rv usr/include/* /cross-tools/${MLFS_TARGET}/include + +# Remove unnecessary Makefile rm -v /cross-tools/${MLFS_TARGET}/include/Makefile diff --git a/doc/002-Cross-Tools-Binutils b/doc/1-cross-tools/2-bintuils old mode 100755 new mode 100644 similarity index 88% rename from doc/002-Cross-Tools-Binutils rename to doc/1-cross-tools/2-bintuils index 95c02d3..61c127a --- a/doc/002-Cross-Tools-Binutils +++ b/doc/1-cross-tools/2-bintuils @@ -1,6 +1,5 @@ # Cross-Tools: Binutils # Build and install as mlfs -# source: http://ftp.gnu.org/gnu/binutils/binutils-2.34.tar.xz # Create build directory in-tree mkdir -v build && cd build diff --git a/build-scripts/archive/01-cross/02-gcc-static b/doc/1-cross-tools/3-gcc_static similarity index 54% rename from build-scripts/archive/01-cross/02-gcc-static rename to doc/1-cross-tools/3-gcc_static index fd2eebc..e8dbd0e 100644 --- a/build-scripts/archive/01-cross/02-gcc-static +++ b/doc/1-cross-tools/3-gcc_static @@ -1,24 +1,20 @@ -#! /bin/bash +# Cross-Tools: GCC STATIC +# Build and install as mlfs +# GCC now requires the GMP, MPFR and MPC packages to build. +# Unpack them in-tree. +xz -cd ../pkgs/mpfr-4.1.0.tar.xz | tar -xf - +mv -v mpfr-4.1.0 mpfr +xz -cd ../pkgs/gmp-6.2.1.tar.xz | tar -xf - +mv -v gmp-6.2.1 gmp +gunzip -cd ../pkgs/mpc-1.2.1.tar.gz | tar -xf - +mv -v mpc-1.2.1 mpc -if [ "$1" != "" ]; then - export MJ="-j$1" -else - export MJ="" -fi -export PACKAGE=$(basename -- "$PWD") -read -p "Number of make jobs: $MJ" && - -echo "[ $PACKAGE ] Adding auxillary sources ..." && -tar -xf ../mpfr-4.0.2.tar.xz -mv -v mpfr-4.0.2 mpfr -tar -xf ../gmp-6.1.2.tar.xz -mv -v gmp-6.1.2 gmp -tar -xf ../mpc-1.1.0.tar.gz -mv -v mpc-1.1.0 mpc - +# The GCC documentation recommends building GCC in +# a dedicated build directory mkdir -v build && cd build -echo "[ $PACKAGE ] Configuring ..." && + +# Configure source CFLAGS='-g0 -O0' \ CXXFLAGS='-g0 -O0' \ ../configure \ @@ -33,8 +29,10 @@ CXXFLAGS='-g0 -O0' \ --disable-libatomic --disable-libstdcxx \ --enable-languages=c --disable-libquadmath \ --disable-libsanitizer --with-arch=${MLFS_CPU} \ - --disable-decimal-float --enable-clocale=generic -read -p "[ $PACKAGE Static] Compile?" && -time { make all-gcc all-target-libgcc $MJ ; } && -read -p "[ $PACKAGE Static] Install?" + --disable-decimal-float --enable-clocale=generic + +# Build only the mininum +make all-gcc all-target-libgcc + +# Install make install-gcc install-target-libgcc diff --git a/doc/004-Cross-Tools-Musl b/doc/1-cross-tools/4-musl old mode 100755 new mode 100644 similarity index 69% rename from doc/004-Cross-Tools-Musl rename to doc/1-cross-tools/4-musl index 0901ffc..3164bb3 --- a/doc/004-Cross-Tools-Musl +++ b/doc/1-cross-tools/4-musl @@ -1,6 +1,5 @@ # Cross-Tools: Musl # Build and install as mlfs -# source: https://www.musl-libc.org/releases/musl-1.2.1.tar.gz # Configure source for cross build ./configure \ @@ -26,6 +25,10 @@ case $(uname -m) in ;; esac +# Fix link +rm -vf /cross-tools/lib/ld-musl* && +ln -sv libc.so /cross-tools/lib/ld-musl-${ARCH}.so.1 + # Create link for ldd: ln -sv ../lib/ld-musl-$ARCH.so.1 /cross-tools/bin/ldd @@ -36,4 +39,10 @@ cat > /cross-tools/etc/ld-musl-$ARCH.path << "EOF" /tools/lib EOF -unset ARCH +# For arm +case $(uname -m) in + arm*) ln -sv libc.so /cross-tools/lib/ld-musl-${ARCH2}.so.1 + cp -v /cross-tools/etc/ld-musl-$ARCH.path \ + /cross-tools/etc/ld-musl-$ARCH2.path ;; +esac +unset ARCH ARCH2 diff --git a/doc/005-Cross-Tools-GCC-Final b/doc/1-cross-tools/5-gcc_final old mode 100755 new mode 100644 similarity index 54% rename from doc/005-Cross-Tools-GCC-Final rename to doc/1-cross-tools/5-gcc_final index 2c0eb55..e36e55c --- a/doc/005-Cross-Tools-GCC-Final +++ b/doc/1-cross-tools/5-gcc_final @@ -1,24 +1,16 @@ -# Cross-Tools: GCC-10.2.0 Final -# Source: http://ftp.gnu.org/gnu/gcc/gcc-10.1.0/gcc-10.2.0.tar.xz +# Cross-Tools: GCC Final # Build and install as mlfs # Additional sources to add as GCC requires them -tar -xf ../mpfr-4.1.0.tar.xz +xz -cd ../pkgs/mpfr-4.1.0.tar.xz | tar -xf - mv -v mpfr-4.1.0 mpfr -tar -xf ../gmp-6.2.0.tar.xz -mv -v gmp-6.2.0 gmp -tar -xf ../mpc-1.1.0.tar.gz -mv -v mpc-1.1.0 mpc +xz -cd ../pkgs/gmp-6.2.1.tar.xz | tar -xf - +mv -v gmp-6.2.1 gmp +gunzip -cd ../pkgs/mpc-1.2.1.tar.gz | tar -xf - +mv -v mpc-1.2.1 mpc -# Apply patches [from void-linux] -patch -Np0 -i ../patches/gcc-9.1.0-void/ada-shared.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/fix-cxxflags-passing.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/fix-musl-execinfo.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/libgcc-musl-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/musl-ada.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/no-stack_chk_fail_local.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/non-nullness.patch -patch -Np1 -i ../patches/gcc-10.1.0-Enable-CET-in-cross-compiler-if-possible.patch +# Apply patches [from Alpine linux] +bash ../patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh case $(uname -m) in x86_64) diff --git a/doc/006-Cross-Tools-File b/doc/1-cross-tools/6-file old mode 100755 new mode 100644 similarity index 76% rename from doc/006-Cross-Tools-File rename to doc/1-cross-tools/6-file index 2f4f555..9751c7a --- a/doc/006-Cross-Tools-File +++ b/doc/1-cross-tools/6-file @@ -1,10 +1,8 @@ # Cross-Tools: File # Build and install as mlfs -# ftp://ftp.astron.com/pub/file/file-5.39.tar.gz # Configure source ./configure --prefix=/cross-tools --disable-libseccomp # Build and install make && make install - diff --git a/doc/103-Final_System-Grub b/doc/103-Final_System-Grub deleted file mode 100644 index 993d6e0..0000000 --- a/doc/103-Final_System-Grub +++ /dev/null @@ -1,21 +0,0 @@ -# Final System: Grub -# Source: https://ftp.gnu.org/gnu/grub/grub-2.04.tar.xz -# This section is done in Chroot environment - -# for BIOS-based PCs: -#./configure --prefix=/usr \ -# --sbindir=/sbin \ -# --sysconfdir=/etc \ -# --disable-efiemu \ -# --disable-werror - -# for UEFI-based PCs: -./configure --prefix=/usr \ - --target=x86_64 \ - --with-platform=efi \ - --sbindir=/sbin \ - --sysconfdir=/etc \ - --disable-werror - -make && make install - diff --git a/doc/106-Final_System-IProute2 b/doc/106-Final_System-IProute2 deleted file mode 100644 index 0ce4ec0..0000000 --- a/doc/106-Final_System-IProute2 +++ /dev/null @@ -1,11 +0,0 @@ -# Final System: IProute2 -# Source: https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-5.8.0.tar.xz -# This section is done in Chroot environment - -patch -Np0 -i ../patches/iproute2-void/fix-musl-devlink.patch - -sed -i /ARPD/d Makefile -rm -fv man/man8/arpd.8 -sed -i 's/.m_ipt.o//' tc/Makefile - -make && make DOCDIR=/usr/share/doc/iproute2-5.8.0 install diff --git a/doc/108-Final_System-Libpipeline b/doc/108-Final_System-Libpipeline deleted file mode 100644 index 5610520..0000000 --- a/doc/108-Final_System-Libpipeline +++ /dev/null @@ -1,5 +0,0 @@ -# Final System: Libpipeline -# Source: http://download.savannah.gnu.org/releases/libpipeline/libpipeline-1.5.3.tar.gz -# This section is done in Chroot environment - -./configure --prefix=/usr && make && make install diff --git a/doc/110-Final_System-Patch b/doc/110-Final_System-Patch deleted file mode 100644 index 8eabe24..0000000 --- a/doc/110-Final_System-Patch +++ /dev/null @@ -1,5 +0,0 @@ -# Final System: Patch -# Source: http://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz -# This section is done in Chroot environment - -./configure --prefix=/usr && make && make install diff --git a/doc/120-Final_System-Skalibs b/doc/120-Final_System-Skalibs deleted file mode 100644 index ff170fb..0000000 --- a/doc/120-Final_System-Skalibs +++ /dev/null @@ -1,12 +0,0 @@ -# Final System: Skalibs -# Source: https://www.skarnet.org/software/skalibs/skalibs-2.8.1.0.tar.gz -# Source: http://skarnet.org/software/skalibs/skalibs-2.9.2.1.tar.gz -# This section is done in Chroot environment - -# Configure source -./configure --prefix=/usr \ - --enable-force-devr - -# Build and Install -make -make install diff --git a/doc/121-Final_System-Execline b/doc/121-Final_System-Execline deleted file mode 100644 index fe94bcf..0000000 --- a/doc/121-Final_System-Execline +++ /dev/null @@ -1,11 +0,0 @@ -# Final System: Execline -# Source: https://www.skarnet.org/software/execline/execline-2.5.1.0.tar.gz -# Source: http://www.skarnet.org/software/execline/execline-2.6.1.0.tar.gz -# This section is done in Chroot environment - -./configure --prefix=/usr \ - --with-lib=/usr/lib/skalibs \ - --bindir=/bin \ - --enabled-shared -make -make install diff --git a/doc/122-Final_System-S6 b/doc/122-Final_System-S6 deleted file mode 100644 index c86e2e2..0000000 --- a/doc/122-Final_System-S6 +++ /dev/null @@ -1,14 +0,0 @@ -# Final System: S6 -# Source: https://github.com/skarnet/s6/archive/v2.7.2.2.tar.gz -# This section is done in Chroot environment - -./configure --prefix=/usr \ - --bindir=/bin \ - --with-lib=/usr/lib/skalibs \ - --with-lib=/usr/lib/libexec \ - --with-lib=/usr/lib/execline \ - --with-dynlib=/usr/lib \ - --enabled-shared - -make -make install diff --git a/doc/123-Final_System-S6_Linux_Utils b/doc/123-Final_System-S6_Linux_Utils deleted file mode 100644 index 041ac4e..0000000 --- a/doc/123-Final_System-S6_Linux_Utils +++ /dev/null @@ -1,8 +0,0 @@ -# Final System: S6-Linux-Utils -# Source: http://skarnet.org/software/s6-linux-utils/s6-linux-utils-2.5.0.1.tar.gz -# Source: http://www.skarnet.org/software/s6-linux-utils/s6-linux-utils-2.5.1.2.tar.gz -# This section is done in Chroot environment - -./configure -make -make install diff --git a/doc/124-Final_System-S6_Portable_Utils b/doc/124-Final_System-S6_Portable_Utils deleted file mode 100644 index ffc3a06..0000000 --- a/doc/124-Final_System-S6_Portable_Utils +++ /dev/null @@ -1,14 +0,0 @@ -# Final System: S6-Portable-Utils -# Source: http://skarnet.org/software/s6-portable-utils/s6-portable-utils-2.2.1.3.tar.gz -# Source: http://www.skarnet.org/software/s6-portable-utils/s6-portable-utils-2.2.2.4.tar.gz -# This section is done in Chroot environment - -./configure --prefix=/usr \ - --with-lib=/usr/lib/skalibs \ - --with-lib=/usr/lib/libexec \ - --with-lib=/usr/lib/execline \ - --with-dynlib=/usr/lib \ - --enabled-share -make -make install - diff --git a/doc/125-Final_System-S6_RC b/doc/125-Final_System-S6_RC deleted file mode 100644 index dfe5238..0000000 --- a/doc/125-Final_System-S6_RC +++ /dev/null @@ -1,13 +0,0 @@ -# Final System: S6-RC -# Source: https://github.com/skarnet/s6-rc/archive/v0.4.1.0.tar.gz -# This section is done in Chroot environment - -./configure --prefix=/usr \ - --with-lib=/usr/lib/skalibs \ - --with-lib=/usr/lib/libexec \ - --with-lib=/usr/lib/execline \ - --with-lib=/usr/lib/s6 \ - --with-dynlib=/usr/lib \ - --enabled-share -make -make install diff --git a/doc/126-Final_System-S6_Linux_init b/doc/126-Final_System-S6_Linux_init deleted file mode 100644 index 0fd4430..0000000 --- a/doc/126-Final_System-S6_Linux_init +++ /dev/null @@ -1,13 +0,0 @@ -# Final System: S6-Linux-init -# Source: https://github.com/skarnet/s6-linux-init/archive/v0.4.0.0.tar.gz -# This section is done in Chroot environment - -./configure --prefix=/usr \ - --with-lib=/usr/lib/skalibs \ - --with-lib=/usr/lib/libexec \ - --with-lib=/usr/lib/execline \ - --with-lib=/usr/lib/s6 \ - --with-dynlib=/usr/lib \ - --enabled-share -make -make install diff --git a/doc/129-Final_System-S6_Bootscripts b/doc/129-Final_System-S6_Bootscripts deleted file mode 100644 index 9beb136..0000000 --- a/doc/129-Final_System-S6_Bootscripts +++ /dev/null @@ -1,43 +0,0 @@ -# Final System: S6 Bootscripts -# Source: https://github.com/dslm4515/MLFS-S6-Bootscripts/releases/download/3.02/MLFS-S6-Bootscripts-3.02.tar.xz -# This section is done in Chroot environment - -# Install bootscripts -cp -rav s6 /etc/ - -# Compile the 'basic' database. -s6-rc-compile /etc/s6/db/basic /etc/s6/db-src/basic - -# Create link database to use for boot -ln -sv /etc/s6/db/basic /etc/s6/db/current - -# Create link for Kernel to find init script -ln -sv /etc/s6/init /sbin/init - -# Create links for poweroff and reboot -ln -sv /usr/bin/s6-reboot /sbin/reboot -ln -sv /usr/bin/s6-poweroff /sbin/poweroff - -## Setting up Networking at Boot -# install net-services: -mkdir -v /lib/services -cp -vr net-services/* /lib/services/ -cp -vr lsb /lib/ - -# Install helper scripts to bring up and down interfaces: -cp -v if* /sbin/ - -# For logging services, create the log user -groupadd -g 19 log && -useradd -c "S6 Log User" -d /var/log/aux-serv \ - -u 19 -g log -s /bin/false log -# Create the directory -install -m0755 -o 19 -g 19 -d /var/log/aux-serv - -## Bootscripts require system boot with a initramfs image. -# Copy the script to /sbin: -cp -v mkinitrd/mkinitramfs /sbin -chmod -v 0755 /sbin/mkinitramfs -# Copy the configuration: -mkdir -p /usr/share/mkinitramfs -cp -v mkinitrd/init.in /usr/share/mkinitramfs/ diff --git a/doc/133-Final_System-Linux_Kernel b/doc/133-Final_System-Linux_Kernel deleted file mode 100644 index 94ddfb6..0000000 --- a/doc/133-Final_System-Linux_Kernel +++ /dev/null @@ -1,31 +0,0 @@ -# Final System: Linux Kernel -# Source: https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.2.11.tar.xz -# This section is done in Chroot environment - -# Prepare for compilation by running the following command: -make mrproper - -# Configure kernel: -make menuconfig - -# Compile the kernel image and modules: -make - -# Install the modules, if the kernel configuration uses them: -make modules_install - -# Install the kernel: -cp -iv arch/x86/boot/bzImage /boot/vmlinuz - -# Install the symbol file for the kernel: -cp -iv System.map /boot/System.map - -# Install the kernel configuration file .config produced by the make menuconfig: -cp -iv .config /boot/config - -# Then create the initramfs image required by bootscripts -# Use the name of the kernel, which can be found in /lib/modules: -# i.e. /lib/modules/5.2.11 -mkinitramfs -# i.e. mkinitramfs 5.2.11 -cp -va initrd.img- /boot/initrd.img diff --git a/doc/007-Tool_Chain-Musl b/doc/2-toolchain/01-musl old mode 100755 new mode 100644 similarity index 96% rename from doc/007-Tool_Chain-Musl rename to doc/2-toolchain/01-musl index 3ff2248..76964e6 --- a/doc/007-Tool_Chain-Musl +++ b/doc/2-toolchain/01-musl @@ -20,7 +20,7 @@ case $(uname -m) in ;; i686) rm -v /tools/lib/ld-musl-i386.so.1 ln -sv libc.so /tools/lib/ld-musl-i386.so.1 - export barch=i386 + export barch=i386 ;; arm*) rm -v /tools/lib/ld-musl-arm.so.1 ln -sv libc.so /tools/lib/ld-musl-arm.so.1 @@ -38,4 +38,4 @@ cat > /tools/etc/ld-musl-${barch}.path << "EOF" /tools/lib EOF - +unset barch diff --git a/doc/008-Adjust_Cross_ToolChain b/doc/2-toolchain/02-adjust_cross-tools old mode 100755 new mode 100644 similarity index 100% rename from doc/008-Adjust_Cross_ToolChain rename to doc/2-toolchain/02-adjust_cross-tools diff --git a/doc/009-Tool_Chain-Binutils b/doc/2-toolchain/03-binutils old mode 100755 new mode 100644 similarity index 63% rename from doc/009-Tool_Chain-Binutils rename to doc/2-toolchain/03-binutils index d3c8db4..b3c2f83 --- a/doc/009-Tool_Chain-Binutils +++ b/doc/2-toolchain/03-binutils @@ -2,17 +2,17 @@ # Build and install as mlfs # Set the environment to cross-compile with cross-tools -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" # Link directories so libraries can be found in both lib & lib64 case $(uname -m) in - x86_64) ln -sv lib /tools/lib64 ;; + x86_64) ln -sv lib /tools/lib64 ;; esac # Configure in dedicated build directory @@ -31,10 +31,8 @@ make # Install make install -# Clean source to rebuild linker -make -C ld clean - -# Build and install linker that will be used later after adjusting toolchain +# Build and install linker that will be used later +# after adjusting toolchain make -C ld LIB_PATH=/usr/lib:/lib cp -v ld/ld-new /tools/bin diff --git a/doc/010-Tool_Chain-GCC b/doc/2-toolchain/04-gcc old mode 100755 new mode 100644 similarity index 67% rename from doc/010-Tool_Chain-GCC rename to doc/2-toolchain/04-gcc index 370d4d5..9f3bd4e --- a/doc/010-Tool_Chain-GCC +++ b/doc/2-toolchain/04-gcc @@ -1,5 +1,4 @@ -# Tool Chain: GCC-10.2.0 -# Source: http://ftp.gnu.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz +# Tool Chain: GCC # Build and install as mlfs # Set the environment for cross-compiling if not done already. @@ -10,34 +9,25 @@ AS="${MLFS_TARGET}-as" RANLIB="${MLFS_TARGET}-ranlib" LD="${MLFS_TARGET}-ld" STRIP="${MLFS_TARGET}-strip" -export CC CXX AR AS RANLIB LD STRIP # Why repeat `export' for every variable? # Additional sources to add -# Added "pipping" from xz/gunzip for tar, improves compatibility with sane implementations. -xz -cd ../gmp-6.2.0.tar.xz | tar -xf - -gunzip -cd ../mpc-1.1.0.tar.gz | tar -xf - +# Added "pipping" from xz/gunzip for tar, improves +# compatibility with sane implementations. +xz -cd ../pkgs/gmp-6.2.1.tar.xz | tar -xf - +gunzip -cd ../pkgs/mpc-1.2.1.tar.gz | tar -xf - xz -cd ../mpfr-4.1.0.tar.xz | tar -xf - -mv -v gmp-6.2.0 gmp -mv -v mpc-1.1.0 mpc +mv -v gmp-6.2.1 gmp +mv -v mpc-1.2.1 mpc mv -v mpfr-4.1.0 mpfr -# Apply patches [from void-linux] .. works for version 10.2.0 -patch -Np0 -i ../patches/gcc-9.1.0-void/ada-shared.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/fix-cxxflags-passing.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/fix-musl-execinfo.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/libgcc-musl-ldbl128-config.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/musl-ada.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/no-stack_chk_fail_local.patch -patch -Np0 -i ../patches/gcc-9.1.0-void/non-nullness.patch -# Fix CET for cross-compiling -# patch -Np1 -i ../patches/gcc-10.1.0-Enable-CET-in-cross-compiler-if-possible.patch -# Fixed in 10.2.0 +# Apply patches [from void-alpine] +bash ../patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh # Re-create internal header cat gcc/{limitx,glimits,limity}.h > \ $(dirname $($MLFS_TARGET-gcc -print-libgcc-file-name))/include-fixed/limits.h -# change the location of GCC's default dynamic linker to use the one installed in /tools +## Change the location of GCC's default dynamic linker to use the one installed in /tools # # For i686/x86_64: for file in gcc/config/{linux,i386/linux{,64}}.h @@ -104,21 +94,27 @@ CXXFLAGS='-g0 -O0' \ --disable-libitm \ --disable-libsanitizer -# Build -PATH=/bin:/usr/bin:/cross-tools/bin:/tools/bin make +# Compile +PATH=/bin:/usr/bin:/cross-tools/bin:/tools/bin make # Install make install -ln -sv gcc /tools/bin/cc # I don't think this is a really good idea... -GCC_INCLUDEDIR=$(dirname $(${MLFS_TARGET}-gcc -print-libgcc-file-name))/include && + +# Per LFS book explanation: +# Many programs and scripts run cc instead of gcc, which is used +# to keep programs generic and therefore usable on all kinds +# of UNIX systems where the GNU C compiler is not always +# installed. Running cc leaves the system administrator free +# to decide which C compiler to install. Create a link: +ln -sv gcc /tools/bin/cc + +# Cannot remember why. I may remove these 3 commands. +CC_INCLUDEDIR=$(dirname $(${MLFS_TARGET}-gcc -print-libgcc-file-name))/include && find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; && -rm -vf $(grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*) && +rm -vf $(grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*) # Test toolchain echo 'int main(){}' > dummy.c && gcc dummy.c readelf -l a.out | grep ': /tools' rm -v dummy.c a.out - -# Unset variables -unset CC CXX AR AS RANLIB LD STRIP GCC_INCLUDEDIR diff --git a/doc/011-Tool_Chain-Kernel_Headers b/doc/2-toolchain/05-kernel-headers old mode 100755 new mode 100644 similarity index 83% rename from doc/011-Tool_Chain-Kernel_Headers rename to doc/2-toolchain/05-kernel-headers index 3dc8091..5050fb9 --- a/doc/011-Tool_Chain-Kernel_Headers +++ b/doc/2-toolchain/05-kernel-headers @@ -11,10 +11,10 @@ make mrproper ARCH=${MLFS_ARCH} make headers # For kernels up to 5.2.x: -# find dest/include \( -name .install -o -name ..install.cmd \) -exec rm -rvf {} \; +# find dest/include \( -name .install -o -name ..install.cmd \) -delete # For kernels 5.3.x and newer: -find usr/include \( -name .install -o -name ..install.cmd \) -exec rm -rvf {} \; +find usr/include \( -name .install -o -name ..install.cmd \) -delete # Install cp -rv usr/include/* /tools/include @@ -22,4 +22,3 @@ rm -v /tools/include/Makefile # for kernels up to 5.2.x: # cp -rv dest/include/* /tools/include - diff --git a/doc/012-Tool_Chain-Adjust_Tool_Chain b/doc/2-toolchain/06-adjust_tools old mode 100755 new mode 100644 similarity index 100% rename from doc/012-Tool_Chain-Adjust_Tool_Chain rename to doc/2-toolchain/06-adjust_tools diff --git a/doc/2-toolchain/07-libstdcxx b/doc/2-toolchain/07-libstdcxx new file mode 100644 index 0000000..c5fde01 --- /dev/null +++ b/doc/2-toolchain/07-libstdcxx @@ -0,0 +1,43 @@ +# Tool Chain: libstdcxx (GCC) +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Additional sources to add +# Added "pipping" from xz/gunzip for tar, improves +# compatibility with sane implementations. +xz -cd ../pkgs/gmp-6.2.1.tar.xz | tar -xf - +gunzip -cd ../pkgs/mpc-1.2.1.tar.gz | tar -xf - +xz -cd ../mpfr-4.1.0.tar.xz | tar -xf - +mv -v gmp-6.2.1 gmp +mv -v mpc-1.2.1 mpc +mv -v mpfr-4.1.0 mpfr + +# Apply patches [from void-alpine] +bash ../patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh + +# Configure in a dedicated directory +mkdir -v build && cd build +../libstdc++-v3/configure \ + --target=${MLFS_TARGET} \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --prefix=/tools \ + --disable-multilib \ + --disable-nls \ + --disable-libstdcxx-threads \ + --disable-libstdcxx-pch \ + --with-gxx-include-dir=/tools/${MLFS_TARGET}/include/c++/10.3.1 + +# Compile +make + +# Install +make install diff --git a/doc/014-Tool_Chain-TCL b/doc/2-toolchain/08-tcl old mode 100755 new mode 100644 similarity index 64% rename from doc/014-Tool_Chain-TCL rename to doc/2-toolchain/08-tcl index 802bfac..d36ff8c --- a/doc/014-Tool_Chain-TCL +++ b/doc/2-toolchain/08-tcl @@ -1,16 +1,15 @@ # Tool Chain: TCL -# Source: https://downloads.sourceforge.net/tcl/tcl8.6.10-src.tar.gz # Build and install as mlfs # Can be optional: Package used for testing final system packages # Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" # Configure source cd unix diff --git a/doc/015-Tool_Chain-Expect b/doc/2-toolchain/09-expect old mode 100755 new mode 100644 similarity index 74% rename from doc/015-Tool_Chain-Expect rename to doc/2-toolchain/09-expect index d6009e3..c5c8b2f --- a/doc/015-Tool_Chain-Expect +++ b/doc/2-toolchain/09-expect @@ -1,17 +1,16 @@ -# Toolchain: Expect-5.45.3 -# Source: https://sourceforge.net/projects/expect/files/Expect/5.45.3/expect5.45.3.tar.gz +# Toolchain: Expect # Build and install as mlfs # Can be optional: Package used for testing final system packages # *No need to use latest version, so far. If so, patches need updating.* # Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" # Patch source to run with musl libc patch -Np1 -i ../patches/expect-5.45.3/dont-put-toolchain-in-libpath.patch diff --git a/doc/016-Tool_Chain-DejaGNU b/doc/2-toolchain/10-dejagnu old mode 100755 new mode 100644 similarity index 51% rename from doc/016-Tool_Chain-DejaGNU rename to doc/2-toolchain/10-dejagnu index 10132b8..1b22105 --- a/doc/016-Tool_Chain-DejaGNU +++ b/doc/2-toolchain/10-dejagnu @@ -1,16 +1,16 @@ -# Toolchain: DejaGNU-1.6.2 -# Source: http://ftp.gnu.org/gnu/dejagnu/dejagnu-1.6.2.tar.gz +# Toolchain: DejaGNU # Build and install as mlfs # Can be optional: Package used for testing final system packages +# *No need to use latest version, so far. If so, patches need updating.* # Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" # Configure source ./configure --build=${MLFS_HOST} \ diff --git a/doc/2-toolchain/11-m4 b/doc/2-toolchain/11-m4 new file mode 100644 index 0000000..8f24cb6 --- /dev/null +++ b/doc/2-toolchain/11-m4 @@ -0,0 +1,19 @@ +# Toolchain: M4 +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/018-Tool_Chain-Ncurses b/doc/2-toolchain/12-ncurses old mode 100755 new mode 100644 similarity index 59% rename from doc/018-Tool_Chain-Ncurses rename to doc/2-toolchain/12-ncurses index dab30e1..e464b76 --- a/doc/018-Tool_Chain-Ncurses +++ b/doc/2-toolchain/12-ncurses @@ -1,15 +1,14 @@ -# Toolchain: Ncurses-6.2 -# Source: http://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz +# Toolchain: Ncurses # Build and install as mlfs # Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" # Ensure that gawk is found first during configuration: sed -i s/mawk// configure @@ -26,4 +25,3 @@ sed -i s/mawk// configure # Build and install to toolchain make && make install - diff --git a/doc/019-Tool_Chain-Bash b/doc/2-toolchain/13-bash old mode 100755 new mode 100644 similarity index 74% rename from doc/019-Tool_Chain-Bash rename to doc/2-toolchain/13-bash index d5629e5..a75394a --- a/doc/019-Tool_Chain-Bash +++ b/doc/2-toolchain/13-bash @@ -1,15 +1,14 @@ -# Toolchain: Bash 5.0 -# Source: http://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz +# Toolchain: bash # Build and install as mlfs # Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" # Cross Compiling the configure script # does not does not determine the correct diff --git a/doc/2-toolchain/14-bison b/doc/2-toolchain/14-bison new file mode 100644 index 0000000..d7cac37 --- /dev/null +++ b/doc/2-toolchain/14-bison @@ -0,0 +1,19 @@ +# Toolchain: bison +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/021-Tool_Chain-Bzip2 b/doc/2-toolchain/15-bzip2 old mode 100755 new mode 100644 similarity index 65% rename from doc/021-Tool_Chain-Bzip2 rename to doc/2-toolchain/15-bzip2 index fda9abf..29704ea --- a/doc/021-Tool_Chain-Bzip2 +++ b/doc/2-toolchain/15-bzip2 @@ -1,15 +1,14 @@ -# ToolChain: Bzip2 1.0.8 -# Source: http://anduin.linuxfromscratch.org/LFS/bzip2-1.0.8.tar.gz +# Toolchain: Bzip2 # Build and install as mlfs # Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" # Fix the Makefiles for ensures installation of symbolic # links are relative and the man pages are installed into diff --git a/doc/022-Tool_Chain-Coreutils b/doc/2-toolchain/16-coreutils old mode 100755 new mode 100644 similarity index 56% rename from doc/022-Tool_Chain-Coreutils rename to doc/2-toolchain/16-coreutils index da8e287..33daaea --- a/doc/022-Tool_Chain-Coreutils +++ b/doc/2-toolchain/16-coreutils @@ -1,21 +1,19 @@ -# Toolchain: Coreutils 8.32 -# Source: http://ftp.gnu.org/gnu/coreutils/coreutils-8.32.tar.xz +# Toolchain: Coreutils # Build and install as mlfs # Set the environment for cross-compiling if not done already. -export CC="${MLFS_TARGET}-gcc" -export CXX="${MLFS_TARGET}-g++" -export AR="${MLFS_TARGET}-ar" -export AS="${MLFS_TARGET}-as" -export RANLIB="${MLFS_TARGET}-ranlib" -export LD="${MLFS_TARGET}-ld" -export STRIP="${MLFS_TARGET}-strip" +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" # Re-create configure script autoreconf -vif -# Apply patch -patch -Np0 -i ../patches/coreutils-void/0001-ls-restore-8.31-behavior-on-removed-directories.patch +patch -Np1 -i ../patches/coreutils-alpine/ls.patch # Cross Compiling the configure script # does not does not determine the correct @@ -32,11 +30,11 @@ EOF sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk # Configure source -./configure --build=${MLFS_HOST} \ +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ --host=${MLFS_TARGET} \ - --prefix=/tools \ --enable-install-program=hostname \ - --cache-file=config.cache + --cache-file=config.cache # Build and install to toolchain make && make install diff --git a/doc/2-toolchain/17-diffutils b/doc/2-toolchain/17-diffutils new file mode 100644 index 0000000..5d59786 --- /dev/null +++ b/doc/2-toolchain/17-diffutils @@ -0,0 +1,19 @@ +# Toolchain: diffutils +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/2-toolchain/18-file b/doc/2-toolchain/18-file new file mode 100644 index 0000000..c19a72c --- /dev/null +++ b/doc/2-toolchain/18-file @@ -0,0 +1,19 @@ +# Toolchain: File +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/2-toolchain/19-findutils b/doc/2-toolchain/19-findutils new file mode 100644 index 0000000..01c7cf1 --- /dev/null +++ b/doc/2-toolchain/19-findutils @@ -0,0 +1,23 @@ +# Toolchain: Findutils +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' gl/lib/*.c && +sed -i '/unistd/a #include ' gl/lib/mountlist.c && +echo "#define _IO_IN_BACKUP 0x100" >> gl/lib/stdio-impl.h + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/2-toolchain/20-gawk b/doc/2-toolchain/20-gawk new file mode 100644 index 0000000..a4b9d2a --- /dev/null +++ b/doc/2-toolchain/20-gawk @@ -0,0 +1,19 @@ +# Toolchain: Gawk +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/2-toolchain/21-gettext-tiny b/doc/2-toolchain/21-gettext-tiny new file mode 100644 index 0000000..5b41089 --- /dev/null +++ b/doc/2-toolchain/21-gettext-tiny @@ -0,0 +1,15 @@ +# Toolchain: Gettext-tiny +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Build and install to toolchain +make ${MJ} LIBINTL=MUSL prefix=/tools +cp -v msgfmt msgmerge xgettext /tools/bin diff --git a/doc/2-toolchain/22-grep b/doc/2-toolchain/22-grep new file mode 100644 index 0000000..81da04b --- /dev/null +++ b/doc/2-toolchain/22-grep @@ -0,0 +1,19 @@ +# Toolchain: Grep +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/2-toolchain/23-gzip b/doc/2-toolchain/23-gzip new file mode 100644 index 0000000..af5e1d7 --- /dev/null +++ b/doc/2-toolchain/23-gzip @@ -0,0 +1,19 @@ +# Toolchain: Gzip +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/2-toolchain/24-make b/doc/2-toolchain/24-make new file mode 100644 index 0000000..d26631f --- /dev/null +++ b/doc/2-toolchain/24-make @@ -0,0 +1,20 @@ +# Toolchain: Make +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --without-guile + +# Build and install to toolchain +make && make install diff --git a/doc/2-toolchain/25-patch b/doc/2-toolchain/25-patch new file mode 100644 index 0000000..84d9db7 --- /dev/null +++ b/doc/2-toolchain/25-patch @@ -0,0 +1,19 @@ +# Toolchain: Patch +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/2-toolchain/26-perl b/doc/2-toolchain/26-perl new file mode 100644 index 0000000..c72cf4f --- /dev/null +++ b/doc/2-toolchain/26-perl @@ -0,0 +1,29 @@ +# Toolchain: Perl 5.32.1 +# Build and install as mlfs +# perl 5.34.0 will not cross-compile under +# musl, even with latest perl-cross 1.3.6 + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Apply perl-cross over perl source +cp -vrf ../perl-cross-1.3.5/* ./ + +# Configure source +./configure --prefix=/tools \ + --target=${MLFS_TARGET} + +# Build +make + +# Copy only what is needed: +cp -v perl cpan/podlators/scripts/pod2man /tools/bin && +mkdir -pv /tools/lib/perl5/5.32.1 && +cp -Rv lib/* /tools/lib/perl5/5.32.1 + diff --git a/doc/2-toolchain/27-sed b/doc/2-toolchain/27-sed new file mode 100644 index 0000000..294a1fb --- /dev/null +++ b/doc/2-toolchain/27-sed @@ -0,0 +1,19 @@ +# Toolchain: Sed +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/2-toolchain/28-tar b/doc/2-toolchain/28-tar new file mode 100644 index 0000000..63b621b --- /dev/null +++ b/doc/2-toolchain/28-tar @@ -0,0 +1,19 @@ +# Toolchain: Tar +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/2-toolchain/29-texinfo b/doc/2-toolchain/29-texinfo new file mode 100644 index 0000000..1d7df5a --- /dev/null +++ b/doc/2-toolchain/29-texinfo @@ -0,0 +1,19 @@ +# Toolchain: Texinfo +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/2-toolchain/30-xz b/doc/2-toolchain/30-xz new file mode 100644 index 0000000..747cc3a --- /dev/null +++ b/doc/2-toolchain/30-xz @@ -0,0 +1,19 @@ +# Toolchain: Xz +# Build and install as mlfs + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/2-toolchain/31-flex b/doc/2-toolchain/31-flex new file mode 100644 index 0000000..d6a66c9 --- /dev/null +++ b/doc/2-toolchain/31-flex @@ -0,0 +1,24 @@ +# Toolchain: Flex +# Build and install as mlfs +# Required if building GCC from +# source snapshots + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" + +# Configure source +ac_cv_func_malloc_0_nonnull=yes \ +ac_cv_func_realloc_0_nonnull=yes \ +HELP2MAN=/tools/bin/true \ +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} + +# Build and install to toolchain +make && make install diff --git a/doc/2-toolchain/32-nano b/doc/2-toolchain/32-nano new file mode 100644 index 0000000..6ed51cf --- /dev/null +++ b/doc/2-toolchain/32-nano @@ -0,0 +1,25 @@ +# Toolchain: nano +# Build and install as mlfs +# Optional package: Text editor for convenience or trouble shooting + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" +LDFLAGS="-L/tools/lib" +CPPFLAGS="-I/tools/include" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --enable-tiny + +# Build and install to toolchain +make && make install + +unset LDFLAGS CPPFLAGS diff --git a/doc/2-toolchain/33-vim b/doc/2-toolchain/33-vim new file mode 100644 index 0000000..1c70917 --- /dev/null +++ b/doc/2-toolchain/33-vim @@ -0,0 +1,26 @@ +# Toolchain: Vim +# Build and install as mlfs +# Optional package: Text editor for convenience or trouble shooting + +# Set the environment for cross-compiling if not done already. +CC="${MLFS_TARGET}-gcc" +CXX="${MLFS_TARGET}-g++" +AR="${MLFS_TARGET}-ar" +AS="${MLFS_TARGET}-as" +RANLIB="${MLFS_TARGET}-ranlib" +LD="${MLFS_TARGET}-ld" +STRIP="${MLFS_TARGET}-strip" +LDFLAGS="-L/tools/lib" +CPPFLAGS="-I/tools/include" + +# Configure source +./configure --prefix=/tools \ + --build=${MLFS_HOST} \ + --host=${MLFS_TARGET} \ + --disbale-gui \ + --without-x + +# Build and install to toolchain +make && make install + +unset LDFLAGS CPPFLAGS diff --git a/doc/039-Stripping_and_Ownership b/doc/2-toolchain/34-Stripping_and_Ownership old mode 100755 new mode 100644 similarity index 100% rename from doc/039-Stripping_and_Ownership rename to doc/2-toolchain/34-Stripping_and_Ownership diff --git a/doc/040-Prepare_VKFS b/doc/3-Chroot/001-Prepare_VKFS old mode 100755 new mode 100644 similarity index 100% rename from doc/040-Prepare_VKFS rename to doc/3-Chroot/001-Prepare_VKFS diff --git a/doc/041-Enter_Chroot b/doc/3-Chroot/002-Enter_Chroot old mode 100755 new mode 100644 similarity index 100% rename from doc/041-Enter_Chroot rename to doc/3-Chroot/002-Enter_Chroot diff --git a/doc/042-Create_Directories b/doc/3-Chroot/003-Create_Directories old mode 100755 new mode 100644 similarity index 100% rename from doc/042-Create_Directories rename to doc/3-Chroot/003-Create_Directories diff --git a/doc/043-Create_Essential_Files_and_Links b/doc/3-Chroot/004-Create_Essential_Files_and_Links old mode 100755 new mode 100644 similarity index 100% rename from doc/043-Create_Essential_Files_and_Links rename to doc/3-Chroot/004-Create_Essential_Files_and_Links diff --git a/doc/044-Final_System-Kernel_Headers b/doc/3-Chroot/005-Kernel_Headers old mode 100755 new mode 100644 similarity index 92% rename from doc/044-Final_System-Kernel_Headers rename to doc/3-Chroot/005-Kernel_Headers index 49f743f..b03e8a1 --- a/doc/044-Final_System-Kernel_Headers +++ b/doc/3-Chroot/005-Kernel_Headers @@ -1,6 +1,5 @@ # Final System: Kernel Headers # Use latest kernel version when possible -# Source: https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.1.tar.xz # This section is done in Chroot environment # Clean source tree diff --git a/doc/3-Chroot/006-Man_pages b/doc/3-Chroot/006-Man_pages new file mode 100644 index 0000000..8c523b7 --- /dev/null +++ b/doc/3-Chroot/006-Man_pages @@ -0,0 +1,4 @@ +# Final System: Man Pages +# This section is done in Chroot environment + +make install diff --git a/doc/3-Chroot/007-Musl b/doc/3-Chroot/007-Musl new file mode 100644 index 0000000..d8f49fe --- /dev/null +++ b/doc/3-Chroot/007-Musl @@ -0,0 +1,69 @@ +# Final System: Musl Libc +# This section is done in Chroot environment + +# For i686(32 bit), there is a rounding error that +# causes fonts to not display for SeaMonkey and +# Palemoon browsers: +patch -Np1 -i ../patches/musl-mlfs/i686-fix-rounding.patch + +# Fix paths for utmp & wtmp: +patch -Np1 -i ../patches/musl-mlfs/fix-utmp-wtmp-paths.patch + +# Additional patches from Alpine Linux: +patch -Np1 -i ../patches/musl-alpine/0001-riscv64-define-ELF_NFPREG.patch +patch -Np1 -i ../patches/musl-alpine/handle-aux-at_base.patch +patch -Np1 -i ../patches/musl-alpine/syscall-cp-epoll.patch + +# Configure +LDFLAGS="$LDFLAGS -Wl,-soname,libc.musl-${CARCH}.so.1" \ +./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-gcc-wrapper + +# Build and install +make && make install + +# provide minimal libssp_nonshared.a so we don't need libssp from gcc +/tools/bin/$(uname -m)-mlfs-*-gcc -fpie -c ../files/__stack_chk_fail_local.c -o __stack_chk_fail_local.o +/tools/bin/$(uname -m)-mlfs-*-gcc-ar r libssp_nonshared.a __stack_chk_fail_local.o +cp -v libssp_nonshared.a /usr/lib/ + +case $(uname -m) in + x86_64) export ARCH="x86_64" + ;; + i686) export ARCH="i386" + ;; + arm*) export ARCH="arm" + ;; + aarch64) export ARCH="aarch64" + ;; +esac + +# Create link for ldd: +ln -sv /lib/ld-musl-$ARCH.so.1 /bin/ldd + +# Create config for dynamic library loading: +cat > /etc/ld-musl-$ARCH.path << "EOF" +/lib +/usr/local/lib +/usr/lib +EOF + +# As of musl v1.2.2, header is needed by util-linux +#rm -v ${BUILD}/usr/include/utmp.h && + +# Header will be provided by skarnet's umtps +rm -v ${BUILD}/usr/include/utmpx.h + +# Install ldconfig script from Adelie Linux +install -v -D -m755 ../files/musl-adelie/ldconfig ${BUILD}/usr/bin/ + +# Some packages [outside MLFS] may expect ld-musl-i686.so.1 +# instead of ld-musl-i386.so.1: +case $(uname -m) in + i686) ln -sv ../usr/lib/libc.so ${BUILD}/lib/ld-musl-i686.so.1 ;; +esac + +unset ARCH + diff --git a/doc/047-Final_System-Adjust_Toolchain b/doc/3-Chroot/008-Adjust_Toolchain similarity index 100% rename from doc/047-Final_System-Adjust_Toolchain rename to doc/3-Chroot/008-Adjust_Toolchain diff --git a/doc/3-Chroot/009-Skalibs b/doc/3-Chroot/009-Skalibs new file mode 100644 index 0000000..0f9e4a9 --- /dev/null +++ b/doc/3-Chroot/009-Skalibs @@ -0,0 +1,11 @@ +# Final System: Skalibs +# This section is done in Chroot environment + +# Configure source +./configure --enable-shared \ + --enable-static \ + --libdir=/usr/lib + +# Build and Install +make +make install diff --git a/doc/3-Chroot/010-utmps b/doc/3-Chroot/010-utmps new file mode 100644 index 0000000..56170fe --- /dev/null +++ b/doc/3-Chroot/010-utmps @@ -0,0 +1,27 @@ +# Final System: utmps +# This section is done in Chroot environment + +# Set the version in pkconfig file +cp -v ../files/utmps-alpine/*.pc /tmp/ +sed -i -e "s/@@VERSION@@/0.1.0.2/g" -- /tmp/*.pc + +# Configure source +./configure --enable-shared \ + --enable-static \ + --enable-allstatic \ + --enable-static-libc \ + --libdir=/usr/lib \ + --with-dynlib=/lib \ + --libexecdir="/lib/utmps" \ + --with=dynlib=/lib + +# Build and Install +make +make install +install -v -D -m644 /tmp/utmps.pc /usr/lib/pkgconfig/ + +# Create link as some expect header in /usr/include: +ln -sv utmps/utmpx.h /usr/include/utmpx.h + +# Clean up +rm -rf /tmp/*.pc diff --git a/doc/3-Chroot/011-Time_Zone_Utilities b/doc/3-Chroot/011-Time_Zone_Utilities new file mode 100644 index 0000000..aa84ffc --- /dev/null +++ b/doc/3-Chroot/011-Time_Zone_Utilities @@ -0,0 +1,39 @@ +# Final System: TimeZone Utilites & Data +# This section is done in Chroot environment + +# Set the timezones to create +export timezones="africa antarctica asia australasia europe northamerica \ + southamerica etcetera backward factory" + +# Unpack the sources in a build directory +mkdir tzdb && cd tzdb && +tar xf ../pkgs/tzdata2021a.tar.gz && +tar xf ../pkgs/tzcode2021a.tar.gz && +tar xf ../pkgs/posixtz-0.5.tar.xz + +# Apply patch from Adelie Linux +patch -Np1 -i ../patches/posixtz-adelie/0001-posixtz-fix-up-lseek.patch + +# Build utilities +make CFLAGS="$CFLAGS -DHAVE_STDINT_H=1" TZDIR="/usr/share/zoneinfo" +make -C posixtz-0.5 posixtz + +# Create directories to install in +mkdir -pv /usr/share/zoneinfo/right + +# Install +install -m444 -t /usr/share/zoneinfo iso3166.tab zone1970.tab zone.tab +install -m755 zic zdump ${BUILD}/usr/sbin +install -m644 zic.8 zdump.8 ${BUILD}/usr/share/man/man8 +install -v -Dm755 posixtz-0.5/posixtz ${BUILD}/usr/bin/posixtz + +# Build the timezones +./zic -b fat -y ./yearistype -d /usr/share/zoneinfo ${timezones} +./zic -b fat -y ./yearistype -d /usr/share/zoneinfo/right -L leapseconds ${timezones} +./zic -b fat -y ./yearistype -d /usr/share/zoneinfo -p America/New_York +unset timezones + +# Set the timezone: +# use tzselect to determine +cp -v /usr/share/zoneinfo/ /etc/localtime + diff --git a/doc/3-Chroot/012-Argp-standalone b/doc/3-Chroot/012-Argp-standalone new file mode 100644 index 0000000..6a6d56d --- /dev/null +++ b/doc/3-Chroot/012-Argp-standalone @@ -0,0 +1,20 @@ +# Final System: Argp-Standalone +# This section is done in Chroot environment + +# Patch source to compile under Musl libc +patch -Np0 -i ../patches/argp-standalone-void/fix-no_use_inline.patch && +patch -Np1 -i ../patches/argp-standalone-adelie/001-throw-in-funcdef.patch && +patch -Np1 -i ../patches/argp-standalone-adelie/gnu89-inline.patch + +# Configure source +CFLAGS=" -fPIC" ./configure --prefix=/usr \ + --disable-static \ + --sysconfdir=/etc \ + --localstatedir=/var + +# Build +make + +# Install +cp -v libargp.a /usr/lib/ +cp -v argp.h /usr/include/ diff --git a/doc/050-Final-System-Zlib b/doc/3-Chroot/013-Zlib similarity index 63% rename from doc/050-Final-System-Zlib rename to doc/3-Chroot/013-Zlib index 10fdcbb..7b302d5 100644 --- a/doc/050-Final-System-Zlib +++ b/doc/3-Chroot/013-Zlib @@ -1,13 +1,12 @@ -# Final System: Zlib 1.2.11 -# Source: https://zlib.net/zlib-1.2.11.tar.xz +# Final System: Zlib # This section is done in Chroot environment # Configure source -./configure --prefix=/usr +./configure --prefix=/usr --libdir=/lib --shared # Build and Install make -make install +make pkgconfigdir="/usr/lib/pkgconfig" install # Fix misplace files mv -v /usr/lib/libz.so.* /lib diff --git a/doc/053-Final-System-M4 b/doc/3-Chroot/014-File similarity index 61% rename from doc/053-Final-System-M4 rename to doc/3-Chroot/014-File index 5523279..47e060e 100644 --- a/doc/053-Final-System-M4 +++ b/doc/3-Chroot/014-File @@ -1,5 +1,4 @@ -# Final System: M4 1.4.18 -# Source: http://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz +# Final System: File # This section is done in Chroot environment # Configure diff --git a/doc/052-Final-System-Readline b/doc/3-Chroot/015-Readline similarity index 81% rename from doc/052-Final-System-Readline rename to doc/3-Chroot/015-Readline index 439832c..0811200 100644 --- a/doc/052-Final-System-Readline +++ b/doc/3-Chroot/015-Readline @@ -1,5 +1,4 @@ -# Final System: Readline 8.0 -# Source: http://ftp.gnu.org/gnu/readline/readline-8.0.tar.gz +# Final System: Readline # This section is done in Chroot environment # To avoid a rare possibility of a linking bug in ldconfig @@ -9,7 +8,7 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install # Configure source ./configure --prefix=/usr \ --disable-static \ - --docdir=/usr/share/doc/readline-8.0 + --docdir=/usr/share/doc/readline-8.1 # Build make SHLIB_LIBS="-L/tools/lib -lncursesw" diff --git a/doc/3-Chroot/016-M4 b/doc/3-Chroot/016-M4 new file mode 100644 index 0000000..a99d7a2 --- /dev/null +++ b/doc/3-Chroot/016-M4 @@ -0,0 +1,13 @@ +# Final System: M4 +# This section is done in Chroot environment + +# Apply patches from Adelie +patch -Np1 -i ../patches/m4-adelie/disable-mbrtowc-test.patch && +patch -Np1 -i ../patches/m4-adelie/gnulib-tests-dont-require-gpg-passphrase.patch && +patch -Np1 -i ../patches/m4-adelie/localename-test-fix.patch + +# Configure +./configure --prefix=/usr + +# Build and install +make && make install diff --git a/doc/054-Final-System-Bc b/doc/3-Chroot/017-Bc similarity index 68% rename from doc/054-Final-System-Bc rename to doc/3-Chroot/017-Bc index 3a9f1f2..ab6cefa 100644 --- a/doc/054-Final-System-Bc +++ b/doc/3-Chroot/017-Bc @@ -1,5 +1,4 @@ # Final System: Bc -# Source: https://github.com/gavinhoward/bc/releases/download/3.1.5/bc-3.1.5.tar.xz # This section is done in Chroot environment # Configure source diff --git a/doc/055-Final_System-Binutils b/doc/3-Chroot/018-Binutils similarity index 77% rename from doc/055-Final_System-Binutils rename to doc/3-Chroot/018-Binutils index ff60979..3966b10 100644 --- a/doc/055-Final_System-Binutils +++ b/doc/3-Chroot/018-Binutils @@ -1,14 +1,19 @@ # Final System: Binutils -# Source: http://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.xz # This section is done in Chroot environment +# Apply patches from Alpine Linux; +patch -Np1 -i ../patches/binutils-alpine/binutils-ld-fix-static-linking.patch +patch -Np1 -i ../patches/binutils-alpine/binutils-mips-disable-assert.patch +patch -Np1 -i ../patches/binutils-alpine/gold-mips.patch +patch -Np1 -i ../patches/binutils-alpine/ld-bfd-mips.patch + # Create build directory mkdir -v build && cd build case $(uname -m) in x86_64) export EXTRA_CONFIG=" --enable-targets=x86_64-pep" ;; - i686) export EXTRA_CONFIG=" --enable-64-bit-bfd --enable-targets=x86_64-linux-gnu,x86_64-pep" + i686) export EXTRA_CONFIG=" --disable-separate-code --enable-64-bit-bfd --enable-targets=x86_64-linux-gnu,x86_64-pep" ;; esac @@ -24,9 +29,11 @@ esac --enable-lto \ --disable-nls \ --enable-deterministic-archives \ + --enable-default-hash-style=gnu \ --enable-threads \ + --disable-multilib \ --disable-compressed-debug-sections \ - --with-mmap $EXTRA_CONFIG + --with-mmap $EXTRA_CONFIG # Build make tooldir=/usr @@ -46,6 +53,7 @@ make CFLAGS="$CFLAGS -fPIC -fvisibility=hidden" -C bfd-pic cp -a opcodes opcodes-pic make -C opcodes-pic clean make CFLAGS="$CFLAGS -fPIC" -C opcodes-pic +install -v -m 644 opcodes-pic/libopcodes.a /usr/lib # Install make tooldir=/usr install diff --git a/doc/056-Final_System-GMP b/doc/3-Chroot/019-GMP similarity index 81% rename from doc/056-Final_System-GMP rename to doc/3-Chroot/019-GMP index 5a05160..5d5847e 100644 --- a/doc/056-Final_System-GMP +++ b/doc/3-Chroot/019-GMP @@ -1,5 +1,4 @@ -# Final System: GMP 6.2.0 -# Source: http://ftp.gnu.org/gnu/gmp/gmp-6.2.0.tar.xz +# Final System: GMP # This section is done in Chroot environment # By default, GMP configures to optimize for the @@ -12,7 +11,7 @@ ./configure --prefix=/usr \ --enable-cxx \ --disable-static \ - --docdir=/usr/share/doc/gmp-6.2.0 + --docdir=/usr/share/doc/gmp-6.2.1 # Build make diff --git a/doc/057-Final_System-MPFR b/doc/3-Chroot/020-MPFR similarity index 77% rename from doc/057-Final_System-MPFR rename to doc/3-Chroot/020-MPFR index 7680674..1a73dc2 100644 --- a/doc/057-Final_System-MPFR +++ b/doc/3-Chroot/020-MPFR @@ -1,5 +1,4 @@ -# Final System: MPFR 4.1.0 -# Souce: http://www.mpfr.org/mpfr-4.1.0/mpfr-4.1.0.tar.xz +# Final System: MPFR # This section is done in Chroot environment # Configure source diff --git a/doc/058-Final_System-MPC b/doc/3-Chroot/021-MPC similarity index 56% rename from doc/058-Final_System-MPC rename to doc/3-Chroot/021-MPC index c4f31c3..053d1df 100644 --- a/doc/058-Final_System-MPC +++ b/doc/3-Chroot/021-MPC @@ -1,11 +1,10 @@ -# Final System: MPC 1.1.0 -# Source: https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz +# Final System: MPC # This section is done in Chroot environment # Configure source ./configure --prefix=/usr \ --disable-static \ - --docdir=/usr/share/doc/mpc-1.1.0 + --docdir=/usr/share/doc/mpc-1.2.1 # Build and install make && make install diff --git a/doc/059-Final_System-Shadow b/doc/3-Chroot/022-Shadow similarity index 82% rename from doc/059-Final_System-Shadow rename to doc/3-Chroot/022-Shadow index 8b66235..cdd4bde 100644 --- a/doc/059-Final_System-Shadow +++ b/doc/3-Chroot/022-Shadow @@ -1,5 +1,4 @@ # Final System: Shadow -# Source: https://github.com/shadow-maint/shadow/releases/download/4.8.1/shadow-4.8.1.tar.xz # This section is done in Chroot environment # Disable the installation of the groups program and its man pages, @@ -13,8 +12,11 @@ sed -i -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' \ sed -i 's/1000/999/' etc/useradd # Configure source -touch /usr/bin/passwd -./configure --sysconfdir=/etc --with-group-name-max-length=32 +touch /usr/bin/passwd && +LIBS="-lutmps -lskarnet" \ +./configure --with-group-name-max-length=32 \ + --sysconfdir=/etc \ + --enable-utmpx # Build, Install, and fix misplaced files make && make install diff --git a/doc/060-Final_System-GCC b/doc/3-Chroot/023-GCC similarity index 63% rename from doc/060-Final_System-GCC rename to doc/3-Chroot/023-GCC index b4ab4d3..a19cdbb 100644 --- a/doc/060-Final_System-GCC +++ b/doc/3-Chroot/023-GCC @@ -1,34 +1,37 @@ -# Final System: GCC-10.2.0 -# Source: http://ftp.gnu.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz -# Source: http://isl.gforge.inria.fr/isl-0.19.tar.xz +# Final System: GCC # This section is done in Chroot environment case $(uname -m) in x86_64) export TRUPLE="x86_64-linux-musl" + export EXTRA_CONFIG=" --with-arch=x86-64" ;; i686) export TRUPLE="i686-linux-musl" + export EXTRA_CONFIG=" --with-arch=pentium3 --with-tune=pentium-m" ;; armv7l) export TRUPLE="armv7l-linux-musleabihf" + export EXTRA_CONFIG=" --with-arch=armv7-a --with-tune=generic-armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-abi=aapcs-linux --with-mode=thumb" ;; armv6l) export TRUPLE="armv6l-linux-musleabihf" + export EXTRA_CONFIG=" --with-arch=armv6zk --with-tune=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-abi=aapcs-linux" ;; aarch64) export TRUPLE="aarch64-linux-musleabihf" - export EXTRA_CONFIG=" --with-arch=armv8-a --with-abi=lp64" + export EXTRA_CONFIG=" --with-arch=armv8-a --with-abi=lp64 --enable-fix-cortex-a53-835769 --enable-fix-cortex-a53-843419" sed -i '/m64=/s/lib64/lib/' gcc/config/aarch64/t-aarch64-linux ;; +esac + +# For ARM disable libitm because of texrels +case $(uname -m) in + arm*) export LIBITM=false ;; esac + # Add isl source -tar -xf ../isl-0.19.tar.xz -mv -v isl-0.19 isl +tar -xf ../pkgs/isl-0.23.tar.bz2 +mv -v isl-0.23 isl # Apply patches [from alpine-linux] -for p in 0001-posix_memalign.patch 0002-gcc-poison-system-directories.patch 0003-Turn-on-Wl-z-relro-z-now-by-default.patch 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch 0006-Enable-Wformat-and-Wformat-security-by-default.patch 0007-Enable-Wtrampolines-by-default.patch 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch 0011-libiberty-copy-PIC-objects-during-build-process.patch 0012-libitm-disable-FORTIFY.patch 0013-libgcc_s.patch 0014-nopie.patch 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch 0016-dlang-update-zlib-binding.patch 0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch 0018-ada-fix-shared-linking.patch 0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch 0020-libstdc-futex-add-time64-compatibility.patch 0021-add-fortify-headers-paths.patch 0022-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch 0023-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch 0024-Pure-64-bit-MIPS.patch 0025-use-pure-64-bit-configuration-where-appropriate.patch 0026-always-build-libgcc_eh.a.patch 0027-ada-libgnarl-compatibility-for-musl.patch 0028-ada-musl-support-fixes.patch; do - patch -Np1 -i ../patches/gcc-10.2.0-alpine/$p -done - -# Apply patches [from void-linux] .. works for version 10.2.0 -patch -Np0 -i ../patches/gcc-9.1.0-void-patches/fix-musl-execinfo.patch +bash ../patches/gcc-10.3.1_git20210424-alpine/apply_patches.sh # If building on x86_64, change the default # directory name for 64-bit libraries to “lib”: @@ -43,18 +46,7 @@ case $(uname -m) in ;; esac -# _FORTIFY_SOURCE needs an optimization level. -sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure - -#export CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" -#export CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2" - -# Disable explicit -fno-PIE, gcc will figure this out itself. -#export CFLAGS="$CFLAGS -fno-PIE" -#export CXXFLAGS="$CXXFLAGS -fno-PIE" -#export LDFLAGS="$LDFLAGS -no-pie" - -# Configure source +# Configure source in dedicated build directory: mkdir -v build && cd build SED=sed libat_cv_have_ifunc=no \ ../configure --prefix=/usr \ @@ -65,24 +57,30 @@ SED=sed libat_cv_have_ifunc=no \ --enable-languages=c,c++ \ --enable-threads=posix \ --enable-clocale=generic \ - --enable-languages=c,c++ \ --enable-tls \ --enable-libstdcxx-time \ --enable-fully-dynamic-string \ --enable-default-pie \ --enable-default-ssp \ - --enable-vtable-verify \ --enable-linker-build-id \ - --enable-fast-character \ + --enable-checking=release \ + --enable-cloog-backend \ + --enable-__cxa_atexit \ + --enable-lto \ + --enable-plugins \ --disable-libstdcxx-pch \ --disable-nls \ --disable-multilib \ --disable-bootstrap \ --disable-symvers \ --disable-libsanitizer \ - --disable-target-libiberty \ - --disable-libunwind-exceptions \ - --disable-libssp --disable-libmpx --disable-libmudflap $EXTRA_CONFIG + --disable-libssp \ + --disable-libmpx \ + --disable-libmudflap \ + --disable-fixed-point \ + --disable-sjlj-exceptions \ + --disable-werror $EXTRA_CONFIG \ + --with-pkgversion="Musl-LFS 9.0" # Build make @@ -122,7 +120,7 @@ ln -sv gcc /usr/bin/cc # Add a compatibility symlink to enable building programs with # Link Time Optimization (LTO): install -v -dm755 /usr/lib/bfd-plugins -ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/10.2.0/liblto_plugin.so \ +ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/10.3.1/liblto_plugin.so \ /usr/lib/bfd-plugins/ mkdir -pv /usr/share/gdb/auto-load/usr/lib mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib @@ -164,4 +162,5 @@ grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g' # If all is well, remove test files: rm -v dummy.c a.out dummy.log +unset LIBITM diff --git a/doc/061-Final_System-Bzip2 b/doc/3-Chroot/024-Bzip2 similarity index 84% rename from doc/061-Final_System-Bzip2 rename to doc/3-Chroot/024-Bzip2 index b7605ea..e89007e 100644 --- a/doc/061-Final_System-Bzip2 +++ b/doc/3-Chroot/024-Bzip2 @@ -1,12 +1,15 @@ # Final System: Bzip2 -# Source: http://anduin.linuxfromscratch.org/LFS/bzip2-1.0.8.tar.gz # This section is done in Chroot environment +# Patch, per Void Linux patch -Np1 -i ../patches/bzip2-void/install_docs-1.patch patch -Np0 -i ../patches/bzip2-void/soname.patch sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile +# Freeytpe requires this flag set for bzip2 +export CFLAGS="-fPIC" + # Prepare the source make -f Makefile-libbz2_so make clean @@ -20,3 +23,4 @@ rm -v /usr/bin/{bunzip2,bzcat,bzip2} ln -sv bzip2 /bin/bunzip2 ln -sv bzip2 /bin/bzcat +unset CFLAGS diff --git a/doc/3-Chroot/025-Pkgconf b/doc/3-Chroot/025-Pkgconf new file mode 100644 index 0000000..64ce21e --- /dev/null +++ b/doc/3-Chroot/025-Pkgconf @@ -0,0 +1,15 @@ +# Final System: Pkgconf +# This section is done in Chroot environment + +# Configure source +./configure --prefix=/usr \ + --docdir=/usr/share/doc/pkgconf-${VER} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-pkg-config-dir=/usr/lib/pkgconfig:/usr/share/pkgconfig:/opt/qt5/lib/pkgconfig + +# Build and Install +make && make install + +# Create a compatibility link +ln -s pkgconf /usr/bin/pkg-config diff --git a/doc/063-Final_System-Ncurses b/doc/3-Chroot/026-Ncurses similarity index 92% rename from doc/063-Final_System-Ncurses rename to doc/3-Chroot/026-Ncurses index 2a8a0bc..788ebd1 100644 --- a/doc/063-Final_System-Ncurses +++ b/doc/3-Chroot/026-Ncurses @@ -1,5 +1,4 @@ # Final System: Ncurses -# Source: http://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz # This section is done in Chroot environment # Don't install a static library that is not @@ -13,7 +12,8 @@ sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in --without-debug \ --without-normal \ --enable-pc-files \ - --enable-widec + --enable-widec \ + --with-pkg-config-libdir=/usr/lib/pkgconfig # Build and install make && make install diff --git a/doc/064-Final_System-attr b/doc/3-Chroot/027-Attr similarity index 66% rename from doc/064-Final_System-attr rename to doc/3-Chroot/027-Attr index 56bae76..2149a73 100644 --- a/doc/064-Final_System-attr +++ b/doc/3-Chroot/027-Attr @@ -1,12 +1,11 @@ -# Final System: Attr 2.4.48 -# Source: http://download.savannah.gnu.org/releases/attr/attr-2.4.48.tar.gz +# Final System: Attr # This section is done in Chroot environment ./configure --prefix=/usr \ --bindir=/bin \ --disable-static \ --sysconfdir=/etc \ - --docdir=/usr/share/doc/attr-2.4.48 + --docdir=/usr/share/doc/attr-2.5.1 make && make install diff --git a/doc/065-Final_System-ACL b/doc/3-Chroot/028-ACL similarity index 67% rename from doc/065-Final_System-ACL rename to doc/3-Chroot/028-ACL index 3041783..9b17c2b 100644 --- a/doc/065-Final_System-ACL +++ b/doc/3-Chroot/028-ACL @@ -1,12 +1,11 @@ -# Final System: ACL 2.2.53 -# Source: http://download.savannah.gnu.org/releases/acl/acl-2.2.53.tar.gz +# Final System: ACL # This section is done in Chroot environment ./configure --prefix=/usr \ --bindir=/bin \ --disable-static \ --libexecdir=/usr/lib \ - --docdir=/usr/share/doc/acl-2.2.53 + --docdir=/usr/share/doc/acl-2.3.1 make && make install mv -v /usr/lib/libacl.so.* /lib diff --git a/doc/066-Final_System-Libcap b/doc/3-Chroot/029-Libcap similarity index 68% rename from doc/066-Final_System-Libcap rename to doc/3-Chroot/029-Libcap index 2e0e26a..0793a4a 100644 --- a/doc/066-Final_System-Libcap +++ b/doc/3-Chroot/029-Libcap @@ -1,5 +1,4 @@ # Final System: Libcap -# Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.42.tar.xz # This section is done in Chroot environment sed -i '/install.*STALIBNAME/d' libcap/Makefile @@ -7,7 +6,7 @@ make lib=lib make lib=lib PKGCONFIGDIR=/usr/lib/pkgconfig install -chmod -v 755 /lib/libcap.so.2.42 +chmod -v 755 /lib/libcap.so.2.50 mv -v /lib/libpsx.a /usr/lib rm -v /lib/libcap.so ln -sfv ../../lib/libcap.so.2 /usr/lib/libcap.so diff --git a/doc/067-Final_System-Sed b/doc/3-Chroot/030-Sed similarity index 71% rename from doc/067-Final_System-Sed rename to doc/3-Chroot/030-Sed index f7fb753..bac87fb 100644 --- a/doc/067-Final_System-Sed +++ b/doc/3-Chroot/030-Sed @@ -1,5 +1,4 @@ # Final System: Sed -# Source: http://ftp.gnu.org/gnu/sed/sed-4.8.tar.xz # This section is done in Chroot environment ./configure --prefix=/usr --bindir=/bin diff --git a/doc/3-Chroot/031-Psmisc b/doc/3-Chroot/031-Psmisc new file mode 100644 index 0000000..5264589 --- /dev/null +++ b/doc/3-Chroot/031-Psmisc @@ -0,0 +1,20 @@ +# Final System: Psmisc +# This section is done in Chroot environment + +# Configure source +ac_cv_func_malloc_0_nonnull=yes \ +ac_cv_func_realloc_0_nonnull=yes \ +./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-selinux \ + --enable-harden-flags \ + --enable-ipv6 +# Build +make + +# Install +make install + +mv -v /usr/bin/fuser /bin +mv -v /usr/bin/killall /bin diff --git a/doc/069-Final_System-Iana-etc b/doc/3-Chroot/032-Iana-etc similarity index 56% rename from doc/069-Final_System-Iana-etc rename to doc/3-Chroot/032-Iana-etc index 9a76137..22d2d3b 100644 --- a/doc/069-Final_System-Iana-etc +++ b/doc/3-Chroot/032-Iana-etc @@ -1,5 +1,4 @@ # Final System: Iana-etc -# Source: http://anduin.linuxfromscratch.org/LFS/iana-etc-20200429.tar.gz # This section is done in Chroot environment cp services protocols /etc diff --git a/doc/3-Chroot/033-Bison b/doc/3-Chroot/033-Bison new file mode 100644 index 0000000..0685e03 --- /dev/null +++ b/doc/3-Chroot/033-Bison @@ -0,0 +1,6 @@ +# Final System: Bison +# This section is done in Chroot environment + +./configure --prefix=/usr --docdir=/usr/share/doc/bison-3.7.6 + +make && make install diff --git a/doc/071-Final_System-Flex b/doc/3-Chroot/034-Flex similarity index 53% rename from doc/071-Final_System-Flex rename to doc/3-Chroot/034-Flex index 0298cc4..42beba0 100644 --- a/doc/071-Final_System-Flex +++ b/doc/3-Chroot/034-Flex @@ -1,8 +1,9 @@ -# Final System: Flex 2.6.4 -# Source: https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz +# Final System: Flex # This section is done in Chroot environment -HELP2MAN=/tools/bin/true \ +ac_cv_func_malloc_0_nonnull=yes \ +ac_cv_func_realloc_0_nonnull=yes \ +HELP2MAN=/tools/bin/true \ ./configure --prefix=/usr --docdir=/usr/share/doc/flex-2.6.4 && make && make install diff --git a/doc/072-Final_System-Grep b/doc/3-Chroot/035-Grep similarity index 58% rename from doc/072-Final_System-Grep rename to doc/3-Chroot/035-Grep index 54588d8..b1e420a 100644 --- a/doc/072-Final_System-Grep +++ b/doc/3-Chroot/035-Grep @@ -1,5 +1,4 @@ -# Final System: Grep 3.3 -# Source: http://ftp.gnu.org/gnu/grep/grep-3.3.tar.xz +# Final System: Grep # This section is done in Chroot environment ./configure --prefix=/usr --bindir=/bin && make && make install diff --git a/doc/073-Final_System-Bash b/doc/3-Chroot/036-Bash similarity index 54% rename from doc/073-Final_System-Bash rename to doc/3-Chroot/036-Bash index 8926b76..584b25a 100644 --- a/doc/073-Final_System-Bash +++ b/doc/3-Chroot/036-Bash @@ -1,10 +1,12 @@ -# Final System: Bash 5.0 -# Source: http://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz +# Final System: Bash # This section is done in Chroot environment ./configure --prefix=/usr \ - --docdir=/usr/share/doc/bash-5.0 \ + --docdir=/usr/share/doc/bash-5.1 \ --without-bash-malloc \ - --with-installed-readline + --with-installed-readline \ + --with-curses + make && make install + mv -vf /usr/bin/bash /bin diff --git a/doc/109-Final_System-Make b/doc/3-Chroot/037-Libtool similarity index 55% rename from doc/109-Final_System-Make rename to doc/3-Chroot/037-Libtool index 2ea6443..16f8d12 100644 --- a/doc/109-Final_System-Make +++ b/doc/3-Chroot/037-Libtool @@ -1,5 +1,5 @@ -# Final System: Make -# Source: http://ftp.gnu.org/gnu/make/make-4.3.tar.bz2 +# Final System: Libtool # This section is done in Chroot environment ./configure --prefix=/usr && make && make install + diff --git a/doc/075-Final_System-GDBM b/doc/3-Chroot/038-GDBM similarity index 72% rename from doc/075-Final_System-GDBM rename to doc/3-Chroot/038-GDBM index 79550d6..b694ee4 100644 --- a/doc/075-Final_System-GDBM +++ b/doc/3-Chroot/038-GDBM @@ -1,5 +1,4 @@ -# Final System: GDBM 1.18.1 -# Source: http://ftp.gnu.org/gnu/gdbm/gdbm-1.18.1.tar.gz +# Final System: GDBM # This section is done in Chroot environment sed -r -i '/^char.*parseopt_program_(doc|args)/d' src/parseopt.c diff --git a/doc/076-Final_System-Gperf b/doc/3-Chroot/039-Gperf similarity index 60% rename from doc/076-Final_System-Gperf rename to doc/3-Chroot/039-Gperf index b413794..f3196b7 100644 --- a/doc/076-Final_System-Gperf +++ b/doc/3-Chroot/039-Gperf @@ -1,5 +1,4 @@ -# Final System: Gperf 3.1 -# Source: http://ftp.gnu.org/gnu/gperf/gperf-3.1.tar.gz +# Final System: Gperf # This section is done in Chroot environment ./configure --prefix=/usr --docdir=/usr/share/doc/gperf-3.1 diff --git a/doc/077-Final_System-Expat b/doc/3-Chroot/040-Expat similarity index 55% rename from doc/077-Final_System-Expat rename to doc/3-Chroot/040-Expat index d6bfc49..a393499 100644 --- a/doc/077-Final_System-Expat +++ b/doc/3-Chroot/040-Expat @@ -1,8 +1,7 @@ # Final System: Expat -# Source: https://prdownloads.sourceforge.net/expat/expat-2.2.9.tar.xz # This section is done in Chroot environment ./configure --prefix=/usr \ --disable-static \ - --docdir=/usr/share/doc/expat-2.2.9 + --docdir=/usr/share/doc/expat-2.4.1 make && make install diff --git a/doc/078-Final_System-Inetutils b/doc/3-Chroot/041-Inetutils similarity index 51% rename from doc/078-Final_System-Inetutils rename to doc/3-Chroot/041-Inetutils index 6f9b7f6..b624c32 100644 --- a/doc/078-Final_System-Inetutils +++ b/doc/3-Chroot/041-Inetutils @@ -1,7 +1,15 @@ -# Final System: Inetutils 1.9.4 -# Source: http://ftp.gnu.org/gnu/inetutils/inetutils-1.9.4.tar.xz +# Final System: Inetutils # This section is done in Chroot environment +# Patch source for utmpx support +patch -Np1 -i ../patches/inetutils-mlfs/logwtmp.patch + +# Fix a few files +sed -i 's|_GL_WARN_ON_USE (gets|//_GL_WARN_ON_USE (gets|' lib/stdio.in.h +echo '#define PATH_PROCNET_DEV "/proc/net/dev"' >> ifconfig/system/linux.h +sed -i 's|port : "whois"|port : "nicname"|' whois/whois.c + +# Configure source ./configure --prefix=/usr \ --localstatedir=/var \ --disable-logger \ diff --git a/doc/079-Final_System-Perl b/doc/3-Chroot/042-Perl similarity index 63% rename from doc/079-Final_System-Perl rename to doc/3-Chroot/042-Perl index fb3e194..c10fc73 100644 --- a/doc/079-Final_System-Perl +++ b/doc/3-Chroot/042-Perl @@ -1,5 +1,4 @@ # Final System: Perl -# Source: https://www.cpan.org/src/5.0/perl-5.32.0.tar.xz # This section is done in Chroot environment export BUILD_ZLIB=False @@ -17,19 +16,23 @@ sed -i '/\(bzip2\|zlib\)-src/d' MANIFEST # in programs such as rxvt-unicode patch -p1 < ../patches/perl-5.30-alpine/musl-locale.patch +patch -Np1 -i ../patches/perl-alpine/musl-stack-size.patch + +# Configure sh Configure -des -Dprefix=/usr \ -Dvendorprefix=/usr \ - -Dprivlib=/usr/lib/perl5/5.32/core_perl \ - -Darchlib=/usr/lib/perl5/5.32/core_perl \ - -Dsitelib=/usr/lib/perl5/5.32/site_perl \ - -Dsitearch=/usr/lib/perl5/5.32/site_perl \ - -Dvendorlib=/usr/lib/perl5/5.32/vendor_perl \ - -Dvendorarch=/usr/lib/perl5/5.32/vendor_perl \ + -Dprivlib=/usr/lib/perl5/5.34/core_perl \ + -Darchlib=/usr/lib/perl5/5.34/core_perl \ + -Dsitelib=/usr/lib/perl5/5.34/site_perl \ + -Dsitearch=/usr/lib/perl5/5.34/site_perl \ + -Dvendorlib=/usr/lib/perl5/5.34/vendor_perl \ + -Dvendorarch=/usr/lib/perl5/5.34/vendor_perl \ -Dman1dir=/usr/share/man/man1 \ -Dman3dir=/usr/share/man/man3 \ -Dpager="/usr/bin/less -isR" \ -Duseshrplib \ - -Dusethreads + -Dusethreads \ + -Dcccdlflags='-fPIC' -Dccdlflags='-rdynamic' make && make install export CFLAGS=$CF_OLD unset BUILD_ZLIB BUILD_BZIP2 CF_OLD diff --git a/doc/080-Final_System-XML_Parser b/doc/3-Chroot/043-XML-Parser similarity index 58% rename from doc/080-Final_System-XML_Parser rename to doc/3-Chroot/043-XML-Parser index 256ba61..22fe177 100644 --- a/doc/080-Final_System-XML_Parser +++ b/doc/3-Chroot/043-XML-Parser @@ -1,5 +1,4 @@ # Final System: XML::Parser -# Source: https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.46.tar.gz # This section is done in Chroot environment perl Makefile.PL && make && make install diff --git a/doc/081-Final_System-Intltool b/doc/3-Chroot/044-Intltool similarity index 54% rename from doc/081-Final_System-Intltool rename to doc/3-Chroot/044-Intltool index 138b2a6..eef437e 100644 --- a/doc/081-Final_System-Intltool +++ b/doc/3-Chroot/044-Intltool @@ -1,5 +1,4 @@ -# Final System: Intltool 0.51.0 -# Source: https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz +# Final System: Intltool # This section is done in Chroot environment sed -i 's:\\\${:\\\$\\{:' intltool-update.in diff --git a/doc/3-Chroot/045-Autoconf b/doc/3-Chroot/045-Autoconf new file mode 100644 index 0000000..bd745c0 --- /dev/null +++ b/doc/3-Chroot/045-Autoconf @@ -0,0 +1,5 @@ +# Final System: Autoconf +# This section is done in Chroot environment + +./configure --prefix=/usr +make && make install diff --git a/doc/083-Final_System-Automake b/doc/3-Chroot/046-Automake similarity index 70% rename from doc/083-Final_System-Automake rename to doc/3-Chroot/046-Automake index 0e38794..4eec051 100644 --- a/doc/083-Final_System-Automake +++ b/doc/3-Chroot/046-Automake @@ -1,6 +1,5 @@ # Final System: Automake -# Source: http://ftp.gnu.org/gnu/automake/automake-1.16.2.tar.xz # This section is done in Chroot environment -./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.16.2 +./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.16.3 make && make install diff --git a/doc/084-Final_System-Musl_FTS b/doc/3-Chroot/047-Musl-FTS similarity index 55% rename from doc/084-Final_System-Musl_FTS rename to doc/3-Chroot/047-Musl-FTS index 9b0d00c..2ae57ff 100644 --- a/doc/084-Final_System-Musl_FTS +++ b/doc/3-Chroot/047-Musl-FTS @@ -1,9 +1,10 @@ -# Final System: Musl-FTS 1.2.7 -# Source: https://github.com/pullmoll/musl-fts/archive/v1.2.7.tar.gz +# Final System: Musl-FTS # This section is done in Chroot environment sed -i "/pkgconfig_DATA/i pkgconfigdir=/usr/lib/pkgconfig" Makefile.am ./bootstrap.sh -./configure --prefix=/usr +CFLAGS=" -fPIC" \ +./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var + make && make install diff --git a/doc/085-Final_System-Musl_Obstack b/doc/3-Chroot/048-Musl-Obstack similarity index 54% rename from doc/085-Final_System-Musl_Obstack rename to doc/3-Chroot/048-Musl-Obstack index aeab373..637ecb9 100644 --- a/doc/085-Final_System-Musl_Obstack +++ b/doc/3-Chroot/048-Musl-Obstack @@ -1,8 +1,10 @@ -# Final System: Musl-Obstack 1.1 -# Source: https://github.com/pullmoll/musl-obstack/archive/v1.1.tar.gz +# Final System: Musl-Obstack # This section is done in Chroot environment sed -i "/pkgconfig_DATA/i pkgconfigdir=/usr/lib/pkgconfig" Makefile.am ./bootstrap.sh -./configure --prefix=/usr + +CFLAGS=" -fPIC" \ +./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var + make && make install diff --git a/doc/3-Chroot/049-Musl-Rpmatch b/doc/3-Chroot/049-Musl-Rpmatch new file mode 100644 index 0000000..7c539a4 --- /dev/null +++ b/doc/3-Chroot/049-Musl-Rpmatch @@ -0,0 +1,10 @@ +# Final System: Musl-rpmatch +# This section is done in Chroot environment + +./bootstrap.sh + +CFLAGS=" -fPIC" \ +./configure --prefix=/usr --enable-shared \ + --enable-static --localstatedir=/var + +make && make install diff --git a/doc/087-Final_System-Xz b/doc/3-Chroot/050-Xz similarity index 87% rename from doc/087-Final_System-Xz rename to doc/3-Chroot/050-Xz index d550e59..62b35e4 100644 --- a/doc/087-Final_System-Xz +++ b/doc/3-Chroot/050-Xz @@ -1,5 +1,4 @@ # Final System: Xz -# Source: https://tukaani.org/xz/xz-5.2.5.tar.xz # This section is done in Chroot environment ./configure --prefix=/usr \ diff --git a/doc/088-Final_System-Kmod b/doc/3-Chroot/051-Kmod similarity index 84% rename from doc/088-Final_System-Kmod rename to doc/3-Chroot/051-Kmod index 9bf3eb3..a36c7c3 100644 --- a/doc/088-Final_System-Kmod +++ b/doc/3-Chroot/051-Kmod @@ -1,5 +1,4 @@ # Final System: Kmod -# Source: https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-27.tar.xz # This section is done in Chroot environment ./configure --prefix=/usr \ diff --git a/doc/3-Chroot/052-Gettext-Tiny b/doc/3-Chroot/052-Gettext-Tiny new file mode 100644 index 0000000..3121d2e --- /dev/null +++ b/doc/3-Chroot/052-Gettext-Tiny @@ -0,0 +1,13 @@ +# Final System: Gettext-Tiny +# This section is done in Chroot environment + +# Apply Patches from Adelie Linux: +patch -Np1 -i ../patches/gettext-tiny-adiele/line-length.patch && +patch -Np1 -i ../patches/gettext-tiny-adiele/respect-cflags.patch && +patch -Np1 -i ../patches/gettext-tiny-adiele/stop-doing-macro-crap.patch + +# Compile +LIBINTL=MUSL prefix=/usr make + +# Install +make LIBINTL=MUSL prefix=/usr install diff --git a/doc/3-Chroot/053-Musl-Legacy-Compat b/doc/3-Chroot/053-Musl-Legacy-Compat new file mode 100644 index 0000000..2921014 --- /dev/null +++ b/doc/3-Chroot/053-Musl-Legacy-Compat @@ -0,0 +1,7 @@ +# Final System: Musl Legacy Compatibility Headers +# This section is done in Chroot environment + +for h in cdefs queue tree +do + install -v -D -m644 files/musl-legacy-compat-void/$h.h /usr/include/sys +don diff --git a/doc/118-Final_System-Zstd b/doc/3-Chroot/054-Zstd similarity index 77% rename from doc/118-Final_System-Zstd rename to doc/3-Chroot/054-Zstd index eba1664..1fabbbb 100644 --- a/doc/118-Final_System-Zstd +++ b/doc/3-Chroot/054-Zstd @@ -1,5 +1,4 @@ # Final System: Zstd -# Source: https://github.com/facebook/zstd/releases/download/v1.4.5/zstd-1.4.5.tar.gz # This section is done in Chroot environment make diff --git a/doc/3-Chroot/055-Libelf b/doc/3-Chroot/055-Libelf new file mode 100644 index 0000000..02a279c --- /dev/null +++ b/doc/3-Chroot/055-Libelf @@ -0,0 +1,22 @@ +# Final System: Libelf +# This section is done in Chroot environment + +# Add missing files +cp -vr ../files/elfutils-void/error.h lib/ +cp -vr ../files/elfutils-void/error.h src/ + +# Re-create configure script +autoreconf -ifv + +# Configure source +CFLAGS="-DFNM_EXTMATCH=0 -Wno-error -Wno-error=null-dereference -Wl,-z,stack-size=2097152" \ +./configure --prefix=/usr --disable-debuginfod \ + --disable-libdebuginfod +# Build only the library +make -C lib && make -C libelf + +# Install library +make -C libelf install + +# Install pkgconfig file for library +install -vm644 config/libelf.pc /usr/lib/pkgconfig diff --git a/doc/091-Final_System-libffi b/doc/3-Chroot/056-Libffi similarity index 94% rename from doc/091-Final_System-libffi rename to doc/3-Chroot/056-Libffi index 44517a5..11c4cd6 100644 --- a/doc/091-Final_System-libffi +++ b/doc/3-Chroot/056-Libffi @@ -1,5 +1,4 @@ # Final System: Libffi -# Source: ftp://sourceware.org/pub/libffi/libffi-3.3.tar.gz # This section is done in Chroot environment # Configure source. If host and target are the same machine, diff --git a/doc/092-Final_System-libreSSL b/doc/3-Chroot/057-LibreSSL similarity index 70% rename from doc/092-Final_System-libreSSL rename to doc/3-Chroot/057-LibreSSL index 203a67e..67d62df 100644 --- a/doc/092-Final_System-libreSSL +++ b/doc/3-Chroot/057-LibreSSL @@ -1,13 +1,7 @@ -# Final System: LibreSSL 3.2.1 +# Final System: LibreSSL # This section is done in Chroot environment -# Source: http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.2.1.tar.gz # If building Rustc-1.45.1, use LibreSSL-3.0.0 instead -# Apply patches (from alpine): -#patch -Np1 -i ../patches/libressl-alpine/s_client-add-options-verify_.patch # for v3.x.x -patch -Np1 -i ../patches/libressl-alpine/ssl-libcompat.patch -#patch -Np1 -i ../patches/libressl-alpine/starttls-ldap.patch # for v3.x.x - # Run autoreconf autoreconf -vif diff --git a/doc/093-Final_System-Python b/doc/3-Chroot/058-Python3 similarity index 58% rename from doc/093-Final_System-Python rename to doc/3-Chroot/058-Python3 index ebab797..5d7d71e 100644 --- a/doc/093-Final_System-Python +++ b/doc/3-Chroot/058-Python3 @@ -1,5 +1,4 @@ # Final System: Python 3 -# Source: https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tar.xz # This section is done in Chroot environment patch -Np0 -i ../patches/python3-void/musl-find_library.patch @@ -10,18 +9,20 @@ rm -r Modules/expat rm -r Modules/_ctypes/{darwin,libffi}* # Configure source -./configure --prefix=/usr \ - --enable-shared \ - --with-system-expat \ - --with-system-ffi \ +./configure --prefix=/usr \ + --enable-shared \ + --with-system-expat \ + --with-system-ffi \ --with-ensurepip=yes \ - --enable-ipv6 \ - --with-threads --enable-loadable-sqlite-extensions --with-computed-gotos + --enable-ipv6 \ + --with-threads \ + --enable-loadable-sqlite-extensions \ + --with-computed-gotos # Build and install make && make install # Change permissions to allow stripping later -chmod -v 755 /usr/lib/libpython3.8.so +chmod -v 755 /usr/lib/libpython3.9.so chmod -v 755 /usr/lib/libpython3.so diff --git a/doc/094-Final_System-Ninja b/doc/3-Chroot/059-Ninja similarity index 87% rename from doc/094-Final_System-Ninja rename to doc/3-Chroot/059-Ninja index 5d6b08a..0b01adb 100644 --- a/doc/094-Final_System-Ninja +++ b/doc/3-Chroot/059-Ninja @@ -1,5 +1,4 @@ # Final System: Ninja -# Source: https://github.com/ninja-build/ninja/archive/v1.10.0/ninja-1.10.0.tar.gz # This section is done in Chroot environment # If desired, add the capability to use the diff --git a/doc/095-Final_System-Meson b/doc/3-Chroot/060-Meson similarity index 64% rename from doc/095-Final_System-Meson rename to doc/3-Chroot/060-Meson index 29393c3..ad07b12 100644 --- a/doc/095-Final_System-Meson +++ b/doc/3-Chroot/060-Meson @@ -1,5 +1,4 @@ # Final System: Meson -# Source: https://github.com/mesonbuild/meson/releases/download/0.55.1/meson-0.55.1.tar.gz # This section is done in Chroot environment # Build diff --git a/doc/096-Final_System-Procps b/doc/3-Chroot/061-Procps-ng similarity index 67% rename from doc/096-Final_System-Procps rename to doc/3-Chroot/061-Procps-ng index 15c5f13..9fd18d1 100644 --- a/doc/096-Final_System-Procps +++ b/doc/3-Chroot/061-Procps-ng @@ -1,15 +1,17 @@ # Final System: Procps-ng -# Source: https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-3.3.16.tar.xz # This section is done in Chroot environment -sed -i 's,ncursesw/ncurses.h,ncurses.h,g' watch.c - -autoreconf -fiv +autoreconf -fiv && \ +patch -Np1 -i ../patches/procps-mlfs/use_utmpx.patch && \ +sed -i '1i#include ' proc/escape.c +LIBS="$LIBS -lutmps -lskarnet" \ +ac_cv_func_malloc_0_nonnull=yes \ +ac_cv_func_realloc_0_nonnull=yes \ ./configure --prefix=/usr \ --exec-prefix= \ --libdir=/usr/lib \ - --docdir=/usr/share/doc/procps-ng-3.3.16 \ + --docdir=/usr/share/doc/procps-ng-3.3.17 \ --disable-static \ --disable-kill \ --enable-watch8bit \ diff --git a/doc/097-Final_System-Coreutils b/doc/3-Chroot/062-Coreutils similarity index 86% rename from doc/097-Final_System-Coreutils rename to doc/3-Chroot/062-Coreutils index 0675acd..a6fff6b 100644 --- a/doc/097-Final_System-Coreutils +++ b/doc/3-Chroot/062-Coreutils @@ -1,9 +1,8 @@ # Final System: Coreutils -# Source: http://ftp.gnu.org/gnu/coreutils/coreutils-8.32.tar.xz # This section is done in Chroot environment # Apply patches -patch -Np0 -i ../patches/coreutils-void/0001-ls-restore-8.31-behavior-on-removed-directories.patch +patch -Np1 -i ../patches/coreutils-alpine/ls.patch # Recreate configure script autoreconf -vfi @@ -14,6 +13,8 @@ sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk # Configure ac_cv_func_syncfs=no \ FORCE_UNSAFE_CONFIGURE=1 \ +CFLAGS="-I/usr/include/utmps" \ +LIBS="-lutmps -lskarnet -lrt" \ ./configure --prefix=/usr \ --enable-no-install-program=kill,uptime \ --disable-rpath \ diff --git a/doc/098-Final_System-Check b/doc/3-Chroot/063-Check similarity index 59% rename from doc/098-Final_System-Check rename to doc/3-Chroot/063-Check index 6c46863..1c6c689 100644 --- a/doc/098-Final_System-Check +++ b/doc/3-Chroot/063-Check @@ -1,9 +1,10 @@ -# Final System: Check 0.15.2 -# Source: https://github.com/libcheck/check/releases/download/0.15.2/check-0.15.2.tar.gz +# Final System: Check # This section is done in Chroot environment +# Configure ./configure --prefix=/usr --disable-static && +# Build & install make && make install # Fix a script diff --git a/doc/099-Final_System-Diffutils b/doc/3-Chroot/064-Diffutils similarity index 65% rename from doc/099-Final_System-Diffutils rename to doc/3-Chroot/064-Diffutils index c974ada..eb89ab2 100644 --- a/doc/099-Final_System-Diffutils +++ b/doc/3-Chroot/064-Diffutils @@ -1,6 +1,8 @@ # Final System: Diffutils -# Source: http://ftp.gnu.org/gnu/diffutils/diffutils-3.7.tar.xz # This section is done in Chroot environment +# Configure ./configure --prefix=/usr + +# Build and install make && make install diff --git a/doc/100-Final_System-Gawk b/doc/3-Chroot/065-Gawk similarity index 77% rename from doc/100-Final_System-Gawk rename to doc/3-Chroot/065-Gawk index 1f324b2..3db07c2 100644 --- a/doc/100-Final_System-Gawk +++ b/doc/3-Chroot/065-Gawk @@ -1,10 +1,11 @@ # Final System: Gawk -# Source: http://ftp.gnu.org/gnu/gawk/gawk-5.1.0.tar.xz # This section is done in Chroot environment # Ensure some unneeded files are not installed sed -i 's/extras//' Makefile.in +# Configure ./configure --prefix=/usr +# Build & install make && make install diff --git a/doc/101-Final_System-Findutils b/doc/3-Chroot/066-Findutils similarity index 78% rename from doc/101-Final_System-Findutils rename to doc/3-Chroot/066-Findutils index 32bb983..a7f4789 100644 --- a/doc/101-Final_System-Findutils +++ b/doc/3-Chroot/066-Findutils @@ -1,12 +1,10 @@ # Final System: Findutils -# Source: http://ftp.gnu.org/gnu/findutils/findutils-4.7.0.tar.xz # This section is done in Chroot environment # Configure source ./configure --prefix=/usr --localstatedir=/var/lib/locate # Build in this order: -#make -C locate dblocation.texi && make # Install diff --git a/doc/102-Final_System-Groff b/doc/3-Chroot/067-Groff similarity index 84% rename from doc/102-Final_System-Groff rename to doc/3-Chroot/067-Groff index a9ae526..0e2ffc4 100644 --- a/doc/102-Final_System-Groff +++ b/doc/3-Chroot/067-Groff @@ -1,10 +1,11 @@ # Final System: Groff -# Source: http://ftp.gnu.org/gnu/groff/groff-1.22.4.tar.gz # This section is done in Chroot environment #For users in the United States, PAGE=letter is appropriate. Elsewhere, PAGE=A4 may be more suitable. #It can be overridden later by echoing either `A4` or `letter` to the `/etc/papersize` file. +# Configure PAGE= ./configure --prefix=/usr +# Build and install make -j1 && make install diff --git a/doc/3-Chroot/068-Grub b/doc/3-Chroot/068-Grub new file mode 100644 index 0000000..b10172d --- /dev/null +++ b/doc/3-Chroot/068-Grub @@ -0,0 +1,39 @@ +# Final System: Grub +# This section is done in Chroot environment + +# Apply patches from Apline Linux +patch -Np1 -i ../patches/grub-alpine/lang-C.UTF-8.patch && \ +patch -Np1 -i ../patches/grub-alpine/fix-gcc-no-pie-specs.patch && \ +patch -Np1 -i ../patches/grub-alpine/alpine-mkconfig.patch + +# Regenerate configure script +PYTHON=python3 ./autogen.sh + +################################################# +# for BIOS-based PCs: +case $(uname -m) in + i686|x86_64) export XCONF="-with-platform=pc" ;; +esac + +./configure --prefix=/usr \ + --sbindir=/sbin \ + --sysconfdir=/etc \ + --disable-efiemu \ + --disable-werror $XCONF +unset $XCONF + +################################################# +# for UEFI-based PCs: +export XCONF="--with-platform=efi --disable-efiemu" +case $(uname -m) in + x86_64) export XCONF="$XCONF --target=x86_64" ;; + i686) export XCONF="$XCONF --target=i386" ;; +esac +./configure --prefix=/usr \ + --sbindir=/sbin \ + --sysconfdir=/etc \ + --disable-werror $XCONF + +# Build and install +make && make install +unset $XCONF diff --git a/doc/104-Final_System-Less b/doc/3-Chroot/069-Less similarity index 68% rename from doc/104-Final_System-Less rename to doc/3-Chroot/069-Less index de4fee9..427646a 100644 --- a/doc/104-Final_System-Less +++ b/doc/3-Chroot/069-Less @@ -1,7 +1,8 @@ # Final System: Less -# Source: http://www.greenwoodsoftware.com/less/less-551.tar.gz # This section is done in Chroot environment +# Configure ./configure --prefix=/usr --sysconfdir=/etc && +# Build and install make && make install diff --git a/doc/105-Final_System-Gzip b/doc/3-Chroot/070-Gzip similarity index 81% rename from doc/105-Final_System-Gzip rename to doc/3-Chroot/070-Gzip index 536c7ce..42a81d3 100644 --- a/doc/105-Final_System-Gzip +++ b/doc/3-Chroot/070-Gzip @@ -1,5 +1,4 @@ # Final System: Gzip -# Source: http://ftp.gnu.org/gnu/gzip/gzip-1.10.tar.xz # This section is done in Chroot environment # Configure source diff --git a/doc/3-Chroot/071-IPRoute2 b/doc/3-Chroot/071-IPRoute2 new file mode 100644 index 0000000..0c0be94 --- /dev/null +++ b/doc/3-Chroot/071-IPRoute2 @@ -0,0 +1,18 @@ +# Final System: IProute2 +# This section is done in Chroot environment + +# The arpd program included in this package will not be +# built since it is dependent on Berkeley DB, which is +# not installed in MLFS +sed -i /ARPD/d Makefile +rm -fv man/man8/arpd.8 + +# It is also necessary to disable building two modules that require +# iptables, not installed in MLFS +sed -i 's/.m_ipt.o//' tc/Makefile + +# Build +make + +# Install +make DOCDIR=/usr/share/doc/iproute2-5.12.0 install diff --git a/doc/107-Final_System-KBD b/doc/3-Chroot/072-KBD similarity index 95% rename from doc/107-Final_System-KBD rename to doc/3-Chroot/072-KBD index d86f680..f622bc5 100644 --- a/doc/107-Final_System-KBD +++ b/doc/3-Chroot/072-KBD @@ -1,5 +1,4 @@ # Final System: KBD -# Source: https://www.kernel.org/pub/linux/utils/kbd/kbd-2.3.0.tar.xz # This section is done in Chroot environment patch -Np1 -i ../patches/kbd-lfs/kbd-2.3.0-backspace-1.patch @@ -40,8 +39,6 @@ autoreconf -fvi sed -e '/^PKG_CHECK_MODULES.*/d' -i configure.ac sed -e 's,tests ,,g' -i Makefile.am - - # Configure ./configure --prefix=/usr --disable-vlock diff --git a/doc/3-Chroot/073-Libpipeline b/doc/3-Chroot/073-Libpipeline new file mode 100644 index 0000000..11ebc82 --- /dev/null +++ b/doc/3-Chroot/073-Libpipeline @@ -0,0 +1,11 @@ +# Final System: Libpipeline +# This section is done in Chroot environment + +# Configure +./configure --prefix=/usr + +# Build +make + +# Install +make install diff --git a/doc/3-Chroot/074-Make b/doc/3-Chroot/074-Make new file mode 100644 index 0000000..3dfb17a --- /dev/null +++ b/doc/3-Chroot/074-Make @@ -0,0 +1,11 @@ +# Final System: Make +# This section is done in Chroot environment + +# Configure +./configure --prefix=/usr + +# Build +make + +# Install +make install diff --git a/doc/3-Chroot/075-Patch b/doc/3-Chroot/075-Patch new file mode 100644 index 0000000..b6a3652 --- /dev/null +++ b/doc/3-Chroot/075-Patch @@ -0,0 +1,11 @@ +# Final System: Patch +# This section is done in Chroot environment + +# Configure +./configure --prefix=/usr + +# Build +make + +# Install +make install diff --git a/doc/111-Final_System-Man_DB b/doc/3-Chroot/076-Man-DB similarity index 83% rename from doc/111-Final_System-Man_DB rename to doc/3-Chroot/076-Man-DB index 6710b6d..7cce182 100644 --- a/doc/111-Final_System-Man_DB +++ b/doc/3-Chroot/076-Man-DB @@ -1,16 +1,13 @@ # Final system: Man-DB -# Source: http://download.savannah.gnu.org/releases/man-db/man-db-2.9.3.tar.xz # This section is done in Chroot environment # Apply patches from void patch -Np0 -i ../patches/man-db-void/guard-glibc-iconv-ext.patch patch -Np0 -i ../patches/man-db-void/add-missing-stdlib_h-include.patch -export CFLAGS+=" -I/usr/include/gettext" -export LDFLAGS+=" -lintl" - +# Configure ./configure --prefix=/usr \ - --docdir=/usr/share/doc/man-db-2.9.3 \ + --docdir=/usr/share/doc/man-db-2.9.4 \ --sysconfdir=/etc \ --disable-setuid \ --enable-cache-owner=bin \ @@ -25,6 +22,8 @@ export LDFLAGS+=" -lintl" --without-included-regex \ --enable-automatic-create +# Build and install make && make install +# Clean up unset CFLAGS LDFLAGS diff --git a/doc/112-Final_System-Tar b/doc/3-Chroot/077-Tar similarity index 79% rename from doc/112-Final_System-Tar rename to doc/3-Chroot/077-Tar index 019a19f..d2fc352 100644 --- a/doc/112-Final_System-Tar +++ b/doc/3-Chroot/077-Tar @@ -1,10 +1,11 @@ # Final System: Tar -# Source: http://ftp.gnu.org/gnu/tar/tar-1.32.tar.xz # This section is done in Chroot environment +# Configure FORCE_UNSAFE_CONFIGURE=1 \ gl_cv_struct_dirent_d_ino=yes \ ./configure --prefix=/usr \ --bindir=/bin +# Build & install make && make install diff --git a/doc/113-Final_System-Texinfo b/doc/3-Chroot/078-Texinfo similarity index 58% rename from doc/113-Final_System-Texinfo rename to doc/3-Chroot/078-Texinfo index a45d594..ea08ddb 100644 --- a/doc/113-Final_System-Texinfo +++ b/doc/3-Chroot/078-Texinfo @@ -1,8 +1,11 @@ # Final System: Texinfo -# Source: http://ftp.gnu.org/gnu/texinfo/texinfo-6.7.tar.xz # This section is done in Chroot environment - +# Configure ./configure --prefix=/usr --disable-static -make && make install +# Build +make + +# Install +make install diff --git a/doc/114-Final_System-Vim b/doc/3-Chroot/079-Vim similarity index 72% rename from doc/114-Final_System-Vim rename to doc/3-Chroot/079-Vim index 69ad287..528fa95 100644 --- a/doc/114-Final_System-Vim +++ b/doc/3-Chroot/079-Vim @@ -1,18 +1,26 @@ # Final System: Vim -# Source: http://anduin.linuxfromscratch.org/LFS/vim-8.2.1361.tar.gz # This section is done in Chroot environment # Change the default location of the vimrc # configuration file to /etc echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h -./configure --prefix=/usr && make && make install +# Configure +./configure --prefix=/usr +# Build & install +make && make install + +# For some, it is a habbit to invoke vi instead of vim ln -sv vim /usr/bin/vi + +# Fix the docs for L in /usr/share/man/{,*/}man1/vim.1; do ln -sv vim.1 $(dirname $L)/vi.1 done -ln -sv ../vim/vim82/doc /usr/share/doc/vim-8.2.1361 +ln -sv ../vim/vim82/doc /usr/share/doc/vim-8.2.2890 + +# Create a simple configuration cat > /etc/vimrc << "EOF" " Begin /etc/vimrc diff --git a/doc/115-Final_System-Util_Linux b/doc/3-Chroot/080-Util-Linux similarity index 72% rename from doc/115-Final_System-Util_Linux rename to doc/3-Chroot/080-Util-Linux index d032c86..7aa0c7b 100644 --- a/doc/115-Final_System-Util_Linux +++ b/doc/3-Chroot/080-Util-Linux @@ -1,19 +1,27 @@ # Final System: Util-Linux -# Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.36/util-linux-2.36.tar.xz # This section is done in Chroot environment +# Aplly fix from void patch -Np0 -i ../patches/util-linux-void/fix-musl.patch mkdir -pv /var/lib/hwclock rm -vf /usr/include/{blkid,libmount,uuid} +cp -v ../files/util-linux-adelie/ttydefaults.h include/ && + +# Regenerate a few scripts +libtoolize --force && aclocal -I m4 && autoconf -v && +automake --add-missing + # musl needs this for switch_root(8). export CFLAGS="-D_DIRENT_HAVE_D_TYPE" +# Regenerate configure script NOCONFIGURE=1 ./autogen.sh +LIBS="-lutmps -lskarnet" \ ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ - --docdir=/usr/share/doc/util-linux-2.36 \ + --docdir=/usr/share/doc/util-linux-2.36.2 \ --disable-chfn-chsh \ --disable-login \ --disable-nologin \ diff --git a/doc/116-Final_System-E2fsprogs b/doc/3-Chroot/081-E2fsprogs similarity index 86% rename from doc/116-Final_System-E2fsprogs rename to doc/3-Chroot/081-E2fsprogs index acdde98..6d76b86 100644 --- a/doc/116-Final_System-E2fsprogs +++ b/doc/3-Chroot/081-E2fsprogs @@ -1,10 +1,10 @@ # Final System: E2fsprogs -# Source: https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.45.6/e2fsprogs-1.45.6.tar.gz # This section is done in Chroot environment - +# Build in a dedicated directory mkdir -v build && cd build +# configure e2fsprogs_cv_struct_st_flags=no \ ../configure --prefix=/usr \ --bindir=/bin \ @@ -16,11 +16,16 @@ e2fsprogs_cv_struct_st_flags=no \ --disable-fsck \ --enable-e2initrd-helper \ --disable-rpath - +# build make +# Install make install && make install-libs + +# Fix permissions for stripping later on chmod -v u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a + +# Fix docs gunzip -v /usr/share/info/libext2fs.info.gz install-info --dir-file=/usr/share/info/dir /usr/share/info/libext2fs.info diff --git a/doc/117-Final_System-Eudev b/doc/3-Chroot/082-Eudev similarity index 80% rename from doc/117-Final_System-Eudev rename to doc/3-Chroot/082-Eudev index e1e1f40..561828b 100644 --- a/doc/117-Final_System-Eudev +++ b/doc/3-Chroot/082-Eudev @@ -1,9 +1,10 @@ # Final System: Eudev -# Source: https://dev.gentoo.org/~blueness/eudev/eudev-3.2.9.tar.gz # This section is done in Chroot environment +# Regenerate configure script autoreconf -fiv +# Configure ./configure --prefix=/usr \ --bindir=/sbin \ --sbindir=/sbin \ @@ -15,9 +16,9 @@ autoreconf -fiv --enable-manpages \ --disable-static +# Build and install make && make install +# Install some useful udev rules tar -xvf ../udev-mlfs-20191014.tar.xz -# Edit udev-lfs-20171102/55-lfs.rules: -# Comment out the lines for rtc make -f udev-mlfs-20191014/Makefile.mlfs install diff --git a/doc/119-Final_System-Cpio b/doc/3-Chroot/083-Cpio similarity index 86% rename from doc/119-Final_System-Cpio rename to doc/3-Chroot/083-Cpio index 2087c36..faf4087 100644 --- a/doc/119-Final_System-Cpio +++ b/doc/3-Chroot/083-Cpio @@ -1,5 +1,4 @@ # Final System: Cpio -# Source: https://ftp.gnu.org/gnu/cpio/cpio-2.13.tar.bz2 # Required when building an initrd for boot # Recreate configure @@ -18,4 +17,5 @@ sed -i '/The name/,+2 d' src/global.c make make install +# Clean up unset CFLAGS diff --git a/doc/3-Chroot/084-Execline b/doc/3-Chroot/084-Execline new file mode 100644 index 0000000..15158a3 --- /dev/null +++ b/doc/3-Chroot/084-Execline @@ -0,0 +1,13 @@ +# Final System: Execline +# This section is done in Chroot environment + +./configure --enable-shared \ + --enable-static \ + --enable-allstatic \ + --enable-static-libc \ + --libdir=/usr/lib \ + --with-dynlib=/lib \ + --enable-pedantic-posix + +make +make install diff --git a/doc/3-Chroot/085-S6 b/doc/3-Chroot/085-S6 new file mode 100644 index 0000000..622b19e --- /dev/null +++ b/doc/3-Chroot/085-S6 @@ -0,0 +1,16 @@ +# Final System: S6 +# This section is done in Chroot environment + +# Configure source +./configure --enable-shared \ + --enable-static \ + --enable-allstatic \ + --enable-static-libc \ + --libdir=/usr/lib \ + --libexecdir=/lib/s6 \ + --with-dynlib=/lib +# Build +make + +# Install +make install diff --git a/doc/3-Chroot/086-S6-RC b/doc/3-Chroot/086-S6-RC new file mode 100644 index 0000000..9d7ba2d --- /dev/null +++ b/doc/3-Chroot/086-S6-RC @@ -0,0 +1,17 @@ +# Final System: S6-RC +# This section is done in Chroot environment + +# Configure +./configure --enable-shared \ + --enable-static \ + --enable-allstatic \ + --enable-static-libc \ + --libdir=/usr/lib \ + --libexecdir=/lib/s6-rc \ + --with-dynlib=/lib + +# Build +make + +# Install +make install diff --git a/doc/3-Chroot/087-S6-Linux-Utils b/doc/3-Chroot/087-S6-Linux-Utils new file mode 100644 index 0000000..fbd81e0 --- /dev/null +++ b/doc/3-Chroot/087-S6-Linux-Utils @@ -0,0 +1,13 @@ +# Final System: S6-Linux-Utils +# This section is done in Chroot environment + +# Configure +./configure --disable-allstatic \ + --prefix=/usr \ + --with=dynlib=/lib + +# Compile +make + +# Install +make install diff --git a/doc/3-Chroot/088-S6-Portable-Utils b/doc/3-Chroot/088-S6-Portable-Utils new file mode 100644 index 0000000..3ccfb99 --- /dev/null +++ b/doc/3-Chroot/088-S6-Portable-Utils @@ -0,0 +1,18 @@ +# Final System: S6-Portable-Utils +# This section is done in Chroot environment + +# Configure +./configure --enable-shared \ + --enable-static \ + --enable-allstatic \ + --enable-static-libc \ + --libdir=/usr/lib \ + --libexecdir=/lib/s6-portable-utils \ + --with-dynlib=/lib + +# Compile +make + +# Install +make install + diff --git a/doc/3-Chroot/089-S6-Linux-init b/doc/3-Chroot/089-S6-Linux-init new file mode 100644 index 0000000..8ec2ca7 --- /dev/null +++ b/doc/3-Chroot/089-S6-Linux-init @@ -0,0 +1,18 @@ +# Final System: S6-Linux-init +# This section is done in Chroot environment + +# Configure +./configure --enable-shared \ + --enable-static \ + --enable-allstatic \ + --enable-static-libc \ + --libdir=/usr/lib \ + --libexecdir=/lib/s6-linux-init \ + --with-dynlib=/lib \ + --enable-utmps + +# Compile +make + +# Install +make install diff --git a/doc/127-Final_System-Stripping b/doc/3-Chroot/090-Stripping similarity index 100% rename from doc/127-Final_System-Stripping rename to doc/3-Chroot/090-Stripping diff --git a/doc/128-Final_System-Clean_up b/doc/3-Chroot/091-Clean-up similarity index 100% rename from doc/128-Final_System-Clean_up rename to doc/3-Chroot/091-Clean-up diff --git a/doc/3-Chroot/092-Bootscripts b/doc/3-Chroot/092-Bootscripts new file mode 100644 index 0000000..051255c --- /dev/null +++ b/doc/3-Chroot/092-Bootscripts @@ -0,0 +1,54 @@ +# Final System: S6 Bootscripts +# Source: https://github.com/dslm4515/MLFS-S6-Bootscripts +# This section is done in Chroot environment + +# Copy s6 directory to /etc +cp -ar s6 /etc/ + +# Copy config for setting up virtual terminals (VT's) +cp -av vconsole.conf /etc/ + +# Copy useful utilities +install -v -m755 modules-load /usr/bin/ +install -v -m755 tmpfiles /bin/ + +# Compile a basic database for boot +s6-rc-compile /etc/s6/db/basic /etc/s6/sv +ln -sv /etc/s6/db/basic /etc/s6/db/current + +# Copy necessary scripts to boot, reboot, and poweroff system +install -v -m755 s6/base/bin/* /sbin/ +mv /etc/s6/base/scripts /etc/s6/scripts + +# Re-initialize s6 init base. +# ** Must be done anytime s6 init base is unpacked or copied. ** +rm -rf /etc/s6/base +s6-linux-init-maker -1 -f /etc/s6/skel -p "/bin:/sbin:/usr/bin" \ + -D default -G "/sbin/agetty -L -8 tty1 115200" \ + -c /etc/s6/base -t 2 -L -u root -U utmp /etc/s6/base +rm -rf /etc/s6/base/scripts +cp -r /etc/s6/scripts /etc/s6/base/scripts + +# Copy scripts to bring NIC's up and down +install -v -m755 if* /sbin/ +mkdir -pv /lib/services +install -v -m755 net-services/* /lib/services/ + +#For logging services, create the log user as root: +groupadd -g 983 s6log && +useradd -c "S6-Log User" -d / \ + -u 983 -g s6log -s /usr/bin/false s6log + +# Bootscripts require system boot with a initramfs image. It's unlcear +# why boot scripts work without an initramfs loaded at boot. You may +# use thses scripts from BLFS to build one. Script requires cpio installed. + +# Copy the script to /sbin: +install -v -m755 mkinitrd/mkinitramfs /sbin/ + +# Copy the configuration: +mkdir -p /usr/share/mkinitramfs +install -v -m644 mkinitrd/init.in /usr/share/mkinitramfs/ + +# To use [after booting a MLFS build], use the running kernel version: +mkinitramfs $(uname -r) diff --git a/doc/130-Final_System-Network_Configuration b/doc/3-Chroot/093-Network-Configuration similarity index 96% rename from doc/130-Final_System-Network_Configuration rename to doc/3-Chroot/093-Network-Configuration index 43f9c25..214ea75 100644 --- a/doc/130-Final_System-Network_Configuration +++ b/doc/3-Chroot/093-Network-Configuration @@ -43,7 +43,6 @@ EOF # Set the hostname # in this eample, 'mlfs': -ln -v /etc/s6/env/HOSTNAME /etc/hostname echo "mlfs" > /etc/hostname # Create the /etc/hosts file diff --git a/doc/131-Final_System-Bash_Startup_Scripts b/doc/3-Chroot/094-Bash-Startup-Scripts similarity index 100% rename from doc/131-Final_System-Bash_Startup_Scripts rename to doc/3-Chroot/094-Bash-Startup-Scripts diff --git a/doc/132-Final_System-Bash_Fstab b/doc/3-Chroot/095-Fstab similarity index 100% rename from doc/132-Final_System-Bash_Fstab rename to doc/3-Chroot/095-Fstab diff --git a/doc/3-Chroot/096-Linux-Kernel b/doc/3-Chroot/096-Linux-Kernel new file mode 100644 index 0000000..31da345 --- /dev/null +++ b/doc/3-Chroot/096-Linux-Kernel @@ -0,0 +1,43 @@ +# Final System: Linux Kernel +# Source: https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.12.10.tar.xz +# This section is done in Chroot environment +# Recomended to use latest kernel version + +# Fix fix header for missing definition of __always_inline in +# 5.12.x kernels for musl systems. +patch -Np1 -i ../patches/kernel/include-uapi-linux-swab-Fix-potentially-missing-__always_inline.patch + +case $(uname -m) in + x86_64*) export ARCH="x86" ;; + i686*) export ARCH="x86" ;; + armv*) export ARCH="arm" ;; + aarch64*) export ARCH="arm64" ;; +esac + +# Prepare for compilation by running the following command: +make mrproper + +# Configure kernel: +make menuconfig + +# Compile the kernel image and modules: +make + +# Install the modules, if the kernel configuration uses them: +make modules_install + +# Install the kernel: +case $ARCH in + x86) cp -iv arch/${ARCH}/boot/bzImage /boot/vmlinuz ;; + arm*) cp -iv arch/${ARCH}/boot/zImage /boot/ + cp -vr arch/${ARCH}/boot/dts/*.dtb /boot/ ;; +esac + +# Install the symbol file for the kernel: +case $ARCH in + x86) cp -iv System.map /boot/System.map +esac + +# Install the kernel configuration file .config produced by the make menuconfig: +cp -iv .config /boot/config + diff --git a/doc/3-Chroot/097-Initramfs b/doc/3-Chroot/097-Initramfs new file mode 100644 index 0000000..ab0fa7c --- /dev/null +++ b/doc/3-Chroot/097-Initramfs @@ -0,0 +1,63 @@ +# Final System: Initramfs Image +# This section is done in Chroot environment + +# Create a directory to hold the contents of +# the initramfs +mkdir -pv /sources/initramfs_build + +cd /sources/initramfs_build +mkdir -pv bin dev etc lib proc run sbin sys usr +mkdir -pv lib/{firmware,modules,udev} +mkdir -pv etc/{modprobe.d,udev} + +# Create symlinks +ln -sv lib lib64 +ln -sv ../bin usr/bin + +# Copy binaries +for b in cat cp dd killall kmod ln ls mkdir \ + mknod mount rm sed sh sleep umount uname +do + cp -va /bin/$b bin/ +done +cp -va /usr/bin/basename bin/ +cp -va /usr/bin/readlink bin/ +ln -sv kmod bin/insmod +ln -sv kmod bin/lsmod + +# Create the nodes for udev to mount on: +mknod -m 600 dev/console c 5 1 +mknod -m 666 dev/null c 1 3 + +# Copy udev configuration +cp -v /etc/udev/udev.conf etc/udev/ +cp -rv /etc/udev/rules.d etc/udev/ +cp -rv /lib/udev/* lib/udev/ + +# Set module load order, if needed +touch etc/modprobe.d/modprobe.conf + +# Copy the init script +cp -v ../files/initramfs-init sbin/init + +# Copy required libraries +for l in libacl.so.1 libattr.so.1 libblkid.so.1 libcap.so.2 \ + libkmod.so.2 liblzma.so.5 libmount.so.1 libncursesw.so.6 \ + libreadline.so.8 libz.so.1 +do + cp -va /lib/$l lib/ +done +cp -v /lib/ld-musl-$(uname -m).so.1 lib/ + +# Copy any firmware required for boot: +cp -rv /lib/firmware/* lib/firmware/ + +# Copy any kernel modules: +cp -rv /lib/modules/* lib/modules/ + +# Now create the initramfs image. Do not change directories +find . | cpio -o -H newc | gzip -9 > /boot/initrd.img + +# Save the initramfs_build directory to update/build more +# Or after booting into new MLFS build, use the mkinitramfs +# script. diff --git a/doc/134-Final_System-Boot_Loader b/doc/3-Chroot/098-Boot-Loader similarity index 100% rename from doc/134-Final_System-Boot_Loader rename to doc/3-Chroot/098-Boot-Loader diff --git a/doc/135-The_End b/doc/3-Chroot/099-The-End similarity index 63% rename from doc/135-The_End rename to doc/3-Chroot/099-The-End index fd5840c..266cc1d 100644 --- a/doc/135-The_End +++ b/doc/3-Chroot/099-The-End @@ -4,17 +4,33 @@ # file, it is very easy for you (and for us if you need to ask for help at # some point) to find out which LFS version is installed on the system. # Create this file by running: -echo 7.0 > /etc/mlfs-release +echo 9.0.0 > /etc/mlfs-release # It is also a good idea to create a file to show the status of your new # system with respect to the Linux Standards Base (LSB). To create this file, run: cat > /etc/lsb-release << "EOF" DISTRIB_ID="Musl Linux From Scratch" -DISTRIB_RELEASE="7.0" +DISTRIB_RELEASE="9.0.0" DISTRIB_CODENAME="" DISTRIB_DESCRIPTION="Musl Linux From Scratch" EOF +# If desired, an os-release file +cat > /usr/lib/os-release << "EOF" +NAME="MLFS" +VERSION="9.0.0" +ID=cmlfs +ID_LIKE="lfs" +PRETTY_NAME="Musl Linux From Scratch 9.0.0" +VERSION_ID="9.0.0" +HOME_URL="https://github.com/dslm4515/Musl-LFS" +SUPPORT_URL="https://github.com/dslm4515/Musl-LFS/issues" +BUG_REPORT_URL="https://github.com/dslm4515/Musl-LFS/issues" +EOF + +# freedesktop.org defines that file can be in /etc or /usr/lib +ln -sv ../usr/lib/os-release /etc/ + ## Rebooting the System # Exit chroot and unmount MLFS diff --git a/download_sources.sh b/download_sources.sh index 75d6b7c..bdb4863 100755 --- a/download_sources.sh +++ b/download_sources.sh @@ -5,7 +5,7 @@ # and GPL3, at your preference. # n() function taken from otto-pkg's posix-alt.shi lib. -# USAGE: ./download_sources.sh sources.list sources.md5sum +# USAGE: ./download_sources.sh sources.list sources.md5 MD5CHECK=${MD5CHECK:-YES}; diff --git a/extra/mlfs-bash_startup_scripts-1.00.tar.xz b/extra/mlfs-bash_startup_scripts-1.00.tar.xz deleted file mode 100644 index f175e70..0000000 Binary files a/extra/mlfs-bash_startup_scripts-1.00.tar.xz and /dev/null differ diff --git a/patches/argp-standalone-adelie/001-throw-in-funcdef.patch b/patches/argp-standalone-adelie/001-throw-in-funcdef.patch new file mode 100755 index 0000000..4a90751 --- /dev/null +++ b/patches/argp-standalone-adelie/001-throw-in-funcdef.patch @@ -0,0 +1,79 @@ +# --- T2-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# T2 SDE: package/.../rng-tools/throw-in-funcdef.patch.argp-standalone +# Copyright (C) 2006 The T2 SDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- T2-COPYRIGHT-NOTE-END --- + + +No __THROW in function implementation. + --jsaw + +--- argp-standalone-1.4-test2/argp.h.orig 2006-01-06 02:29:59.000000000 +0100 ++++ argp-standalone-1.4-test2/argp.h 2006-01-06 02:41:10.000000000 +0100 +@@ -560,17 +560,17 @@ + # endif + + # ifndef ARGP_EI +-# define ARGP_EI extern __inline__ ++# define ARGP_EI extern inline + # endif + + ARGP_EI void +-__argp_usage (__const struct argp_state *__state) __THROW ++__argp_usage (__const struct argp_state *__state) + { + __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); + } + + ARGP_EI int +-__option_is_short (__const struct argp_option *__opt) __THROW ++__option_is_short (__const struct argp_option *__opt) + { + if (__opt->flags & OPTION_DOC) + return 0; +@@ -582,7 +582,7 @@ + } + + ARGP_EI int +-__option_is_end (__const struct argp_option *__opt) __THROW ++__option_is_end (__const struct argp_option *__opt) + { + return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; + } +--- argp-standalone-1.4-test2/argp-parse.c.orig 2006-01-06 02:47:48.000000000 +0100 ++++ argp-standalone-1.4-test2/argp-parse.c 2006-01-06 02:48:16.000000000 +0100 +@@ -1290,13 +1290,13 @@ + /* Defined here, in case a user is not inlining the definitions in + * argp.h */ + void +-__argp_usage (__const struct argp_state *__state) __THROW ++__argp_usage (__const struct argp_state *__state) + { + __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); + } + + int +-__option_is_short (__const struct argp_option *__opt) __THROW ++__option_is_short (__const struct argp_option *__opt) + { + if (__opt->flags & OPTION_DOC) + return 0; +@@ -1310,7 +1310,7 @@ + } + + int +-__option_is_end (__const struct argp_option *__opt) __THROW ++__option_is_end (__const struct argp_option *__opt) + { + return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; + } diff --git a/patches/argp-standalone-adelie/gnu89-inline.patch b/patches/argp-standalone-adelie/gnu89-inline.patch new file mode 100755 index 0000000..71978eb --- /dev/null +++ b/patches/argp-standalone-adelie/gnu89-inline.patch @@ -0,0 +1,22 @@ +diff --git a/configure.ac b/configure.ac +index 4658839..09f0267 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -79,16 +79,10 @@ AC_CHECK_DECLS([program_invocation_name, program_invocation_short_name], + + # Set these flags *last*, or else the test programs won't compile + if test x$GCC = xyes ; then +- # Using -ggdb3 makes (some versions of) Redhat's gcc-2.96 dump core +- if "$CC" --version | grep '^2\.96$' 1>/dev/null 2>&1; then +- true +- else +- CFLAGS="$CFLAGS -ggdb3" +- fi + CFLAGS="$CFLAGS -Wall -W \ + -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes \ + -Waggregate-return \ +- -Wpointer-arith -Wbad-function-cast -Wnested-externs" ++ -Wpointer-arith -Wbad-function-cast -Wnested-externs -fgnu89-inline" + fi + + CPPFLAGS="$CPPFLAGS -I$srcdir" diff --git a/patches/argp-standalone-1.3-void-fix-no_use_inline.patch b/patches/argp-standalone-void/fix-no_use_inline.patch old mode 100644 new mode 100755 similarity index 100% rename from patches/argp-standalone-1.3-void-fix-no_use_inline.patch rename to patches/argp-standalone-void/fix-no_use_inline.patch diff --git a/patches/autoconf-2.69-musl.patch b/patches/autoconf-2.69-musl.patch deleted file mode 100755 index 314bc47..0000000 --- a/patches/autoconf-2.69-musl.patch +++ /dev/null @@ -1,1271 +0,0 @@ -diff -uNr autoconf-2.69.orig/build-aux/config.guess autoconf-2.69/build-aux/config.guess ---- autoconf-2.69.orig/build-aux/config.guess 2012-04-24 21:15:10.000000000 -0500 -+++ autoconf-2.69/build-aux/config.guess 2018-06-23 14:28:27.513863880 -0500 -@@ -1,14 +1,12 @@ - #! /bin/sh - # Attempt to guess a canonical system name. --# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, --# 2011, 2012 Free Software Foundation, Inc. -+# Copyright 1992-2016 Free Software Foundation, Inc. - --timestamp='2012-02-10' -+timestamp='2016-05-15' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or -+# the Free Software Foundation; either version 3 of the License, or - # (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, but -@@ -22,19 +20,17 @@ - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under --# the same distribution terms that you use for the rest of that program. -- -- --# Originally written by Per Bothner. Please send patches (context --# diff format) to and include a ChangeLog --# entry. -+# the same distribution terms that you use for the rest of that -+# program. This Exception is an additional permission under section 7 -+# of the GNU General Public License, version 3 ("GPLv3"). - # --# This script attempts to guess a canonical system name similar to --# config.sub. If it succeeds, it prints the system name on stdout, and --# exits with 0. Otherwise, it exits with 1. -+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. - # - # You can get the latest version of this script from: --# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess -+# -+# Please send patches to . -+ - - me=`echo "$0" | sed -e 's,.*/,,'` - -@@ -54,9 +50,7 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, --2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 --Free Software Foundation, Inc. -+Copyright 1992-2016 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -138,6 +132,27 @@ - UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown - UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -+case "${UNAME_SYSTEM}" in -+Linux|GNU|GNU/*) -+ # If the system lacks a compiler, then just pick glibc. -+ # We could probably try harder. -+ LIBC=gnu -+ -+ eval $set_cc_for_build -+ cat <<-EOF > $dummy.c -+ #include -+ #if defined(__UCLIBC__) -+ LIBC=uclibc -+ #elif defined(__dietlibc__) -+ LIBC=dietlibc -+ #else -+ LIBC=gnu -+ #endif -+ EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` -+ ;; -+esac -+ - # Note: order is significant - the case branches are not exclusive. - - case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in -@@ -153,19 +168,29 @@ - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" -- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ -- /usr/sbin/$sysctl 2>/dev/null || echo unknown)` -+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ -+ /sbin/$sysctl 2>/dev/null || \ -+ /usr/sbin/$sysctl 2>/dev/null || \ -+ echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; -+ earmv*) -+ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` -+ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` -+ machine=${arch}${endian}-unknown -+ ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -- # to ELF recently, or will in the future. -+ # to ELF recently (or will in the future) and ABI. - case "${UNAME_MACHINE_ARCH}" in -+ earm*) -+ os=netbsdelf -+ ;; - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -@@ -182,6 +207,13 @@ - os=netbsd - ;; - esac -+ # Determine ABI tags. -+ case "${UNAME_MACHINE_ARCH}" in -+ earm*) -+ expr='s/^earmv[0-9]/-eabi/;s/eb$//' -+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` -+ ;; -+ esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need -@@ -192,18 +224,26 @@ - release='-gnu' - ;; - *) -- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` -+ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. -- echo "${machine}-${os}${release}" -+ echo "${machine}-${os}${release}${abi}" -+ exit ;; -+ *:Bitrig:*:*) -+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; -+ *:LibertyBSD:*:*) -+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} -+ exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; -@@ -216,6 +256,9 @@ - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; -+ *:Sortix:*:*) -+ echo ${UNAME_MACHINE}-unknown-sortix -+ exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) -@@ -232,42 +275,42 @@ - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") -- UNAME_MACHINE="alpha" ;; -+ UNAME_MACHINE=alpha ;; - "EV4.5 (21064)") -- UNAME_MACHINE="alpha" ;; -+ UNAME_MACHINE=alpha ;; - "LCA4 (21066/21068)") -- UNAME_MACHINE="alpha" ;; -+ UNAME_MACHINE=alpha ;; - "EV5 (21164)") -- UNAME_MACHINE="alphaev5" ;; -+ UNAME_MACHINE=alphaev5 ;; - "EV5.6 (21164A)") -- UNAME_MACHINE="alphaev56" ;; -+ UNAME_MACHINE=alphaev56 ;; - "EV5.6 (21164PC)") -- UNAME_MACHINE="alphapca56" ;; -+ UNAME_MACHINE=alphapca56 ;; - "EV5.7 (21164PC)") -- UNAME_MACHINE="alphapca57" ;; -+ UNAME_MACHINE=alphapca57 ;; - "EV6 (21264)") -- UNAME_MACHINE="alphaev6" ;; -+ UNAME_MACHINE=alphaev6 ;; - "EV6.7 (21264A)") -- UNAME_MACHINE="alphaev67" ;; -+ UNAME_MACHINE=alphaev67 ;; - "EV6.8CB (21264C)") -- UNAME_MACHINE="alphaev68" ;; -+ UNAME_MACHINE=alphaev68 ;; - "EV6.8AL (21264B)") -- UNAME_MACHINE="alphaev68" ;; -+ UNAME_MACHINE=alphaev68 ;; - "EV6.8CX (21264D)") -- UNAME_MACHINE="alphaev68" ;; -+ UNAME_MACHINE=alphaev68 ;; - "EV6.9A (21264/EV69A)") -- UNAME_MACHINE="alphaev69" ;; -+ UNAME_MACHINE=alphaev69 ;; - "EV7 (21364)") -- UNAME_MACHINE="alphaev7" ;; -+ UNAME_MACHINE=alphaev7 ;; - "EV7.9 (21364A)") -- UNAME_MACHINE="alphaev79" ;; -+ UNAME_MACHINE=alphaev79 ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 -@@ -302,7 +345,7 @@ - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; -- arm:riscos:*:*|arm:RISCOS:*:*) -+ arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) -@@ -340,16 +383,16 @@ - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build -- SUN_ARCH="i386" -+ SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. -- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ -- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then -- SUN_ARCH="x86_64" -+ SUN_ARCH=x86_64 - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -@@ -374,7 +417,7 @@ - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` -- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 -+ test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} -@@ -560,8 +603,9 @@ - else - IBM_ARCH=powerpc - fi -- if [ -x /usr/bin/oslevel ] ; then -- IBM_REV=`/usr/bin/oslevel` -+ if [ -x /usr/bin/lslpp ] ; then -+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | -+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi -@@ -598,13 +642,13 @@ - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in -- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 -- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 -+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 -+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in -- 32) HP_ARCH="hppa2.0n" ;; -- 64) HP_ARCH="hppa2.0w" ;; -- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 -+ 32) HP_ARCH=hppa2.0n ;; -+ 64) HP_ARCH=hppa2.0w ;; -+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 - esac ;; - esac - fi -@@ -643,11 +687,11 @@ - exit (0); - } - EOF -- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` -+ (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac -- if [ ${HP_ARCH} = "hppa2.0w" ] -+ if [ ${HP_ARCH} = hppa2.0w ] - then - eval $set_cc_for_build - -@@ -660,12 +704,12 @@ - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then -- HP_ARCH="hppa2.0w" -+ HP_ARCH=hppa2.0w - else -- HP_ARCH="hppa64" -+ HP_ARCH=hppa64 - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -@@ -770,14 +814,14 @@ - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) -- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` -+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) -- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) -@@ -801,10 +845,13 @@ - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; -+ *:MINGW64*:*) -+ echo ${UNAME_MACHINE}-pc-mingw64 -+ exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; -- i*:MSYS*:*) -+ *:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) -@@ -852,21 +899,21 @@ - exit ;; - *:GNU:*:*) - # the GNU system -- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland -- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - aarch64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -@@ -879,59 +926,60 @@ - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ arc:Linux:*:* | arceb:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then -- echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi - else -- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf - fi - fi - exit ;; - avr32*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - cris:Linux:*:*) -- echo ${UNAME_MACHINE}-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - crisv32:Linux:*:*) -- echo ${UNAME_MACHINE}-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-${LIBC} -+ exit ;; -+ e2k:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - frv:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - hexagon:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:Linux:*:*) -- LIBC=gnu -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #ifdef __dietlibc__ -- LIBC=dietlibc -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` -- echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ echo ${UNAME_MACHINE}-pc-linux-${LIBC} - exit ;; - ia64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ k1om:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m32r*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m68*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build -@@ -950,54 +998,63 @@ - #endif - EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` -- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; -- or32:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ openrisc*:Linux:*:*) -+ echo or1k-unknown-linux-${LIBC} -+ exit ;; -+ or32:Linux:*:* | or1k*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - padre:Linux:*:*) -- echo sparc-unknown-linux-gnu -+ echo sparc-unknown-linux-${LIBC} - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) -- echo hppa64-unknown-linux-gnu -+ echo hppa64-unknown-linux-${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -- PA7*) echo hppa1.1-unknown-linux-gnu ;; -- PA8*) echo hppa2.0-unknown-linux-gnu ;; -- *) echo hppa-unknown-linux-gnu ;; -+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; -+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; -+ *) echo hppa-unknown-linux-${LIBC} ;; - esac - exit ;; - ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -+ echo powerpc64-unknown-linux-${LIBC} - exit ;; - ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -+ echo powerpc-unknown-linux-${LIBC} -+ exit ;; -+ ppc64le:Linux:*:*) -+ echo powerpc64le-unknown-linux-${LIBC} -+ exit ;; -+ ppcle:Linux:*:*) -+ echo powerpcle-unknown-linux-${LIBC} - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) -- echo ${UNAME_MACHINE}-ibm-linux -+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC} - exit ;; - sh64*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sh*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - tile*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - vax:Linux:*:*) -- echo ${UNAME_MACHINE}-dec-linux-gnu -+ echo ${UNAME_MACHINE}-dec-linux-${LIBC} - exit ;; - x86_64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-pc-linux-${LIBC} - exit ;; - xtensa*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. -@@ -1073,7 +1130,7 @@ - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub -- # prints for the "djgpp" host, or else GDB configury will decide that -+ # prints for the "djgpp" host, or else GDB configure will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; -@@ -1201,6 +1258,9 @@ - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; -+ x86_64:Haiku:*:*) -+ echo x86_64-unknown-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; -@@ -1219,6 +1279,9 @@ - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; -+ SX-ACE:SUPER-UX:*:*) -+ echo sxace-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; -@@ -1227,24 +1290,36 @@ - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -- case $UNAME_PROCESSOR in -- i386) -- eval $set_cc_for_build -- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ -- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -- grep IS_64BIT_ARCH >/dev/null -- then -- UNAME_PROCESSOR="x86_64" -- fi -- fi ;; -- unknown) UNAME_PROCESSOR=powerpc ;; -- esac -+ eval $set_cc_for_build -+ if test "$UNAME_PROCESSOR" = unknown ; then -+ UNAME_PROCESSOR=powerpc -+ fi -+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then -+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then -+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ case $UNAME_PROCESSOR in -+ i386) UNAME_PROCESSOR=x86_64 ;; -+ powerpc) UNAME_PROCESSOR=powerpc64 ;; -+ esac -+ fi -+ fi -+ elif test "$UNAME_PROCESSOR" = i386 ; then -+ # Avoid executing cc on OS X 10.9, as it ships with a stub -+ # that puts up a graphical alert prompting to install -+ # developer tools. Any system running Mac OS X 10.7 or -+ # later (Darwin 11 and later) is required to have a 64-bit -+ # processor. This is not true of the ARM version of Darwin -+ # that Apple uses in portable devices. -+ UNAME_PROCESSOR=x86_64 -+ fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` -- if test "$UNAME_PROCESSOR" = "x86"; then -+ if test "$UNAME_PROCESSOR" = x86; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi -@@ -1256,7 +1331,7 @@ - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; -- NSE-?:NONSTOP_KERNEL:*:*) -+ NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) -@@ -1275,7 +1350,7 @@ - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. -- if test "$cputype" = "386"; then -+ if test "$cputype" = 386; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" -@@ -1317,7 +1392,7 @@ - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) -- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos -@@ -1328,174 +1403,25 @@ - x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx - exit ;; --esac -- --#echo '(No uname command or uname output not recognized.)' 1>&2 --#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 -- --eval $set_cc_for_build --cat >$dummy.c < --# include --#endif --main () --{ --#if defined (sony) --#if defined (MIPSEB) -- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, -- I don't know.... */ -- printf ("mips-sony-bsd\n"); exit (0); --#else --#include -- printf ("m68k-sony-newsos%s\n", --#ifdef NEWSOS4 -- "4" --#else -- "" --#endif -- ); exit (0); --#endif --#endif -- --#if defined (__arm) && defined (__acorn) && defined (__unix) -- printf ("arm-acorn-riscix\n"); exit (0); --#endif -- --#if defined (hp300) && !defined (hpux) -- printf ("m68k-hp-bsd\n"); exit (0); --#endif -- --#if defined (NeXT) --#if !defined (__ARCHITECTURE__) --#define __ARCHITECTURE__ "m68k" --#endif -- int version; -- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; -- if (version < 4) -- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); -- else -- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); -- exit (0); --#endif -- --#if defined (MULTIMAX) || defined (n16) --#if defined (UMAXV) -- printf ("ns32k-encore-sysv\n"); exit (0); --#else --#if defined (CMU) -- printf ("ns32k-encore-mach\n"); exit (0); --#else -- printf ("ns32k-encore-bsd\n"); exit (0); --#endif --#endif --#endif -- --#if defined (__386BSD__) -- printf ("i386-pc-bsd\n"); exit (0); --#endif -- --#if defined (sequent) --#if defined (i386) -- printf ("i386-sequent-dynix\n"); exit (0); --#endif --#if defined (ns32000) -- printf ("ns32k-sequent-dynix\n"); exit (0); --#endif --#endif -- --#if defined (_SEQUENT_) -- struct utsname un; -- -- uname(&un); -- -- if (strncmp(un.version, "V2", 2) == 0) { -- printf ("i386-sequent-ptx2\n"); exit (0); -- } -- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ -- printf ("i386-sequent-ptx1\n"); exit (0); -- } -- printf ("i386-sequent-ptx\n"); exit (0); -- --#endif -- --#if defined (vax) --# if !defined (ultrix) --# include --# if defined (BSD) --# if BSD == 43 -- printf ("vax-dec-bsd4.3\n"); exit (0); --# else --# if BSD == 199006 -- printf ("vax-dec-bsd4.3reno\n"); exit (0); --# else -- printf ("vax-dec-bsd\n"); exit (0); --# endif --# endif --# else -- printf ("vax-dec-bsd\n"); exit (0); --# endif --# else -- printf ("vax-dec-ultrix\n"); exit (0); --# endif --#endif -- --#if defined (alliant) && defined (i860) -- printf ("i860-alliant-bsd\n"); exit (0); --#endif -- -- exit (1); --} --EOF -- --$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -- { echo "$SYSTEM_NAME"; exit; } -- --# Apollos put the system type in the environment. -- --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } -- --# Convex versions that predate uname can use getsysinfo(1) -- --if [ -x /usr/convex/getsysinfo ] --then -- case `getsysinfo -f cpu_type` in -- c1*) -- echo c1-convex-bsd -- exit ;; -- c2*) -- if getsysinfo -f scalar_acc -- then echo c32-convex-bsd -- else echo c2-convex-bsd -- fi -+ amd64:Isilon\ OneFS:*:*) -+ echo x86_64-unknown-onefs - exit ;; -- c34*) -- echo c34-convex-bsd -- exit ;; -- c38*) -- echo c38-convex-bsd -- exit ;; -- c4*) -- echo c4-convex-bsd -- exit ;; -- esac --fi -+esac - - cat >&2 < in order to provide the needed --information to handle your system. -+If $0 has already been updated, send the following data and any -+information you think might be pertinent to config-patches@gnu.org to -+provide the necessary information to handle your system. - - config.guess timestamp = $timestamp - -@@ -1528,3 +1454,4 @@ - # time-stamp-format: "%:y-%02m-%02d" - # time-stamp-end: "'" - # End: -+ -diff -uNr autoconf-2.69.orig/build-aux/config.sub autoconf-2.69/build-aux/config.sub ---- autoconf-2.69.orig/build-aux/config.sub 2012-04-24 21:37:26.000000000 -0500 -+++ autoconf-2.69/build-aux/config.sub 2018-06-23 14:28:33.480789283 -0500 -@@ -1,24 +1,18 @@ - #! /bin/sh - # Configuration validation subroutine script. --# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, --# 2011, 2012 Free Software Foundation, Inc. -- --timestamp='2012-04-18' -- --# This file is (in principle) common to ALL GNU software. --# The presence of a machine in this file suggests that SOME GNU software --# can handle that machine. It does not imply ALL GNU software can. --# --# This file is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or -+# Copyright 1992-2016 Free Software Foundation, Inc. -+ -+timestamp='2016-05-10' -+ -+# This file is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3 of the License, or - # (at your option) any later version. - # --# This program is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -+# This program is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, see . -@@ -26,11 +20,12 @@ - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under --# the same distribution terms that you use for the rest of that program. -+# the same distribution terms that you use for the rest of that -+# program. This Exception is an additional permission under section 7 -+# of the GNU General Public License, version 3 ("GPLv3"). - - --# Please send patches to . Submit a context --# diff and a properly formatted GNU ChangeLog entry. -+# Please send patches to . - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. -@@ -38,7 +33,7 @@ - # Otherwise, we print the canonical config type on stdout and succeed. - - # You can get the latest version of this script from: --# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub - - # This file is supposed to be the same for all GNU packages - # and recognize all the CPU types, system types and aliases -@@ -58,8 +53,7 @@ - me=`echo "$0" | sed -e 's,.*/,,'` - - usage="\ --Usage: $0 [OPTION] CPU-MFR-OPSYS -- $0 [OPTION] ALIAS -+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS - - Canonicalize a configuration name. - -@@ -73,9 +67,7 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, --2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 --Free Software Foundation, Inc. -+Copyright 1992-2016 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -123,8 +115,8 @@ - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ -- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ -- knetbsd*-gnu* | netbsd*-gnu* | \ -+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ -+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os -@@ -156,7 +148,7 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis | -knuth | -cray | -microblaze) -+ -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; -@@ -259,21 +251,25 @@ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -- | be32 | be64 \ -+ | arc | arceb \ -+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ -+ | avr | avr32 \ -+ | ba \ -+ | be32 | be64 \ - | bfin \ -- | c4x | clipper \ -+ | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | epiphany \ -- | fido | fr30 | frv \ -+ | e2k | epiphany \ -+ | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ -+ | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ -- | maxq | mb | microblaze | mcore | mep | metag \ -+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -@@ -287,26 +283,29 @@ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ -+ | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ -+ | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ -+ | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ -- | nios | nios2 \ -+ | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ -- | open8 \ -- | or32 \ -+ | open8 | or1k | or1knd | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ -+ | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ -- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ -+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -@@ -314,6 +313,7 @@ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ -+ | visium \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) -@@ -328,7 +328,10 @@ - c6x) - basic_machine=tic6x-unknown - ;; -- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) -+ leon|leon[3-9]) -+ basic_machine=sparc-$basic_machine -+ ;; -+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; -@@ -370,26 +373,29 @@ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ -- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ -+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ -+ | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ -- | clipper-* | craynv-* | cydra-* \ -+ | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ -- | elxsi-* \ -+ | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ -+ | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ -+ | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -@@ -403,28 +409,33 @@ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ -+ | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ -+ | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ -+ | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ -- | nios-* | nios2-* \ -+ | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ -+ | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ -+ | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ -- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ -@@ -432,6 +443,7 @@ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ -+ | visium-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ -@@ -508,6 +520,9 @@ - basic_machine=i386-pc - os=-aros - ;; -+ asmjs) -+ basic_machine=asmjs-unknown -+ ;; - aux) - basic_machine=m68k-apple - os=-aux -@@ -769,6 +784,9 @@ - basic_machine=m68k-isi - os=-sysv - ;; -+ leon-*|leon[3-9]-*) -+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` -+ ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux -@@ -788,11 +806,15 @@ - basic_machine=ns32k-utek - os=-sysv - ;; -- microblaze) -+ microblaze*) - basic_machine=microblaze-xilinx - ;; -+ mingw64) -+ basic_machine=x86_64-pc -+ os=-mingw64 -+ ;; - mingw32) -- basic_machine=i386-pc -+ basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) -@@ -820,6 +842,10 @@ - basic_machine=powerpc-unknown - os=-morphos - ;; -+ moxiebox) -+ basic_machine=moxie-unknown -+ os=-moxiebox -+ ;; - msdos) - basic_machine=i386-pc - os=-msdos -@@ -828,7 +854,7 @@ - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - msys) -- basic_machine=i386-pc -+ basic_machine=i686-pc - os=-msys - ;; - mvs) -@@ -1019,7 +1045,11 @@ - basic_machine=i586-unknown - os=-pw32 - ;; -- rdos) -+ rdos | rdos64) -+ basic_machine=x86_64-pc -+ os=-rdos -+ ;; -+ rdos32) - basic_machine=i386-pc - os=-rdos - ;; -@@ -1346,29 +1376,30 @@ - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ -- | -sym* | -kopensolaris* \ -+ | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* | -aros* \ -+ | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -- | -openbsd* | -solidbsd* \ -+ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -linux-android* \ -- | -linux-newlib* | -linux-uclibc* \ -- | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ -+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ -+ | -onefs* | -tirtos* | -phoenix*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1492,9 +1523,6 @@ - -aros*) - os=-aros - ;; -- -kaos*) -- os=-kaos -- ;; - -zvmoe) - os=-zvmoe - ;; -@@ -1503,6 +1531,8 @@ - ;; - -nacl*) - ;; -+ -ios) -+ ;; - -none) - ;; - *) -@@ -1543,6 +1573,12 @@ - c4x-* | tic4x-*) - os=-coff - ;; -+ c8051-*) -+ os=-elf -+ ;; -+ hexagon-*) -+ os=-elf -+ ;; - tic54x-*) - os=-coff - ;; -@@ -1777,3 +1813,4 @@ - # time-stamp-format: "%:y-%02m-%02d" - # time-stamp-end: "'" - # End: -+ diff --git a/patches/bash-5.0-upstream_fixes-1.patch b/patches/bash-5.0-upstream_fixes-1.patch deleted file mode 100644 index caa3fce..0000000 --- a/patches/bash-5.0-upstream_fixes-1.patch +++ /dev/null @@ -1,608 +0,0 @@ -Submitted By: Pierre Labastie -Date: 2019-12-01 -Initial Package Version: 5.0 -Upstream Status: Already in upstream patch repo -Origin: Upstream -Description: This patch contains upstream patch numbers 001 thru 011 - -diff -Naur bash-5.0/bashhist.c bash-5.0.11/bashhist.c ---- bash-5.0/bashhist.c 2018-07-06 04:41:14.000000000 +0200 -+++ bash-5.0.11/bashhist.c 2019-11-28 16:11:49.667000000 +0100 -@@ -560,15 +560,18 @@ - add that line to the history if ADDIT is non-zero. */ - if (!history_expansion_inhibited && history_expansion && history_expansion_p (line)) - { -+ int old_len; -+ - /* If we are expanding the second or later line of a multi-line - command, decrease history_length so references to history expansions - in these lines refer to the previous history entry and not the - current command. */ -+ old_len = history_length; - if (history_length > 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1) - history_length--; - expanded = history_expand (line, &history_value); - if (history_length >= 0 && command_oriented_history && current_command_first_line_saved && current_command_line_count > 1) -- history_length++; -+ history_length = old_len; - - if (expanded) - { -diff -Naur bash-5.0/bashline.c bash-5.0.11/bashline.c ---- bash-5.0/bashline.c 2018-11-27 19:20:16.000000000 +0100 -+++ bash-5.0.11/bashline.c 2019-11-28 16:11:33.994000000 +0100 -@@ -231,6 +231,7 @@ - static int bash_complete_command __P((int, int)); - static int bash_possible_command_completions __P((int, int)); - -+static int completion_glob_pattern __P((char *)); - static char *glob_complete_word __P((const char *, int)); - static int bash_glob_completion_internal __P((int)); - static int bash_glob_complete_word __P((int, int)); -@@ -1741,7 +1742,7 @@ - - /* This could be a globbing pattern, so try to expand it using pathname - expansion. */ -- if (!matches && glob_pattern_p (text)) -+ if (!matches && completion_glob_pattern ((char *)text)) - { - matches = rl_completion_matches (text, glob_complete_word); - /* A glob expression that matches more than one filename is problematic. -@@ -1850,7 +1851,7 @@ - glob_matches = (char **)NULL; - } - -- globpat = glob_pattern_p (hint_text); -+ globpat = completion_glob_pattern ((char *)hint_text); - - /* If this is an absolute program name, do not check it against - aliases, reserved words, functions or builtins. We must check -@@ -3713,6 +3714,61 @@ - return bash_specific_completion (what_to_do, command_word_completion_function); - } - -+static int -+completion_glob_pattern (string) -+ char *string; -+{ -+ register int c; -+ char *send; -+ int open; -+ -+ DECLARE_MBSTATE; -+ -+ open = 0; -+ send = string + strlen (string); -+ -+ while (c = *string++) -+ { -+ switch (c) -+ { -+ case '?': -+ case '*': -+ return (1); -+ -+ case '[': -+ open++; -+ continue; -+ -+ case ']': -+ if (open) -+ return (1); -+ continue; -+ -+ case '+': -+ case '@': -+ case '!': -+ if (*string == '(') /*)*/ -+ return (1); -+ continue; -+ -+ case '\\': -+ if (*string++ == 0) -+ return (0); -+ } -+ -+ /* Advance one fewer byte than an entire multibyte character to -+ account for the auto-increment in the loop above. */ -+#ifdef HANDLE_MULTIBYTE -+ string--; -+ ADVANCE_CHAR_P (string, send - string); -+ string++; -+#else -+ ADVANCE_CHAR_P (string, send - string); -+#endif -+ } -+ return (0); -+} -+ - static char *globtext; - static char *globorig; - -@@ -3877,7 +3933,7 @@ - t = substring (rl_line_buffer, p, rl_point); - } - -- if (t && glob_pattern_p (t) == 0) -+ if (t && completion_glob_pattern (t) == 0) - rl_explicit_arg = 1; /* XXX - force glob_complete_word to append `*' */ - FREE (t); - -diff -Naur bash-5.0/builtins/evalstring.c bash-5.0.11/builtins/evalstring.c ---- bash-5.0/builtins/evalstring.c 2018-12-26 17:19:21.000000000 +0100 -+++ bash-5.0.11/builtins/evalstring.c 2019-11-28 16:11:40.813000000 +0100 -@@ -100,12 +100,22 @@ - ((command->flags & CMD_INVERT_RETURN) == 0)); - } - -+int -+can_optimize_connection (command) -+ COMMAND *command; -+{ -+ return (*bash_input.location.string == '\0' && -+ (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') && -+ command->value.Connection->second->type == cm_simple); -+} -+ - void - optimize_fork (command) - COMMAND *command; - { - if (command->type == cm_connection && -- (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR) && -+ (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') && -+ (command->value.Connection->second->flags & CMD_TRY_OPTIMIZING) && - should_suppress_fork (command->value.Connection->second)) - { - command->value.Connection->second->flags |= CMD_NO_FORK; -@@ -412,8 +422,18 @@ - command->flags |= CMD_NO_FORK; - command->value.Simple->flags |= CMD_NO_FORK; - } -- else if (command->type == cm_connection) -- optimize_fork (command); -+ -+ /* Can't optimize forks out here execept for simple commands. -+ This knows that the parser sets up commands as left-side heavy -+ (&& and || are left-associative) and after the single parse, -+ if we are at the end of the command string, the last in a -+ series of connection commands is -+ command->value.Connection->second. */ -+ else if (command->type == cm_connection && can_optimize_connection (command)) -+ { -+ command->value.Connection->second->flags |= CMD_TRY_OPTIMIZING; -+ command->value.Connection->second->value.Simple->flags |= CMD_TRY_OPTIMIZING; -+ } - #endif /* ONESHOT */ - - /* See if this is a candidate for $( value.Connection->connector == OR_OR) && - (exec_result != EXECUTION_SUCCESS))) - { -+ optimize_fork (command); -+ - second = command->value.Connection->second; - if (ignore_return && second) - second->flags |= CMD_IGNORE_RETURN; -diff -Naur bash-5.0/jobs.c bash-5.0.11/jobs.c ---- bash-5.0/jobs.c 2018-12-06 17:44:34.000000000 +0100 -+++ bash-5.0.11/jobs.c 2019-11-28 16:11:46.415000000 +0100 -@@ -2488,10 +2488,8 @@ - r = wait_for (last_procsub_child->pid); - wait_procsubs (); - reap_procsubs (); --#if 1 -+#if 0 - /* We don't want to wait indefinitely if we have stopped children. */ -- /* XXX - should add a loop that goes through the list of process -- substitutions and waits for each proc in turn before this code. */ - if (any_stopped == 0) - { - /* Check whether or not we have any unreaped children. */ -@@ -4839,15 +4837,13 @@ - end_job_control () - { - if (job_control) -- { -- terminate_stopped_jobs (); -+ terminate_stopped_jobs (); - -- if (original_pgrp >= 0) -- give_terminal_to (original_pgrp, 1); -- } -+ if (original_pgrp >= 0 && terminal_pgrp != original_pgrp) -+ give_terminal_to (original_pgrp, 1); - -- if (original_pgrp >= 0) -- setpgid (0, original_pgrp); -+ if (original_pgrp >= 0 && setpgid (0, original_pgrp) == 0) -+ shell_pgrp = original_pgrp; - } - - /* Restart job control by closing shell tty and reinitializing. This is -diff -Naur bash-5.0/lib/glob/glob.c bash-5.0.11/lib/glob/glob.c ---- bash-5.0/lib/glob/glob.c 2018-09-20 16:53:23.000000000 +0200 -+++ bash-5.0.11/lib/glob/glob.c 2019-11-28 16:11:33.990000000 +0100 -@@ -1061,7 +1061,7 @@ - char *directory_name, *filename, *dname, *fn; - unsigned int directory_len; - int free_dirname; /* flag */ -- int dflags; -+ int dflags, hasglob; - - result = (char **) malloc (sizeof (char *)); - result_size = 1; -@@ -1110,9 +1110,12 @@ - free_dirname = 1; - } - -+ hasglob = 0; - /* If directory_name contains globbing characters, then we -- have to expand the previous levels. Just recurse. */ -- if (directory_len > 0 && glob_pattern_p (directory_name)) -+ have to expand the previous levels. Just recurse. -+ If glob_pattern_p returns != [0,1] we have a pattern that has backslash -+ quotes but no unquoted glob pattern characters. We dequote it below. */ -+ if (directory_len > 0 && (hasglob = glob_pattern_p (directory_name)) == 1) - { - char **directories, *d, *p; - register unsigned int i; -@@ -1175,7 +1178,7 @@ - if (d[directory_len - 1] == '/') - d[directory_len - 1] = '\0'; - -- directories = glob_filename (d, dflags); -+ directories = glob_filename (d, dflags|GX_RECURSE); - - if (free_dirname) - { -@@ -1332,6 +1335,20 @@ - free (directory_name); - return (NULL); - } -+ /* If we have a directory name with quoted characters, and we are -+ being called recursively to glob the directory portion of a pathname, -+ we need to dequote the directory name before returning it so the -+ caller can read the directory */ -+ if (directory_len > 0 && hasglob == 2 && (flags & GX_RECURSE) != 0) -+ { -+ dequote_pathname (directory_name); -+ directory_len = strlen (directory_name); -+ } -+ -+ /* We could check whether or not the dequoted directory_name is a -+ directory and return it here, returning the original directory_name -+ if not, but we don't do that yet. I'm not sure it matters. */ -+ - /* Handle GX_MARKDIRS here. */ - result[0] = (char *) malloc (directory_len + 1); - if (result[0] == NULL) -diff -Naur bash-5.0/lib/glob/glob.h bash-5.0.11/lib/glob/glob.h ---- bash-5.0/lib/glob/glob.h 2013-10-28 19:46:12.000000000 +0100 -+++ bash-5.0.11/lib/glob/glob.h 2019-11-28 16:11:33.989000000 +0100 -@@ -30,6 +30,7 @@ - #define GX_NULLDIR 0x100 /* internal -- no directory preceding pattern */ - #define GX_ADDCURDIR 0x200 /* internal -- add passed directory name */ - #define GX_GLOBSTAR 0x400 /* turn on special handling of ** */ -+#define GX_RECURSE 0x800 /* internal -- glob_filename called recursively */ - - extern int glob_pattern_p __P((const char *)); - extern char **glob_vector __P((char *, char *, int)); -diff -Naur bash-5.0/lib/glob/glob_loop.c bash-5.0.11/lib/glob/glob_loop.c ---- bash-5.0/lib/glob/glob_loop.c 2018-12-31 19:35:15.000000000 +0100 -+++ bash-5.0.11/lib/glob/glob_loop.c 2019-11-28 16:11:33.987000000 +0100 -@@ -26,10 +26,10 @@ - { - register const GCHAR *p; - register GCHAR c; -- int bopen; -+ int bopen, bsquote; - - p = pattern; -- bopen = 0; -+ bopen = bsquote = 0; - - while ((c = *p++) != L('\0')) - switch (c) -@@ -54,20 +54,23 @@ - continue; - - case L('\\'): --#if 0 - /* Don't let the pattern end in a backslash (GMATCH returns no match -- if the pattern ends in a backslash anyway), but otherwise return 1, -- since the matching engine uses backslash as an escape character -- and it can be removed. */ -- return (*p != L('\0')); --#else -- /* The pattern may not end with a backslash. */ -- if (*p++ == L('\0')) -+ if the pattern ends in a backslash anyway), but otherwise note that -+ we have seen this, since the matching engine uses backslash as an -+ escape character and it can be removed. We return 2 later if we -+ have seen only backslash-escaped characters, so interested callers -+ know they can shortcut and just dequote the pathname. */ -+ if (*p != L('\0')) -+ { -+ p++; -+ bsquote = 1; -+ continue; -+ } -+ else /* (*p == L('\0')) */ - return 0; --#endif - } - -- return 0; -+ return bsquote ? 2 : 0; - } - - #undef INTERNAL_GLOB_PATTERN_P -diff -Naur bash-5.0/lib/readline/histfile.c bash-5.0.11/lib/readline/histfile.c ---- bash-5.0/lib/readline/histfile.c 2018-06-11 15:14:52.000000000 +0200 -+++ bash-5.0.11/lib/readline/histfile.c 2019-11-28 16:11:52.648000000 +0100 -@@ -305,6 +305,7 @@ - if (file_size == 0) - { - free (input); -+ close (file); - return 0; /* don't waste time if we don't have to */ - } - -diff -Naur bash-5.0/parser.h bash-5.0.11/parser.h ---- bash-5.0/parser.h 2018-12-29 01:11:18.000000000 +0100 -+++ bash-5.0.11/parser.h 2019-11-28 16:11:29.603000000 +0100 -@@ -47,6 +47,7 @@ - #define PST_REPARSE 0x040000 /* re-parsing in parse_string_to_word_list */ - #define PST_REDIRLIST 0x080000 /* parsing a list of redirections preceding a simple command name */ - #define PST_COMMENT 0x100000 /* parsing a shell comment; used by aliases */ -+#define PST_ENDALIAS 0x200000 /* just finished expanding and consuming an alias */ - - /* Definition of the delimiter stack. Needed by parse.y and bashhist.c. */ - struct dstack { -diff -Naur bash-5.0/parse.y bash-5.0.11/parse.y ---- bash-5.0/parse.y 2019-01-02 19:57:34.000000000 +0100 -+++ bash-5.0.11/parse.y 2019-11-28 16:11:29.607000000 +0100 -@@ -2557,12 +2557,14 @@ - if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE && - pushed_string_list->flags != PSH_DPAREN && - (parser_state & PST_COMMENT) == 0 && -+ (parser_state & PST_ENDALIAS) == 0 && /* only once */ - shell_input_line_index > 0 && -- shell_input_line[shell_input_line_index-1] != ' ' && -+ shellblank (shell_input_line[shell_input_line_index-1]) == 0 && - shell_input_line[shell_input_line_index-1] != '\n' && - shellmeta (shell_input_line[shell_input_line_index-1]) == 0 && - (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"')) - { -+ parser_state |= PST_ENDALIAS; - return ' '; /* END_ALIAS */ - } - #endif -@@ -2571,6 +2573,7 @@ - /* This case works for PSH_DPAREN as well */ - if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE) - { -+ parser_state &= ~PST_ENDALIAS; - pop_string (); - uc = shell_input_line[shell_input_line_index]; - if (uc) -diff -Naur bash-5.0/patchlevel.h bash-5.0.11/patchlevel.h ---- bash-5.0/patchlevel.h 2018-02-21 21:47:15.000000000 +0100 -+++ bash-5.0.11/patchlevel.h 2019-11-28 16:11:58.589000000 +0100 -@@ -25,6 +25,6 @@ - regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh - looks for to find the patch level (for the sccs version string). */ - --#define PATCHLEVEL 0 -+#define PATCHLEVEL 11 - - #endif /* _PATCHLEVEL_H_ */ -diff -Naur bash-5.0/pathexp.c bash-5.0.11/pathexp.c ---- bash-5.0/pathexp.c 2018-04-29 23:44:48.000000000 +0200 -+++ bash-5.0.11/pathexp.c 2019-11-28 16:11:33.991000000 +0100 -@@ -65,11 +65,11 @@ - { - register int c; - char *send; -- int open; -+ int open, bsquote; - - DECLARE_MBSTATE; - -- open = 0; -+ open = bsquote = 0; - send = string + strlen (string); - - while (c = *string++) -@@ -100,7 +100,14 @@ - can be removed by the matching engine, so we have to run it through - globbing. */ - case '\\': -- return (*string != 0); -+ if (*string != '\0' && *string != '/') -+ { -+ bsquote = 1; -+ string++; -+ continue; -+ } -+ else if (*string == 0) -+ return (0); - - case CTLESC: - if (*string++ == '\0') -@@ -117,7 +124,8 @@ - ADVANCE_CHAR_P (string, send - string); - #endif - } -- return (0); -+ -+ return (bsquote ? 2 : 0); - } - - /* Return 1 if C is a character that is `special' in a POSIX ERE and needs to -diff -Naur bash-5.0/subst.c bash-5.0.11/subst.c ---- bash-5.0/subst.c 2018-12-22 23:43:37.000000000 +0100 -+++ bash-5.0.11/subst.c 2019-11-28 16:11:58.588000000 +0100 -@@ -3625,7 +3625,9 @@ - this case, we quote the string specially for the globbing code. If - SPECIAL is 2, this is an rhs argument for the =~ operator, and should - be quoted appropriately for regcomp/regexec. The caller is responsible -- for removing the backslashes if the unquoted word is needed later. */ -+ for removing the backslashes if the unquoted word is needed later. In -+ any case, since we don't perform word splitting, we need to do quoted -+ null character removal. */ - char * - cond_expand_word (w, special) - WORD_DESC *w; -@@ -3646,6 +3648,8 @@ - { - if (special == 0) /* LHS */ - { -+ if (l->word) -+ word_list_remove_quoted_nulls (l); - dequote_list (l); - r = string_list (l); - } -diff -Naur bash-5.0/tests/varenv.right bash-5.0.11/tests/varenv.right ---- bash-5.0/tests/varenv.right 2018-12-17 21:39:48.000000000 +0100 -+++ bash-5.0.11/tests/varenv.right 2019-11-28 16:11:55.854000000 +0100 -@@ -146,9 +146,9 @@ - inside: declare -x var="value" - outside: declare -- var="one" - inside: declare -x var="value" --outside: declare -x var="value" --inside: declare -- var="local" --outside: declare -x var="global" -+outside: declare -- var="outside" -+inside: declare -x var="global" -+outside: declare -- var="outside" - foo= environment foo= - foo=foo environment foo=foo - foo=foo environment foo=foo -diff -Naur bash-5.0/variables.c bash-5.0.11/variables.c ---- bash-5.0/variables.c 2018-12-18 17:07:21.000000000 +0100 -+++ bash-5.0.11/variables.c 2019-11-28 16:11:55.853000000 +0100 -@@ -4460,9 +4460,9 @@ - int tvlist_ind; - - /* Take a variable from an assignment statement preceding a posix special -- builtin (including `return') and create a global variable from it. This -- is called from merge_temporary_env, which is only called when in posix -- mode. */ -+ builtin (including `return') and create a variable from it as if a -+ standalone assignment statement had been performed. This is called from -+ merge_temporary_env, which is only called when in posix mode. */ - static void - push_posix_temp_var (data) - PTR_T data; -@@ -4472,16 +4472,27 @@ - - var = (SHELL_VAR *)data; - -- binding_table = global_variables->table; -- if (binding_table == 0) -- binding_table = global_variables->table = hash_create (VARIABLES_HASH_BUCKETS); -- -- v = bind_variable_internal (var->name, value_cell (var), binding_table, 0, ASS_FORCE|ASS_NOLONGJMP); -+ /* Just like do_assignment_internal(). This makes assignments preceding -+ special builtins act like standalone assignment statements when in -+ posix mode, satisfying the posix requirement that this affect the -+ "current execution environment." */ -+ v = bind_variable (var->name, value_cell (var), ASS_FORCE|ASS_NOLONGJMP); -+ -+ /* If this modifies an existing local variable, v->context will be non-zero. -+ If it comes back with v->context == 0, we bound at the global context. -+ Set binding_table appropriately. It doesn't matter whether it's correct -+ if the variable is local, only that it's not global_variables->table */ -+ binding_table = v->context ? shell_variables->table : global_variables->table; - - /* global variables are no longer temporary and don't need propagating. */ -- var->attributes &= ~(att_tempvar|att_propagate); -+ if (binding_table == global_variables->table) -+ var->attributes &= ~(att_tempvar|att_propagate); -+ - if (v) -- v->attributes |= var->attributes; -+ { -+ v->attributes |= var->attributes; -+ v->attributes &= ~att_tempvar; /* not a temp var now */ -+ } - - if (find_special_var (var->name) >= 0) - tempvar_list[tvlist_ind++] = savestring (var->name); -@@ -4575,14 +4586,17 @@ - sh_free_func_t *pushf; - { - int i; -+ HASH_TABLE *disposer; - - tempvar_list = strvec_create (HASH_ENTRIES (temporary_env) + 1); - tempvar_list[tvlist_ind = 0] = 0; -- -- hash_flush (temporary_env, pushf); -- hash_dispose (temporary_env); -+ -+ disposer = temporary_env; - temporary_env = (HASH_TABLE *)NULL; - -+ hash_flush (disposer, pushf); -+ hash_dispose (disposer); -+ - tempvar_list[tvlist_ind] = 0; - - array_needs_making = 1; -diff -Naur bash-5.0/y.tab.c bash-5.0.11/y.tab.c ---- bash-5.0/y.tab.c 2019-01-02 19:57:43.000000000 +0100 -+++ bash-5.0.11/y.tab.c 2019-11-28 16:11:29.611000000 +0100 -@@ -4873,12 +4873,14 @@ - if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE && - pushed_string_list->flags != PSH_DPAREN && - (parser_state & PST_COMMENT) == 0 && -+ (parser_state & PST_ENDALIAS) == 0 && /* only once */ - shell_input_line_index > 0 && -- shell_input_line[shell_input_line_index-1] != ' ' && -+ shellblank (shell_input_line[shell_input_line_index-1]) == 0 && - shell_input_line[shell_input_line_index-1] != '\n' && - shellmeta (shell_input_line[shell_input_line_index-1]) == 0 && - (current_delimiter (dstack) != '\'' && current_delimiter (dstack) != '"')) - { -+ parser_state |= PST_ENDALIAS; - return ' '; /* END_ALIAS */ - } - #endif -@@ -4887,6 +4889,7 @@ - /* This case works for PSH_DPAREN as well */ - if (uc == 0 && pushed_string_list && pushed_string_list->flags != PSH_SOURCE) - { -+ parser_state &= ~PST_ENDALIAS; - pop_string (); - uc = shell_input_line[shell_input_line_index]; - if (uc) diff --git a/patches/binutils-alpine/binutils-ld-fix-static-linking.patch b/patches/binutils-alpine/binutils-ld-fix-static-linking.patch new file mode 100755 index 0000000..bc5d762 --- /dev/null +++ b/patches/binutils-alpine/binutils-ld-fix-static-linking.patch @@ -0,0 +1,46 @@ +This fixes static linking for our hardened toolchain +diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc +index e8126cb..9532bfb 100644 +--- a/ld/scripttempl/elf.sc ++++ b/ld/scripttempl/elf.sc +@@ -235,8 +235,8 @@ test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS=" + if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then + SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))" + SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))" +- CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors" +- DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors" ++ CTORS_IN_INIT_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .ctors" ++ DTORS_IN_FINI_ARRAY="EXCLUDE_FILE (*crtbegin*.o *crtend*.o $OTHER_EXCLUDE_FILES) .dtors" + else + SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))" + SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))" +@@ -270,15 +270,14 @@ CTOR=".ctors ${CONSTRUCTING-0} : + doesn't matter which directory crtbegin.o + is in. */ + +- KEEP (*crtbegin.o(.ctors)) +- KEEP (*crtbegin?.o(.ctors)) ++ KEEP (*crtbegin*.o(.ctors)) + + /* We don't want to include the .ctor section from + the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last */ + +- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors)) ++ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + ${CONSTRUCTING+${CTOR_END}} +@@ -286,9 +285,8 @@ CTOR=".ctors ${CONSTRUCTING-0} : + DTOR=".dtors ${CONSTRUCTING-0} : + { + ${CONSTRUCTING+${DTOR_START}} +- KEEP (*crtbegin.o(.dtors)) +- KEEP (*crtbegin?.o(.dtors)) +- KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors)) ++ KEEP (*crtbegin*.o(.dtors)) ++ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + ${CONSTRUCTING+${DTOR_END}} diff --git a/patches/binutils-alpine/binutils-mips-disable-assert.patch b/patches/binutils-alpine/binutils-mips-disable-assert.patch new file mode 100755 index 0000000..1a78858 --- /dev/null +++ b/patches/binutils-alpine/binutils-mips-disable-assert.patch @@ -0,0 +1,14 @@ +diff -urN binutils-2.35.2.orig/bfd/elfxx-mips.c binutils-2.35.2/bfd/elfxx-mips.c +--- binutils-2.35.2.orig/bfd/elfxx-mips.c 2021-01-30 01:38:03.000000000 -0700 ++++ binutils-2.35.2/bfd/elfxx-mips.c 2021-05-13 17:35:34.706913601 -0600 +@@ -6744,8 +6744,10 @@ + in the relocation. */ + if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root)) + { ++#if 0 + BFD_ASSERT (htab->root.target_os == is_vxworks + || h->global_got_area != GGA_NONE); ++#endif + indx = h->root.dynindx; + if (SGI_COMPAT (output_bfd)) + defined_p = h->root.def_regular; diff --git a/patches/binutils-alpine/gold-mips.patch b/patches/binutils-alpine/gold-mips.patch new file mode 100755 index 0000000..291a2aa --- /dev/null +++ b/patches/binutils-alpine/gold-mips.patch @@ -0,0 +1,39 @@ +# DP: Fix gold on mips64 targets. + +gold/ + +2016-08-09 Aurelien Jarno + + * configure.tgt: Add mips64el*-*-*|mips64le*-*-* and mips64*-*-*. + + +--- a/gold/configure.tgt ++++ b/gold/configure.tgt +@@ -153,6 +153,13 @@ aarch64*-*) + targ_big_endian=false + targ_extra_big_endian=true + ;; ++mips*64*el*-*-*|mips*64*le*-*-*) ++ targ_obj=mips ++ targ_machine=EM_MIPS_RS3_LE ++ targ_size=64 ++ targ_big_endian=false ++ targ_extra_big_endian=true ++ ;; + mips*el*-*-*|mips*le*-*-*) + targ_obj=mips + targ_machine=EM_MIPS_RS3_LE +@@ -160,6 +167,13 @@ mips*el*-*-*|mips*le*-*-*) + targ_big_endian=false + targ_extra_big_endian=true + ;; ++mips*64*-*-*) ++ targ_obj=mips ++ targ_machine=EM_MIPS ++ targ_size=64 ++ targ_big_endian=true ++ targ_extra_big_endian=false ++ ;; + mips*-*-*) + targ_obj=mips + targ_machine=EM_MIPS diff --git a/patches/binutils-alpine/ld-bfd-mips.patch b/patches/binutils-alpine/ld-bfd-mips.patch new file mode 100755 index 0000000..2991c88 --- /dev/null +++ b/patches/binutils-alpine/ld-bfd-mips.patch @@ -0,0 +1,19 @@ +--- ./ld/configure.tgt.orig ++++ ./ld/configure.tgt +@@ -541,12 +541,12 @@ + ;; + mips*-*-windiss) targ_emul=elf32mipswindiss + ;; +-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 +- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" ++mips64*el-*-linux-*) targ_emul=elf64ltsmip ++ targ_extra_emuls="elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip elf64btsmip" + targ_extra_libpath=$targ_extra_emuls + ;; +-mips64*-*-linux-*) targ_emul=elf32btsmipn32 +- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" ++mips64*-*-linux-*) targ_emul=elf64btsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" + targ_extra_libpath=$targ_extra_emuls + ;; + mips*el-*-linux-*) targ_emul=elf32ltsmip diff --git a/patches/bzip2-void/install_docs-1.patch b/patches/bzip2-void/install_docs-1.patch old mode 100644 new mode 100755 diff --git a/patches/bzip2-void/soname.patch b/patches/bzip2-void/soname.patch old mode 100644 new mode 100755 diff --git a/patches/coreutils-alpine/ls.patch b/patches/coreutils-alpine/ls.patch new file mode 100644 index 0000000..0e2057c --- /dev/null +++ b/patches/coreutils-alpine/ls.patch @@ -0,0 +1,25 @@ +../src/ls.c: In function 'print_dir': + +../src/ls.c:3026:24: error: 'SYS_getdents' undeclared (first use in this function); did you mean 'SYS_getdents64'? + + 3026 | if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1 + + | ^~~~~~~~~~~~ + + | SYS_getdents64 + +../src/ls.c:3026:24: note: each undeclared identifier is reported only once for each function it appears in + +diff --git a/src/ls.c b/src/ls.c +index 24b9832..64ecf40 100644 +--- a/src/ls.c ++++ b/src/ls.c +@@ -3018,7 +3018,7 @@ print_dir (char const *name, char const *realname, bool command_line_arg) + if (errno != EOVERFLOW) + break; + } +-#ifdef __linux__ ++#if defined(__linux__) && defined(__x86_64__) + else if (! found_any_entries) + { + /* If readdir finds no directory entries at all, not even "." or diff --git a/patches/coreutils-mlfs/coreutils-autoconf.patch.xz b/patches/coreutils-mlfs/coreutils-autoconf.patch.xz new file mode 100755 index 0000000..982cf22 Binary files /dev/null and b/patches/coreutils-mlfs/coreutils-autoconf.patch.xz differ diff --git a/patches/coreutils-void/0001-ls-restore-8.31-behavior-on-removed-directories.patch b/patches/coreutils-void/0001-ls-restore-8.31-behavior-on-removed-directories.patch deleted file mode 100644 index 0312eff..0000000 --- a/patches/coreutils-void/0001-ls-restore-8.31-behavior-on-removed-directories.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 10fcb97bd728f09d4a027eddf8ad2900f0819b0a Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Thu, 5 Mar 2020 17:25:29 -0800 -Subject: [PATCH] ls: restore 8.31 behavior on removed directories -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -* NEWS: Mention this. -* src/ls.c: Do not include -(print_dir): Don't worry about whether the directory is removed. -* tests/ls/removed-directory.sh: Adjust to match new (i.e., old) -behavior. ---- - NEWS | 6 ++++++ - src/ls.c | 22 ---------------------- - tests/ls/removed-directory.sh | 10 ++-------- - 3 files changed, 8 insertions(+), 30 deletions(-) - -diff --git NEWS NEWS -index fdc8bf5db..653e7178b 100644 ---- NEWS -+++ NEWS -@@ -2,6 +2,12 @@ GNU coreutils NEWS -*- outline -*- - - * Noteworthy changes in release ?.? (????-??-??) [?] - -+** Changes in behavior -+ -+ On GNU/Linux systems, ls no longer issues an error message on -+ directory merely because it was removed. This reverts a change -+ that was made in release 8.32. -+ - - * Noteworthy changes in release 8.32 (2020-03-05) [stable] - -diff --git src/ls.c src/ls.c -index 24b983287..4acf5f44d 100644 ---- src/ls.c -+++ src/ls.c -@@ -49,10 +49,6 @@ - # include - #endif - --#ifdef __linux__ --# include --#endif -- - #include - #include - #include -@@ -2896,7 +2892,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg) - struct dirent *next; - uintmax_t total_blocks = 0; - static bool first = true; -- bool found_any_entries = false; - - errno = 0; - dirp = opendir (name); -@@ -2972,7 +2967,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg) - next = readdir (dirp); - if (next) - { -- found_any_entries = true; - if (! file_ignored (next->d_name)) - { - enum filetype type = unknown; -@@ -3018,22 +3012,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg) - if (errno != EOVERFLOW) - break; - } --#ifdef __linux__ -- else if (! found_any_entries) -- { -- /* If readdir finds no directory entries at all, not even "." or -- "..", then double check that the directory exists. */ -- if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1 -- && errno != EINVAL) -- { -- /* We exclude EINVAL as that pertains to buffer handling, -- and we've passed NULL as the buffer for simplicity. -- ENOENT is returned if appropriate before buffer handling. */ -- file_failure (command_line_arg, _("reading directory %s"), name); -- } -- break; -- } --#endif - else - break; - -diff --git tests/ls/removed-directory.sh tests/ls/removed-directory.sh -index e8c835dab..fe8f929a1 100755 ---- tests/ls/removed-directory.sh -+++ tests/ls/removed-directory.sh -@@ -26,20 +26,14 @@ case $host_triplet in - *) skip_ 'non linux kernel' ;; - esac - --LS_FAILURE=2 -- --cat <<\EOF >exp-err || framework_failure_ --ls: reading directory '.': No such file or directory --EOF -- - cwd=$(pwd) - mkdir d || framework_failure_ - cd d || framework_failure_ - rmdir ../d || framework_failure_ - --returns_ $LS_FAILURE ls >../out 2>../err || fail=1 -+ls >../out 2>../err || fail=1 - cd "$cwd" || framework_failure_ - compare /dev/null out || fail=1 --compare exp-err err || fail=1 -+compare /dev/null err || fail=1 - - Exit $fail --- -2.24.0.375.geb5ae68d41 - diff --git a/patches/cpio-2.12-void/0001-Fix-out-of-bounds-read.patch b/patches/cpio-2.12-void/0001-Fix-out-of-bounds-read.patch old mode 100644 new mode 100755 diff --git a/patches/cpio-2.12-void/0002-Fix-signed-integer-overflow-big-block-sizes.patch b/patches/cpio-2.12-void/0002-Fix-signed-integer-overflow-big-block-sizes.patch old mode 100644 new mode 100755 diff --git a/patches/cpio-2.12-void/0003-CVE-2016-2037-1-byte-out-of-bounds-write.patch b/patches/cpio-2.12-void/0003-CVE-2016-2037-1-byte-out-of-bounds-write.patch old mode 100644 new mode 100755 diff --git a/patches/cpio-2.12-void/0004-Fix-sigfault-when-appending-to-archive.patch b/patches/cpio-2.12-void/0004-Fix-sigfault-when-appending-to-archive.patch old mode 100644 new mode 100755 diff --git a/patches/e2fsprogs-adelie/header-fix.patch b/patches/e2fsprogs-adelie/header-fix.patch new file mode 100755 index 0000000..a2d0e66 --- /dev/null +++ b/patches/e2fsprogs-adelie/header-fix.patch @@ -0,0 +1,131 @@ +--- e2fsprogs-1.44.4/misc/e2undo.c.old 2018-08-19 02:26:58.000000000 +0000 ++++ e2fsprogs-1.44.4/misc/e2undo.c 2018-10-22 22:25:35.130000000 +0000 +@@ -81,12 +81,12 @@ + __le32 magic; /* KEYBLOCK_MAGIC number */ + __le32 crc; /* block checksum */ + __le64 reserved; /* zero */ +-#if __GNUC_PREREQ (4, 8) ++#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || __GNUC__ > 4) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" + #endif + struct undo_key keys[0]; /* keys, which come immediately after */ +-#if __GNUC_PREREQ (4, 8) ++#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || __GNUC__ > 4) + #pragma GCC diagnostic pop + #endif + }; +--- e2fsprogs-1.44.4/misc/filefrag.c.old 2018-08-19 02:26:58.000000000 +0000 ++++ e2fsprogs-1.44.4/misc/filefrag.c 2018-10-22 22:26:04.730000000 +0000 +@@ -537,7 +537,7 @@ + char *end; + blocksize = strtoul(optarg, &end, 0); + if (end) { +-#if __GNUC_PREREQ (7, 0) ++#if defined(__GNUC__) && (__GNUC__ >= 7) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" + #endif +@@ -557,7 +557,7 @@ + default: + break; + } +-#if __GNUC_PREREQ (7, 0) ++#if defined(__GNUC__) && (__GNUC__ >= 7) + #pragma GCC diagnostic pop + #endif + } +--- e2fsprogs-1.44.4/lib/ext2fs/fiemap.h.old 2018-08-19 02:26:58.000000000 +0000 ++++ e2fsprogs-1.44.4/lib/ext2fs/fiemap.h 2018-10-22 22:21:59.110000000 +0000 +@@ -31,12 +31,12 @@ + __u32 fm_mapped_extents;/* number of extents that were mapped (out) */ + __u32 fm_extent_count; /* size of fm_extents array (in) */ + __u32 fm_reserved; +-#if __GNUC_PREREQ (4, 8) ++#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || __GNUC__ > 4) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" + #endif + struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */ +-#if __GNUC_PREREQ (4, 8) ++#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || __GNUC__ > 4) + #pragma GCC diagnostic pop + #endif + }; +--- e2fsprogs-1.44.4/lib/ext2fs/ext4_acl.h.old 2018-08-19 02:26:58.000000000 +0000 ++++ e2fsprogs-1.44.4/lib/ext2fs/ext4_acl.h 2018-10-22 22:18:32.390000000 +0000 +@@ -50,12 +50,12 @@ + + typedef struct { + __le32 a_version; +-#if __GNUC_PREREQ (4, 8) ++#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || __GNUC__ > 4) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wpedantic" + #endif + posix_acl_xattr_entry a_entries[0]; +-#if __GNUC_PREREQ (4, 8) ++#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || __GNUC__ > 4) + #pragma GCC diagnostic pop + #endif + } posix_acl_xattr_header; +--- e2fsprogs-1.44.4/lib/ext2fs/unix_io.c.old 2018-08-19 02:26:58.000000000 +0000 ++++ e2fsprogs-1.44.4/lib/ext2fs/unix_io.c 2018-10-22 22:20:38.770000000 +0000 +@@ -1152,7 +1152,7 @@ + } + + /* parameters might not be used if OS doesn't support zeroout */ +-#if __GNUC_PREREQ (4, 6) ++#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wunused-parameter" + #endif +@@ -1204,7 +1204,7 @@ + unimplemented: + return EXT2_ET_UNIMPLEMENTED; + } +-#if __GNUC_PREREQ (4, 6) ++#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) + #pragma GCC diagnostic pop + #endif + +--- e2fsprogs-1.44.4/lib/ext2fs/mmp.c.old 2018-08-19 02:26:58.000000000 +0000 ++++ e2fsprogs-1.44.4/lib/ext2fs/mmp.c 2018-10-22 22:21:10.640000000 +0000 +@@ -34,7 +34,7 @@ + #define O_DIRECT 0 + #endif + +-#if __GNUC_PREREQ (4, 6) ++#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) + #pragma GCC diagnostic push + #ifndef CONFIG_MMP + #pragma GCC diagnostic ignored "-Wunused-parameter" +@@ -467,6 +467,6 @@ + return EXT2_ET_OP_NOT_SUPPORTED; + #endif + } +-#if __GNUC_PREREQ (4, 6) ++#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) + #pragma GCC diagnostic pop + #endif +--- e2fsprogs-1.44.4/debugfs/set_fields.c.old 2018-08-19 02:26:58.000000000 +0000 ++++ e2fsprogs-1.44.4/debugfs/set_fields.c 2018-10-22 22:22:34.510000000 +0000 +@@ -79,7 +79,8 @@ + static errcode_t parse_mmp_clear(struct field_set_info *info, char *field, + char *arg); + +-#if __GNUC_PREREQ (4, 6) || defined(__clang__) ++#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) \ ++ || defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #endif +@@ -296,7 +297,7 @@ + { "checksum", &set_mmp.mmp_checksum, NULL, 4, parse_uint }, + { 0, 0, 0, 0 } + }; +-#if __GNUC_PREREQ (4, 6) ++#if defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) + #pragma GCC diagnostic pop + #endif + diff --git a/patches/elfutils-void/fix-aarch64_fregs.patch b/patches/elfutils-void/fix-aarch64_fregs.patch deleted file mode 100644 index e964154..0000000 --- a/patches/elfutils-void/fix-aarch64_fregs.patch +++ /dev/null @@ -1,14 +0,0 @@ -It looks like fregs.vregs[] is an array of double? -Casting to Dwarf_Word instead of & 0xFFFFFFF should do. - ---- backends/aarch64_initreg.c 2015-11-27 14:36:29.000000000 +0100 -+++ backends/aarch64_initreg.c 2016-08-09 03:47:25.428560159 +0200 -@@ -82,7 +83,7 @@ - - Dwarf_Word dwarf_fregs[32]; - for (int r = 0; r < 32; r++) -- dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF; -+ dwarf_fregs[r] = (Dwarf_Word)fregs.vregs[r]; - - if (! setfunc (64, 32, dwarf_fregs, arg)) - return false; diff --git a/patches/elfutils-void/fix-uninitialized.patch b/patches/elfutils-void/fix-uninitialized.patch deleted file mode 100644 index 5c9efbc..0000000 --- a/patches/elfutils-void/fix-uninitialized.patch +++ /dev/null @@ -1,17 +0,0 @@ - ---- libcpu/i386_disasm.c 2015-08-21 14:22:37.000000000 +0200 -+++ libcpu/i386_disasm.c 2015-11-20 06:30:59.250629957 +0100 -@@ -1,4 +1,4 @@ --/* Disassembler for x86. -+/* Disassembler for x86. - Copyright (C) 2007, 2008, 2009, 2011 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper , 2007. -@@ -710,6 +710,7 @@ - - case 'm': - /* Mnemonic. */ -+ str = mnebuf; - - if (unlikely (instrtab[cnt].mnemonic == MNE_INVALID)) - { diff --git a/patches/elfutils-void/musl-asm_ptrace_h.patch b/patches/elfutils-void/musl-asm_ptrace_h.patch deleted file mode 100644 index d4ebf31..0000000 --- a/patches/elfutils-void/musl-asm_ptrace_h.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- backends/ppc_initreg.c 2019-11-26 23:48:42.000000000 +0100 -+++ backends/ppc_initreg.c 2019-12-08 16:57:58.334872602 +0100 -@@ -32,6 +32,7 @@ - - #include - #if defined(__powerpc__) && defined(__linux__) -+# include - # include - # include - #endif diff --git a/patches/elfutils-void/musl-cdefs.patch b/patches/elfutils-void/musl-cdefs.patch deleted file mode 100644 index 439794d..0000000 --- a/patches/elfutils-void/musl-cdefs.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- libelf/elf.h 2015-08-21 14:22:37.000000000 +0200 -+++ libelf/elf.h 2015-11-20 04:54:33.948081321 +0100 -@@ -21,6 +21,17 @@ - - #include - -+#if !defined(__GLIBC__) -+/* C++ needs to know that types and declarations are C, not C++. */ -+#ifdef __cplusplus -+# define __BEGIN_DECLS extern "C" { -+# define __END_DECLS } -+#else -+# define __BEGIN_DECLS -+# define __END_DECLS -+#endif -+#endif -+ - __BEGIN_DECLS - - /* Standard ELF types. */ ---- lib/fixedsizehash.h.orig -+++ lib/fixedsizehash.h -@@ -30,7 +30,6 @@ - #include - #include - #include --#include - - #include - diff --git a/patches/elfutils-void/musl-fts-obstack.patch b/patches/elfutils-void/musl-fts-obstack.patch deleted file mode 100644 index 77e3c4e..0000000 --- a/patches/elfutils-void/musl-fts-obstack.patch +++ /dev/null @@ -1,87 +0,0 @@ ---- configure.ac 2015-10-15 15:16:57.000000000 +0200 -+++ configure.ac 2015-11-20 05:32:57.723901582 +0100 -@@ -305,6 +305,62 @@ - fi - AC_SUBST([argp_LDADD]) - -+dnl Check if we have fts available from our libc -+AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [#if !defined(__x86_64__) -+ #undef _FILE_OFFSET_BITS -+ #define _FILE_OFFSET_BITS 32 -+ #endif -+ #include ], -+ [FTS* fts = 0; return fts_close(fts); return 0;] -+ )], -+ [libc_has_fts="true"], -+ [libc_has_fts="false"] -+) -+ -+dnl If our libc doesn't provide fts, then test for libfts -+if test "$libc_has_fts" = "false" ; then -+ AC_MSG_WARN("libc does not have fts") -+ AC_CHECK_LIB([fts], [fts_close], [have_fts="true"], [have_fts="false"]) -+ -+ if test "$have_fts" = "false"; then -+ AC_MSG_ERROR("no libfts found") -+ else -+ fts_LDADD="-lfts" -+ fi -+else -+ fts_LDADD="" -+fi -+AC_SUBST([fts_LDADD]) -+ -+dnl Check if we have obstack available from our libc -+AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [#include ], -+ [_obstack_begin(0, 0, 0, NULL, NULL); return 0;] -+ )], -+ [libc_has_obstack="true"], -+ [libc_has_obstack="false"] -+) -+ -+dnl If our libc doesn't provide obstack, then test for libobstack -+if test "$libc_has_obstack" = "false" ; then -+ AC_MSG_WARN("libc does not have obstack") -+ AC_CHECK_LIB([obstack], [_obstack_begin], [have_obstack="true"], [have_obstack="false"]) -+ -+ if test "$have_obstack" = "false"; then -+ AC_MSG_ERROR("no libobstack found") -+ else -+ obstack_LDADD="-lobstack" -+ fi -+else -+ obstack_LDADD="" -+fi -+AC_SUBST([obstack_LDADD]) -+ -+dnl The directories with content. -+ - dnl The directories with content. - - dnl Documentation. ---- src/Makefile.am.orig -+++ src/Makefile.am -@@ -46,7 +46,7 @@ - else - libasm = ../libasm/libasm.so - libdw = ../libdw/libdw.so --libelf = ../libelf/libelf.so -+libelf = ../libelf/libelf.so $(fts_LDADD) $(obstack_LDADD) - endif - libebl = ../libebl/libebl.a - libeu = ../lib/libeu.a ---- libdw/Makefile.am.orig -+++ libdw/Makefile.am -@@ -109,7 +109,7 @@ - ../libcpu/libcpu_pic.a libdw_pic.a ../libdwelf/libdwelf_pic.a \ - ../libdwfl/libdwfl_pic.a - libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so --libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) -pthread -+libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) $(zip_LIBS) -pthread - libdw_so_SOURCES = - libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS) - $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \ diff --git a/patches/elfutils-void/musl-macros.patch b/patches/elfutils-void/musl-macros.patch deleted file mode 100644 index b4ae5e3..0000000 --- a/patches/elfutils-void/musl-macros.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- src/arlib.h 2015-08-21 14:22:37.000000000 +0200 -+++ src/arlib.h 2015-11-20 08:02:55.153199611 +0100 -@@ -29,6 +29,16 @@ - #include - #include - -+#if !defined(ACCESSPERMS) -+# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ -+#endif -+#if !defined(ALLPERMS) -+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ -+#endif -+#if !defined(DEFFILEMODE) -+# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/ -+#endif -+ - - /* State of -D/-U flags. */ - extern bool arlib_deterministic_output; ---- src/elfcompress.c.orig 2016-04-02 12:51:26.903848894 +0200 -+++ src/elfcompress.c 2016-04-02 12:55:15.076996338 +0200 -@@ -35,6 +35,14 @@ - #include - #include "system.h" - -+#if !defined(FNM_EXTMATCH) -+# define FNM_EXTMATCH 0 -+#endif -+ -+#if !defined(ALLPERMS) -+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ -+#endif -+ - /* Name and version of program. */ - static void print_version (FILE *stream, struct argp_state *state); - ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; ---- src/strip.c.orig 2017-08-02 12:06:25.000000000 +0000 -+++ src/strip.c 2017-08-05 01:58:01.523493062 +0000 -@@ -47,6 +47,14 @@ - #include - #include - -+#if !defined(FNM_EXTMATCH) -+# define FNM_EXTMATCH 0 -+#endif -+ -+#if !defined(ACCESSPERMS) -+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) -+#endif -+ - typedef uint8_t GElf_Byte; - - /* Name and version of program. */ diff --git a/patches/elfutils-void/musl-qsort_r.patch b/patches/elfutils-void/musl-qsort_r.patch deleted file mode 100644 index 10697d6..0000000 --- a/patches/elfutils-void/musl-qsort_r.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- src/readelf.c -+++ src/readelf.c -@@ -4773,10 +4773,11 @@ listptr_base (struct listptr *p) - return cudie_base (&cu); - } - -+static const char *listptr_name; -+ - static int --compare_listptr (const void *a, const void *b, void *arg) -+compare_listptr (const void *a, const void *b) - { -- const char *name = arg; - struct listptr *p1 = (void *) a; - struct listptr *p2 = (void *) b; - -@@ -4792,21 +4793,21 @@ compare_listptr (const void *a, const void *b, void *arg) - p1->warned = p2->warned = true; - error (0, 0, - gettext ("%s %#" PRIx64 " used with different address sizes"), -- name, (uint64_t) p1->offset); -+ listptr_name, (uint64_t) p1->offset); - } - if (p1->dwarf64 != p2->dwarf64) - { - p1->warned = p2->warned = true; - error (0, 0, - gettext ("%s %#" PRIx64 " used with different offset sizes"), -- name, (uint64_t) p1->offset); -+ listptr_name, (uint64_t) p1->offset); - } - if (listptr_base (p1) != listptr_base (p2)) - { - p1->warned = p2->warned = true; - error (0, 0, - gettext ("%s %#" PRIx64 " used with different base addresses"), -- name, (uint64_t) p1->offset); -+ listptr_name, (uint64_t) p1->offset); - } - if (p1->attr != p2 ->attr) - { -@@ -4814,7 +4815,7 @@ compare_listptr (const void *a, const void *b, void *arg) - error (0, 0, - gettext ("%s %#" PRIx64 - " used with different attribute %s and %s"), -- name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr), -+ listptr_name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr), - dwarf_attr_name (p2->attr)); - } - } -@@ -4885,9 +4886,11 @@ notice_listptr (enum section_e section, struct listptr_table *table, - static void - sort_listptr (struct listptr_table *table, const char *name) - { -- if (table->n > 0) -- qsort_r (table->table, table->n, sizeof table->table[0], -- &compare_listptr, (void *) name); -+ if (table->n > 0) { -+ listptr_name = name; -+ qsort (table->table, table->n, sizeof table->table[0], -+ &compare_listptr); -+ } - } - - static bool diff --git a/patches/elfutils-void/musl-strerror_r.patch b/patches/elfutils-void/musl-strerror_r.patch deleted file mode 100644 index d7797e9..0000000 --- a/patches/elfutils-void/musl-strerror_r.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- libdwfl/dwfl_error.c 2015-09-29 17:18:51.000000000 +0200 -+++ libdwfl/dwfl_error.c 2015-11-20 05:11:29.889002058 +0100 -@@ -154,7 +154,16 @@ - switch (error &~ 0xffff) - { - case OTHER_ERROR (ERRNO): -+#if defined(__GLIBC__) - return strerror_r (error & 0xffff, "bad", 0); -+#else -+ { -+ static __thread char buf[128] = ""; -+ if (0 == strerror_r(error & 0xffff, buf, sizeof(buf))) -+ return buf; -+ } -+ return "strerror_r() failed"; -+#endif - case OTHER_ERROR (LIBELF): - return elf_errmsg (error & 0xffff); - case OTHER_ERROR (LIBDW): diff --git a/patches/elfutils-void/musl-strndupa.patch b/patches/elfutils-void/musl-strndupa.patch deleted file mode 100644 index f365fb0..0000000 --- a/patches/elfutils-void/musl-strndupa.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- src/unstrip.c.orig 2017-04-27 14:26:26.000000000 +0000 -+++ src/unstrip.c 2017-05-05 15:51:33.515154220 +0000 -@@ -56,6 +56,15 @@ - # define _(str) gettext (str) - #endif - -+#ifndef strndupa -+#define strndupa(s, n) \ -+ (__extension__ ({const char *__in = (s); \ -+ size_t __len = strnlen (__in, (n)) + 1; \ -+ char *__out = (char *) alloca (__len); \ -+ __out[__len-1] = '\0'; \ -+ (char *) memcpy (__out, __in, __len-1);})) -+#endif -+ - /* Name and version of program. */ - ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; - diff --git a/patches/findutils-4.6.0-void/gnulib-freadahead.patch b/patches/findutils-4.6.0-void/gnulib-freadahead.patch old mode 100644 new mode 100755 diff --git a/patches/findutils-4.6.0-void/gnulib-fseeko.patch b/patches/findutils-4.6.0-void/gnulib-fseeko.patch old mode 100644 new mode 100755 diff --git a/patches/findutils-4.6.0-void/gnulib-mountlist.patch b/patches/findutils-4.6.0-void/gnulib-mountlist.patch old mode 100644 new mode 100755 diff --git a/patches/findutils-4.6.0-void/gnulib-stdio-impl.patch b/patches/findutils-4.6.0-void/gnulib-stdio-impl.patch old mode 100644 new mode 100755 diff --git a/patches/gcc-10.1.0-Enable-CET-in-cross-compiler-if-possible.patch b/patches/gcc-10.1.0-Enable-CET-in-cross-compiler-if-possible.patch deleted file mode 100644 index 51cf197..0000000 --- a/patches/gcc-10.1.0-Enable-CET-in-cross-compiler-if-possible.patch +++ /dev/null @@ -1,117 +0,0 @@ -diff --git a/config/cet.m4 b/config/cet.m4 -index ea616b728a9..d9608699cd5 100644 ---- a/config/cet.m4 -+++ b/config/cet.m4 -@@ -111,7 +111,8 @@ if test x$may_have_cet = xyes; then - fi - - if test x$may_have_cet = xyes; then -- AC_TRY_RUN([ -+ if test x$cross_compiling = xno; then -+ AC_TRY_RUN([ - static void - foo (void) - { -@@ -137,12 +138,17 @@ main () - bar (); - return 0; - } -- ], -- [have_cet=no], -- [have_cet=yes]) -- if test x$enable_cet = xno -a x$have_cet = xyes; then -- AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host]) -+ ], -+ [have_cet=no], -+ [have_cet=yes]) -+ if test x$enable_cet = xno -a x$have_cet = xyes; then -+ AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host]) -+ fi - fi -+else -+ # Enable CET in cross compiler if possible so that it will run on both -+ # CET and non-CET hosts. -+ have_cet=yes - fi - if test x$enable_cet = xyes; then - $1="-fcf-protection" -diff --git a/libiberty/configure b/libiberty/configure -index bb76cf1b823..3f82c5bb865 100755 ---- a/libiberty/configure -+++ b/libiberty/configure -@@ -5375,7 +5375,8 @@ rm -f core conftest.err conftest.$ac_objext \ - fi - - if test x$may_have_cet = xyes; then -- if test "$cross_compiling" = yes; then : -+ if test x$cross_compiling = xno; then -+ if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - as_fn_error $? "cannot run test program while cross compiling -@@ -5420,9 +5421,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext - fi - -- if test x$enable_cet = xno -a x$have_cet = xyes; then -- as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 -+ if test x$enable_cet = xno -a x$have_cet = xyes; then -+ as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 -+ fi - fi -+else -+ # Enable CET in cross compiler if possible so that it will run on both -+ # CET and non-CET hosts. -+ have_cet=yes - fi - if test x$enable_cet = xyes; then - CET_HOST_FLAGS="-fcf-protection" -diff --git a/lto-plugin/configure b/lto-plugin/configure -index 1baf6cc70b8..36c6ecc5875 100755 ---- a/lto-plugin/configure -+++ b/lto-plugin/configure -@@ -5768,7 +5768,8 @@ rm -f core conftest.err conftest.$ac_objext \ - fi - - if test x$may_have_cet = xyes; then -- if test "$cross_compiling" = yes; then : -+ if test x$cross_compiling = xno; then -+ if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - as_fn_error $? "cannot run test program while cross compiling -@@ -5813,9 +5814,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext - fi - -- if test x$enable_cet = xno -a x$have_cet = xyes; then -- as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 -+ if test x$enable_cet = xno -a x$have_cet = xyes; then -+ as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 -+ fi - fi -+else -+ # Enable CET in cross compiler if possible so that it will run on both -+ # CET and non-CET hosts. -+ have_cet=yes - fi - if test x$enable_cet = xyes; then - CET_HOST_FLAGS="-fcf-protection" -@@ -11941,7 +11947,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11944 "configure" -+#line 11950 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -12047,7 +12053,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 12050 "configure" -+#line 12056 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H diff --git a/patches/gcc-10.2.0-alpine/0020-libstdc-futex-add-time64-compatibility.patch b/patches/gcc-10.2.0-alpine/0020-libstdc-futex-add-time64-compatibility.patch deleted file mode 100644 index 73d7f07..0000000 --- a/patches/gcc-10.2.0-alpine/0020-libstdc-futex-add-time64-compatibility.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 9684a815e1cbe854383c3c511e1d84d43c46ec94 Mon Sep 17 00:00:00 2001 -From: Ariadne Conill -Date: Fri, 21 Aug 2020 07:00:17 +0000 -Subject: [PATCH 20/30] libstdc++: futex: add time64 compatibility - ---- - libstdc++-v3/src/c++11/futex.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/libstdc++-v3/src/c++11/futex.cc b/libstdc++-v3/src/c++11/futex.cc -index c9de11a7ec7..7be702dbeda 100644 ---- a/libstdc++-v3/src/c++11/futex.cc -+++ b/libstdc++-v3/src/c++11/futex.cc -@@ -61,7 +61,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - struct timeval tv; - gettimeofday (&tv, NULL); - // Convert the absolute timeout value to a relative timeout -+#if defined(SYS_futex_time64) -+ struct -+ { -+ long tv_sec; -+ long tv_nsec; -+ } rt; -+#else - struct timespec rt; -+#endif - rt.tv_sec = __s.count() - tv.tv_sec; - rt.tv_nsec = __ns.count() - tv.tv_usec * 1000; - if (rt.tv_nsec < 0) --- -2.27.0 - diff --git a/patches/gcc-10.2.0-alpine/0001-posix_memalign.patch b/patches/gcc-10.3.1_git20210424-alpine/0001-posix_memalign.patch similarity index 92% rename from patches/gcc-10.2.0-alpine/0001-posix_memalign.patch rename to patches/gcc-10.3.1_git20210424-alpine/0001-posix_memalign.patch index afb68c1..34397ae 100644 --- a/patches/gcc-10.2.0-alpine/0001-posix_memalign.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0001-posix_memalign.patch @@ -1,7 +1,7 @@ -From 399f9e74a691ca6272d460d72d1b47afcad84752 Mon Sep 17 00:00:00 2001 +From 00951a574e9698d8549cc5ea1793059849cab47f Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Fri, 26 Jan 2018 20:32:50 +0000 -Subject: [PATCH 01/30] posix_memalign +Subject: [PATCH] posix_memalign --- gcc/config/i386/pmm_malloc.h | 9 +++++---- @@ -38,5 +38,5 @@ index 87344d9383f..ece428df487 100644 else return NULL; -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0002-gcc-poison-system-directories.patch b/patches/gcc-10.3.1_git20210424-alpine/0002-gcc-poison-system-directories.patch similarity index 93% rename from patches/gcc-10.2.0-alpine/0002-gcc-poison-system-directories.patch rename to patches/gcc-10.3.1_git20210424-alpine/0002-gcc-poison-system-directories.patch index e388dd1..329cfda 100644 --- a/patches/gcc-10.2.0-alpine/0002-gcc-poison-system-directories.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0002-gcc-poison-system-directories.patch @@ -1,7 +1,7 @@ -From 0e993b1b9a33910193862d76facf34bdbe58ed01 Mon Sep 17 00:00:00 2001 +From 0cd08ecfaf79062115dd12744068970502b99c01 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 29 Mar 2013 08:59:00 +0400 -Subject: [PATCH 02/30] gcc: poison-system-directories +Subject: [PATCH] gcc: poison-system-directories Add /sw/include and /opt/include based on the original zecke-no-host-includes.patch patch. The original patch checked for @@ -26,7 +26,7 @@ Upstream-Status: Pending 7 files changed, 68 insertions(+) diff --git a/gcc/common.opt b/gcc/common.opt -index 3ec7743eae8..d3c3e51dcb0 100644 +index ec5235c3a41..ca942863064 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -682,6 +682,10 @@ Wreturn-local-addr @@ -58,7 +58,7 @@ index 364eba47737..9551c0dfdf9 100644 optimizer and back end) to be checked for dynamic type safety at runtime. This is quite expensive. */ diff --git a/gcc/configure b/gcc/configure -index eb6061c1631..90e3be864f8 100755 +index 8fe9c91fd7c..17b878e4b4e 100755 --- a/gcc/configure +++ b/gcc/configure @@ -1010,6 +1010,7 @@ with_system_zlib @@ -78,7 +78,7 @@ index eb6061c1631..90e3be864f8 100755 --enable-plugin enable plugin support --enable-host-shared build host code as shared libraries --disable-libquadmath-support -@@ -30266,6 +30269,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : +@@ -30276,6 +30279,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : fi @@ -99,10 +99,10 @@ index eb6061c1631..90e3be864f8 100755 diff --git a/gcc/configure.ac b/gcc/configure.ac -index 715fcba0482..f42006e5476 100644 +index 84dceb8074a..bf64ffbe46f 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac -@@ -6600,6 +6600,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, +@@ -6608,6 +6608,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, [specify that runtime libraries should be installed in a compiler-specific directory])]) @@ -120,7 +120,7 @@ index 715fcba0482..f42006e5476 100644 AC_SUBST(subdirs) AC_SUBST(srcdir) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index a2794a67d1e..dfed8fd25a8 100644 +index eabeec944e7..cd31b522e42 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -348,6 +348,7 @@ Objective-C and Objective-C++ Dialects}. @@ -131,7 +131,7 @@ index a2794a67d1e..dfed8fd25a8 100644 -Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol -Wrestrict -Wno-return-local-addr -Wreturn-type @gol -Wno-scalar-storage-order -Wsequence-point @gol -@@ -6924,6 +6925,14 @@ made up of data only and thus requires no special treatment. But, for +@@ -6926,6 +6927,14 @@ made up of data only and thus requires no special treatment. But, for most targets, it is made up of code and thus requires the stack to be made executable in order for the program to work properly. @@ -199,5 +199,5 @@ index 8a2bda00f80..9098ab044ab 100644 /* Use given -I paths for #include "..." but not #include <...>, and -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0003-Turn-on-Wl-z-relro-z-now-by-default.patch b/patches/gcc-10.3.1_git20210424-alpine/0003-Turn-on-Wl-z-relro-z-now-by-default.patch similarity index 83% rename from patches/gcc-10.2.0-alpine/0003-Turn-on-Wl-z-relro-z-now-by-default.patch rename to patches/gcc-10.3.1_git20210424-alpine/0003-Turn-on-Wl-z-relro-z-now-by-default.patch index 511636e..d5bd8ca 100644 --- a/patches/gcc-10.2.0-alpine/0003-Turn-on-Wl-z-relro-z-now-by-default.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0003-Turn-on-Wl-z-relro-z-now-by-default.patch @@ -1,7 +1,7 @@ -From a35a55940c3402f8ebb510ec7d8bc67e85051277 Mon Sep 17 00:00:00 2001 +From f0338445838d12a82c803c1579653332e2710157 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:45:49 +0000 -Subject: [PATCH 03/30] Turn on -Wl,-z,relro,-z,now by default. +Subject: [PATCH] Turn on -Wl,-z,relro,-z,now by default. --- gcc/doc/invoke.texi | 3 +++ @@ -9,10 +9,10 @@ Subject: [PATCH 03/30] Turn on -Wl,-z,relro,-z,now by default. 2 files changed, 4 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index dfed8fd25a8..ca56d52cb05 100644 +index cd31b522e42..17d371ef432 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi -@@ -14638,6 +14638,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the +@@ -14663,6 +14663,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the linker. When using the GNU linker, you can also get the same effect with @option{-Wl,-Map=output.map}. @@ -35,5 +35,5 @@ index b2200c5185a..625c9ab7902 100644 %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ %{Wno-poison-system-directories:--no-poison-system-directories} \ -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch b/patches/gcc-10.3.1_git20210424-alpine/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch similarity index 83% rename from patches/gcc-10.2.0-alpine/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch rename to patches/gcc-10.3.1_git20210424-alpine/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch index d2b4233..a9fcf03 100644 --- a/patches/gcc-10.2.0-alpine/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch @@ -1,8 +1,8 @@ -From d2865d0a184ef59be8893dd34edf5037c4bf48f7 Mon Sep 17 00:00:00 2001 +From 6aa52d7bf25389177c389ea77eb477e7952d1154 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:46:22 +0000 -Subject: [PATCH 04/30] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, - ObjC, ObjC++, if the optimization level is > 0 +Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, + ObjC++, if the optimization level is > 0 --- gcc/c-family/c-cppbuiltin.c | 4 ++++ @@ -25,10 +25,10 @@ index db91a36794a..ed976c71404 100644 if (flag_gnu89_inline) cpp_define (pfile, "__GNUC_GNU_INLINE__"); diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index ca56d52cb05..f5d5a1d1542 100644 +index 17d371ef432..fe793ac08db 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi -@@ -9228,6 +9228,12 @@ also turns on the following optimization flags: +@@ -9230,6 +9230,12 @@ also turns on the following optimization flags: Please note the warning under @option{-fgcse} about invoking @option{-O2} on programs that use computed gotos. @@ -42,5 +42,5 @@ index ca56d52cb05..f5d5a1d1542 100644 @opindex O3 Optimize yet more. @option{-O3} turns on all optimizations specified -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch b/patches/gcc-10.3.1_git20210424-alpine/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch similarity index 97% rename from patches/gcc-10.2.0-alpine/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch rename to patches/gcc-10.3.1_git20210424-alpine/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch index 41206fa..ac31d32 100644 --- a/patches/gcc-10.2.0-alpine/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch @@ -1,8 +1,8 @@ -From 872e0a15a2b74cd6b6ba58e2e7e1605543ea36bd Mon Sep 17 00:00:00 2001 +From 7b624ee24d9299889c35c84303811012f8b8f1d2 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:46:56 +0000 -Subject: [PATCH 05/30] On linux targets pass --as-needed by default to the - linker, but always link the sanitizer libraries with --no-as-needed. +Subject: [PATCH] On linux targets pass --as-needed by default to the linker, + but always link the sanitizer libraries with --no-as-needed. --- gcc/config/aarch64/aarch64-linux.h | 1 + @@ -192,10 +192,10 @@ index 6919b468f06..56d52d41b31 100644 %{!shared: \ %{static:-static} \ diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h -index 81201e67a2f..6477d7ec52e 100644 +index 63853e60c03..de6d8675456 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h -@@ -87,7 +87,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); +@@ -81,7 +81,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" #undef LINK_SPEC @@ -265,5 +265,5 @@ index 625c9ab7902..7aec9d3a016 100644 #else #define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0006-Enable-Wformat-and-Wformat-security-by-default.patch b/patches/gcc-10.3.1_git20210424-alpine/0006-Enable-Wformat-and-Wformat-security-by-default.patch similarity index 90% rename from patches/gcc-10.2.0-alpine/0006-Enable-Wformat-and-Wformat-security-by-default.patch rename to patches/gcc-10.3.1_git20210424-alpine/0006-Enable-Wformat-and-Wformat-security-by-default.patch index 37ab133..39c1b41 100644 --- a/patches/gcc-10.2.0-alpine/0006-Enable-Wformat-and-Wformat-security-by-default.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0006-Enable-Wformat-and-Wformat-security-by-default.patch @@ -1,7 +1,7 @@ -From 5e20872b8cc916cb457c63c6cd970c4fcba47bbb Mon Sep 17 00:00:00 2001 +From 7eed1ed7399593864a097360f778e2409deb663c Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:47:43 +0000 -Subject: [PATCH 06/30] Enable -Wformat and -Wformat-security by default. +Subject: [PATCH] Enable -Wformat and -Wformat-security by default. --- gcc/c-family/c.opt | 4 ++-- @@ -30,5 +30,5 @@ index c49da99d395..93f25319005 100644 Wformat-overflow= -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0007-Enable-Wtrampolines-by-default.patch b/patches/gcc-10.3.1_git20210424-alpine/0007-Enable-Wtrampolines-by-default.patch similarity index 76% rename from patches/gcc-10.2.0-alpine/0007-Enable-Wtrampolines-by-default.patch rename to patches/gcc-10.3.1_git20210424-alpine/0007-Enable-Wtrampolines-by-default.patch index 31a7faa..9fd6afb 100644 --- a/patches/gcc-10.2.0-alpine/0007-Enable-Wtrampolines-by-default.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0007-Enable-Wtrampolines-by-default.patch @@ -1,14 +1,14 @@ -From 1bcf7e30226852db956becebaffdfe2738923423 Mon Sep 17 00:00:00 2001 +From 63c5bf27194fbc27c6630f325b5d976aad87c5d5 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:48:24 +0000 -Subject: [PATCH 07/30] Enable -Wtrampolines by default. +Subject: [PATCH] Enable -Wtrampolines by default. --- gcc/common.opt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/common.opt b/gcc/common.opt -index d3c3e51dcb0..7b68397c232 100644 +index ca942863064..0a0ab6195ee 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -774,7 +774,7 @@ Common Var(warn_system_headers) Warning @@ -21,5 +21,5 @@ index d3c3e51dcb0..7b68397c232 100644 Wtype-limits -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch b/patches/gcc-10.3.1_git20210424-alpine/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch similarity index 90% rename from patches/gcc-10.2.0-alpine/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch rename to patches/gcc-10.3.1_git20210424-alpine/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch index 0b3ce1a..68395ff 100644 --- a/patches/gcc-10.2.0-alpine/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch @@ -1,8 +1,8 @@ -From 23fd86ff34670873dd294bd87b93f45c3624903a Mon Sep 17 00:00:00 2001 +From c28375576bd7ab89389c9208447a490596aa759f Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:49:40 +0000 -Subject: [PATCH 08/30] Disable ssp on -nostdlib, -nodefaultlibs and - -ffreestanding Change the buffer size. +Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding + Change the buffer size. --- gcc/gcc.c | 8 +++++++- @@ -49,5 +49,5 @@ index 4aec480798b..eaecfab37ad 100644 -param=stack-clash-protection-guard-size= -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch b/patches/gcc-10.3.1_git20210424-alpine/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch similarity index 90% rename from patches/gcc-10.2.0-alpine/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch rename to patches/gcc-10.3.1_git20210424-alpine/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch index 0e05926..40ab0bf 100644 --- a/patches/gcc-10.2.0-alpine/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch @@ -1,8 +1,8 @@ -From d27d7936ecd9f357a3c6ee05e6548f8a68fdd4b7 Mon Sep 17 00:00:00 2001 +From 85baea39858509dacfc235396f6fbd79ac23d50d Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:50:33 +0000 -Subject: [PATCH 09/30] Ensure that msgfmt doesn't encounter problems during - gcc bootstrapping. +Subject: [PATCH] Ensure that msgfmt doesn't encounter problems during gcc + bootstrapping. Solves error messages like the following: @@ -50,5 +50,5 @@ index a0f84b0cfa0..ab24a47a2fd 100644 all-local: all-local-$(USE_NLS) -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch b/patches/gcc-10.3.1_git20210424-alpine/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch similarity index 84% rename from patches/gcc-10.2.0-alpine/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch rename to patches/gcc-10.3.1_git20210424-alpine/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch index d85b7c5..30e1872 100644 --- a/patches/gcc-10.2.0-alpine/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch @@ -1,7 +1,7 @@ -From 2ec258d6d31e2c0c614c5086acee84a87768a67c Mon Sep 17 00:00:00 2001 +From fb7d03c7ea97fc785327fd00b302c7ac17779837 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:52:07 +0000 -Subject: [PATCH 10/30] Don't declare asprintf if defined as a macro. +Subject: [PATCH] Don't declare asprintf if defined as a macro. --- include/libiberty.h | 3 +++ @@ -24,5 +24,5 @@ index 141cb886a85..fa0e78eb62f 100644 /* Like asprintf but allocates memory without fail. This works like xmalloc. */ -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0011-libiberty-copy-PIC-objects-during-build-process.patch b/patches/gcc-10.3.1_git20210424-alpine/0011-libiberty-copy-PIC-objects-during-build-process.patch similarity index 80% rename from patches/gcc-10.2.0-alpine/0011-libiberty-copy-PIC-objects-during-build-process.patch rename to patches/gcc-10.3.1_git20210424-alpine/0011-libiberty-copy-PIC-objects-during-build-process.patch index 770cad5..3d2c5d1 100644 --- a/patches/gcc-10.2.0-alpine/0011-libiberty-copy-PIC-objects-during-build-process.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0011-libiberty-copy-PIC-objects-during-build-process.patch @@ -1,7 +1,7 @@ -From 4f6fd2272f57620da399d0f841fce12b9db3b2d1 Mon Sep 17 00:00:00 2001 +From 07467a2a24bd15a6a28154a33441adc1291789d6 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:53:00 +0000 -Subject: [PATCH 11/30] libiberty: copy PIC objects during build process +Subject: [PATCH] libiberty: copy PIC objects during build process --- libiberty/Makefile.in | 1 + @@ -20,5 +20,5 @@ index d6b302e02fd..fd39928546f 100644 else true; fi -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0012-libitm-disable-FORTIFY.patch b/patches/gcc-10.3.1_git20210424-alpine/0012-libitm-disable-FORTIFY.patch similarity index 77% rename from patches/gcc-10.2.0-alpine/0012-libitm-disable-FORTIFY.patch rename to patches/gcc-10.3.1_git20210424-alpine/0012-libitm-disable-FORTIFY.patch index 1693613..b5669fb 100644 --- a/patches/gcc-10.2.0-alpine/0012-libitm-disable-FORTIFY.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0012-libitm-disable-FORTIFY.patch @@ -1,17 +1,17 @@ -From cef5e0336cfdf4afd0e01fa9e562f686b234697a Mon Sep 17 00:00:00 2001 +From 07517ed455bf3f03b1be7a5c72d3705b22780a15 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:53:36 +0000 -Subject: [PATCH 12/30] libitm: disable FORTIFY +Subject: [PATCH] libitm: disable FORTIFY --- libitm/configure.tgt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libitm/configure.tgt b/libitm/configure.tgt -index 04109160e91..107b957ece3 100644 +index d1beb5c9ec8..c2b50b95c01 100644 --- a/libitm/configure.tgt +++ b/libitm/configure.tgt -@@ -46,6 +46,16 @@ if test "$gcc_cv_have_tls" = yes ; then +@@ -47,6 +47,16 @@ if test "$gcc_cv_have_tls" = yes ; then esac fi @@ -29,5 +29,5 @@ index 04109160e91..107b957ece3 100644 # work out any special compilation flags as necessary. case "${target_cpu}" in -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0013-libgcc_s.patch b/patches/gcc-10.3.1_git20210424-alpine/0013-libgcc_s.patch similarity index 86% rename from patches/gcc-10.2.0-alpine/0013-libgcc_s.patch rename to patches/gcc-10.3.1_git20210424-alpine/0013-libgcc_s.patch index f04d7f7..70cbbab 100644 --- a/patches/gcc-10.2.0-alpine/0013-libgcc_s.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0013-libgcc_s.patch @@ -1,7 +1,7 @@ -From d31721459e363e49dfe0a7797300864d9cef92f0 Mon Sep 17 00:00:00 2001 +From b74afde10094923279a408ff56ea99cff6c259ae Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sat, 24 Oct 2015 20:09:53 +0000 -Subject: [PATCH 13/30] libgcc_s +Subject: [PATCH] libgcc_s --- gcc/config/i386/i386-expand.c | 4 ++-- @@ -10,10 +10,10 @@ Subject: [PATCH 13/30] libgcc_s 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c -index 6c759b01edf..8cf0e069e1c 100644 +index 47d52550e5e..9cb8cc7950e 100644 --- a/gcc/config/i386/i386-expand.c +++ b/gcc/config/i386/i386-expand.c -@@ -10948,10 +10948,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, +@@ -10976,10 +10976,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, { case IX86_BUILTIN_CPU_INIT: { @@ -27,10 +27,10 @@ index 6c759b01edf..8cf0e069e1c 100644 return expand_expr (call_expr, target, mode, EXPAND_NORMAL); } diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c -index cf5f0884bb4..ed0381e7744 100644 +index 83301a1445f..89fdc7eb587 100644 --- a/libgcc/config/i386/cpuinfo.c +++ b/libgcc/config/i386/cpuinfo.c -@@ -510,7 +510,7 @@ __cpu_indicator_init (void) +@@ -516,7 +516,7 @@ __cpu_indicator_init (void) return 0; } @@ -53,5 +53,5 @@ index 8506a635790..564296f788e 100644 +HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS) CRTSTUFF_T_CFLAGS += $(CET_FLAGS) -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0014-nopie.patch b/patches/gcc-10.3.1_git20210424-alpine/0014-nopie.patch similarity index 87% rename from patches/gcc-10.2.0-alpine/0014-nopie.patch rename to patches/gcc-10.3.1_git20210424-alpine/0014-nopie.patch index 0860319..f4b0b4e 100644 --- a/patches/gcc-10.2.0-alpine/0014-nopie.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0014-nopie.patch @@ -1,7 +1,7 @@ -From f64f853eae3b390adbbc9b74a336d93918e6dca4 Mon Sep 17 00:00:00 2001 +From e73096ae33c1ebf2833deab647ca825229c533f1 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sat, 7 Nov 2015 02:08:05 +0000 -Subject: [PATCH 14/30] nopie +Subject: [PATCH] nopie --- gcc/configure | 27 +++++++++++++++++++++++++++ @@ -9,10 +9,10 @@ Subject: [PATCH 14/30] nopie 2 files changed, 40 insertions(+) diff --git a/gcc/configure b/gcc/configure -index 90e3be864f8..951a093b459 100755 +index 17b878e4b4e..808570b6c99 100755 --- a/gcc/configure +++ b/gcc/configure -@@ -30774,6 +30774,33 @@ fi +@@ -30784,6 +30784,33 @@ fi $as_echo "$gcc_cv_no_pie" >&6; } if test "$gcc_cv_no_pie" = "yes"; then NO_PIE_FLAG="-no-pie" @@ -47,10 +47,10 @@ index 90e3be864f8..951a093b459 100755 diff --git a/gcc/configure.ac b/gcc/configure.ac -index f42006e5476..fe392298016 100644 +index bf64ffbe46f..9c2571de709 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac -@@ -6858,6 +6858,19 @@ AC_CACHE_CHECK([for -no-pie option], +@@ -6866,6 +6866,19 @@ AC_CACHE_CHECK([for -no-pie option], LDFLAGS="$saved_LDFLAGS"]) if test "$gcc_cv_no_pie" = "yes"; then NO_PIE_FLAG="-no-pie" @@ -71,5 +71,5 @@ index f42006e5476..fe392298016 100644 AC_SUBST([NO_PIE_FLAG]) -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch b/patches/gcc-10.3.1_git20210424-alpine/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch similarity index 82% rename from patches/gcc-10.2.0-alpine/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch rename to patches/gcc-10.3.1_git20210424-alpine/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch index 8f00766..064cb18 100644 --- a/patches/gcc-10.2.0-alpine/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch @@ -1,7 +1,7 @@ -From 37dace030c1402a8e6734a0fc59e18717ce1a2ef Mon Sep 17 00:00:00 2001 +From d56bf713ed0d248fccb445ac475ad69d9430bb96 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:57:09 +0000 -Subject: [PATCH 15/30] libffi: use __linux__ instead of __gnu_linux__ for musl +Subject: [PATCH] libffi: use __linux__ instead of __gnu_linux__ for musl --- libffi/src/closures.c | 2 +- @@ -21,5 +21,5 @@ index 721ff00ea43..22a699c6340 100644 with both write and execute permission. Code compiled when this option is defined will attempt to map such pages once, but if it -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0016-dlang-update-zlib-binding.patch b/patches/gcc-10.3.1_git20210424-alpine/0016-dlang-update-zlib-binding.patch similarity index 99% rename from patches/gcc-10.2.0-alpine/0016-dlang-update-zlib-binding.patch rename to patches/gcc-10.3.1_git20210424-alpine/0016-dlang-update-zlib-binding.patch index 9204db8..4260fce 100644 --- a/patches/gcc-10.2.0-alpine/0016-dlang-update-zlib-binding.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0016-dlang-update-zlib-binding.patch @@ -1,7 +1,7 @@ -From 7fc386a2e629e859968da4eb4d0ff4983cb3b76f Mon Sep 17 00:00:00 2001 +From 6175b540b25a9d899772a7354a6ac2ae77c311ae Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:57:51 +0000 -Subject: [PATCH 16/30] dlang: update zlib binding +Subject: [PATCH] dlang: update zlib binding --- libphobos/src/std/zlib.d | 266 ++++++++++++++++++++++++++++----------- @@ -421,5 +421,5 @@ index e6cce240fd5..bd2fe37ebec 100644 } -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch b/patches/gcc-10.3.1_git20210424-alpine/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch similarity index 91% rename from patches/gcc-10.2.0-alpine/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch rename to patches/gcc-10.3.1_git20210424-alpine/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch index 7b11d6b..4621799 100644 --- a/patches/gcc-10.2.0-alpine/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch @@ -1,7 +1,7 @@ -From ef5f7880cff27a2b92952ce53a207d5dd896923b Mon Sep 17 00:00:00 2001 +From 578f3d719c1154a38a5cf84217e3cb124da45ad8 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:58:22 +0000 -Subject: [PATCH 17/30] dlang: fix fcntl on mips, add libucontext dep +Subject: [PATCH] dlang: fix fcntl on mips, add libucontext dep --- libphobos/configure.tgt | 1 + @@ -47,5 +47,5 @@ index 9febcff849b..cb34e2108bd 100644 static assert(0, "Platform not supported"); -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0018-ada-fix-shared-linking.patch b/patches/gcc-10.3.1_git20210424-alpine/0018-ada-fix-shared-linking.patch similarity index 92% rename from patches/gcc-10.2.0-alpine/0018-ada-fix-shared-linking.patch rename to patches/gcc-10.3.1_git20210424-alpine/0018-ada-fix-shared-linking.patch index 1fc9b37..cac5918 100644 --- a/patches/gcc-10.2.0-alpine/0018-ada-fix-shared-linking.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0018-ada-fix-shared-linking.patch @@ -1,7 +1,7 @@ -From b675e0383262d6d702f5b732e4459d3e2c2a4891 Mon Sep 17 00:00:00 2001 +From b3bcc4fc43170f9914772c543778560c5e473fae Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:59:16 +0000 -Subject: [PATCH 18/30] ada: fix shared linking +Subject: [PATCH] ada: fix shared linking --- gcc/ada/link.c | 12 ++++++------ @@ -38,5 +38,5 @@ index 02c413a412f..f0e52a87d6e 100644 unsigned char __gnat_objlist_file_supported = 1; const char *__gnat_object_library_extension = ".a"; -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch b/patches/gcc-10.3.1_git20210424-alpine/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch similarity index 81% rename from patches/gcc-10.2.0-alpine/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch rename to patches/gcc-10.3.1_git20210424-alpine/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch index 591f9ff..11aec7c 100644 --- a/patches/gcc-10.2.0-alpine/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch @@ -1,7 +1,7 @@ -From 0ea91dd6f8d856d5b589c2a3e95469fea06e7094 Mon Sep 17 00:00:00 2001 +From e85513f5bb1884b60d0e261e23366c3291b50d67 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 06:59:43 +0000 -Subject: [PATCH 19/30] build: fix CXXFLAGS_FOR_BUILD passing +Subject: [PATCH] build: fix CXXFLAGS_FOR_BUILD passing --- Makefile.in | 1 + @@ -20,5 +20,5 @@ index 36e369df6e7..63627db68cf 100644 # This is the list of directories to built for the host system. -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0021-add-fortify-headers-paths.patch b/patches/gcc-10.3.1_git20210424-alpine/0020-add-fortify-headers-paths.patch similarity index 85% rename from patches/gcc-10.2.0-alpine/0021-add-fortify-headers-paths.patch rename to patches/gcc-10.3.1_git20210424-alpine/0020-add-fortify-headers-paths.patch index 81e26a4..1954992 100644 --- a/patches/gcc-10.2.0-alpine/0021-add-fortify-headers-paths.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0020-add-fortify-headers-paths.patch @@ -1,7 +1,7 @@ -From a0708ec975c01b049d254dc51179898966bf8a52 Mon Sep 17 00:00:00 2001 +From ba67e2205fb47afeb91c7c2ee575e426c0629845 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 07:01:06 +0000 -Subject: [PATCH 21/30] add fortify-headers paths +Subject: [PATCH] add fortify-headers paths --- gcc/config/linux.h | 2 ++ @@ -21,5 +21,5 @@ index 95654bcdb5a..d88df8f154a 100644 { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, #else -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0022-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch b/patches/gcc-10.3.1_git20210424-alpine/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch similarity index 74% rename from patches/gcc-10.2.0-alpine/0022-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch rename to patches/gcc-10.3.1_git20210424-alpine/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch index a93b372..c276394 100644 --- a/patches/gcc-10.2.0-alpine/0022-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch @@ -1,9 +1,9 @@ -From 740342a0e4b0b3af498964440918abba1a27ba33 Mon Sep 17 00:00:00 2001 +From 76a7d4998303fe4229c814ea87621af94cb26f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 21 Aug 2020 07:03:00 +0000 -Subject: [PATCH 22/30] Alpine musl package provides libssp_nonshared.a. We - link to it unconditionally, as otherwise we get link failures if some objects - are -fstack-protector built and final link happens with -fno-stack-protector. +Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to + it unconditionally, as otherwise we get link failures if some objects are + -fstack-protector built and final link happens with -fno-stack-protector. This seems to be the common case when bootstrapping gcc, the piepatches do not seem to fully fix the crosstoolchain and bootstrap sequence wrt. stack-protector flag usage. @@ -27,5 +27,5 @@ index daeb4d0c8ea..6920bec0fa0 100644 #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ "|fstack-protector-strong|fstack-protector-explicit" \ -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0023-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch b/patches/gcc-10.3.1_git20210424-alpine/0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch similarity index 95% rename from patches/gcc-10.2.0-alpine/0023-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch rename to patches/gcc-10.3.1_git20210424-alpine/0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch index 4717d74..a94f460 100644 --- a/patches/gcc-10.2.0-alpine/0023-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch @@ -1,7 +1,7 @@ -From 775adf35d6f34f61947fc28a2bdbfa7e881c40d5 Mon Sep 17 00:00:00 2001 +From 81735c7800b3369361c40103d6d479239fa779d7 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 07:03:42 +0000 -Subject: [PATCH 23/30] DP: Use --push-state/--pop-state for gold as well when +Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when linking libtsan. --- @@ -65,5 +65,5 @@ index 6920bec0fa0..40e07354b3d 100644 #else #define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0024-Pure-64-bit-MIPS.patch b/patches/gcc-10.3.1_git20210424-alpine/0023-Pure-64-bit-MIPS.patch similarity index 94% rename from patches/gcc-10.2.0-alpine/0024-Pure-64-bit-MIPS.patch rename to patches/gcc-10.3.1_git20210424-alpine/0023-Pure-64-bit-MIPS.patch index 95cefb3..0b52517 100644 --- a/patches/gcc-10.2.0-alpine/0024-Pure-64-bit-MIPS.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0023-Pure-64-bit-MIPS.patch @@ -1,7 +1,7 @@ -From 717090cf538f765db1730956c512a43f2d52a802 Mon Sep 17 00:00:00 2001 +From bd3e178619a7d45b2b22141a2b83f67bc27b229a Mon Sep 17 00:00:00 2001 From: Nils Andreas Svee Date: Thu, 21 Dec 2017 03:14:33 +0100 -Subject: [PATCH 24/30] Pure 64-bit MIPS +Subject: [PATCH] Pure 64-bit MIPS --- gcc/config/mips/mips.h | 8 ++++---- @@ -43,5 +43,5 @@ index ceb58d3b5f3..8116e23ebba 100644 + ../lib32 \ + ../lib -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0025-use-pure-64-bit-configuration-where-appropriate.patch b/patches/gcc-10.3.1_git20210424-alpine/0024-use-pure-64-bit-configuration-where-appropriate.patch similarity index 97% rename from patches/gcc-10.2.0-alpine/0025-use-pure-64-bit-configuration-where-appropriate.patch rename to patches/gcc-10.3.1_git20210424-alpine/0024-use-pure-64-bit-configuration-where-appropriate.patch index 8e2db48..fa29a93 100644 --- a/patches/gcc-10.2.0-alpine/0025-use-pure-64-bit-configuration-where-appropriate.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0024-use-pure-64-bit-configuration-where-appropriate.patch @@ -1,7 +1,7 @@ -From f73cf8d2f8f4eee71fc2ba850672e69f509a4486 Mon Sep 17 00:00:00 2001 +From d5e2025be98fd345549d41067eac3fd3fe201a4e Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 07:04:40 +0000 -Subject: [PATCH 25/30] use pure 64-bit configuration where appropriate +Subject: [PATCH] use pure 64-bit configuration where appropriate --- gcc/config/aarch64/t-aarch64-linux | 2 +- @@ -117,5 +117,5 @@ index cc6ab367072..7f498ee1cdc 100644 +MULTILIB_OSDIRNAMES = m64=../lib +MULTILIB_OSDIRNAMES+= m32=../lib32 -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0026-always-build-libgcc_eh.a.patch b/patches/gcc-10.3.1_git20210424-alpine/0025-always-build-libgcc_eh.a.patch similarity index 92% rename from patches/gcc-10.2.0-alpine/0026-always-build-libgcc_eh.a.patch rename to patches/gcc-10.3.1_git20210424-alpine/0025-always-build-libgcc_eh.a.patch index b41f8e9..125deef 100644 --- a/patches/gcc-10.2.0-alpine/0026-always-build-libgcc_eh.a.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0025-always-build-libgcc_eh.a.patch @@ -1,7 +1,7 @@ -From 8472f6d0037dcd19c44b1e95d95fbf937b3823e6 Mon Sep 17 00:00:00 2001 +From 6a51ad76380daed31a4eadcee844647452ce6dfd Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 07:05:41 +0000 -Subject: [PATCH 26/30] always build libgcc_eh.a +Subject: [PATCH] always build libgcc_eh.a highly inspired by: http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch @@ -47,5 +47,5 @@ index 851e7657d07..99ec513a1a6 100644 for file in $$parts; do \ rm -f $(DESTDIR)$(inst_libdir)/$$file; \ -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0027-ada-libgnarl-compatibility-for-musl.patch b/patches/gcc-10.3.1_git20210424-alpine/0026-ada-libgnarl-compatibility-for-musl.patch similarity index 96% rename from patches/gcc-10.2.0-alpine/0027-ada-libgnarl-compatibility-for-musl.patch rename to patches/gcc-10.3.1_git20210424-alpine/0026-ada-libgnarl-compatibility-for-musl.patch index f44caa2..2150473 100644 --- a/patches/gcc-10.2.0-alpine/0027-ada-libgnarl-compatibility-for-musl.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0026-ada-libgnarl-compatibility-for-musl.patch @@ -1,7 +1,7 @@ -From 4e1b3a26f558e7693853d3600ee677705e67406c Mon Sep 17 00:00:00 2001 +From 4ce9b92262575e2484836fb9bffca08be99b9a4b Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 07:06:30 +0000 -Subject: [PATCH 27/30] ada: libgnarl compatibility for musl +Subject: [PATCH] ada: libgnarl compatibility for musl --- gcc/ada/libgnarl/s-osinte__linux.ads | 11 ------ @@ -9,7 +9,7 @@ Subject: [PATCH 27/30] ada: libgnarl compatibility for musl 2 files changed, 3 insertions(+), 61 deletions(-) diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads -index 80cb2b2a793..701b7a3aeab 100644 +index ef449af33d1..bd7312e6686 100644 --- a/gcc/ada/libgnarl/s-osinte__linux.ads +++ b/gcc/ada/libgnarl/s-osinte__linux.ads @@ -399,12 +399,6 @@ package System.OS_Interface is @@ -131,5 +131,5 @@ index c45559e5ba0..0b0f173e7d4 100644 pragma Assert (Result in 0 | ENOMEM); -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.2.0-alpine/0028-ada-musl-support-fixes.patch b/patches/gcc-10.3.1_git20210424-alpine/0027-ada-musl-support-fixes.patch similarity index 98% rename from patches/gcc-10.2.0-alpine/0028-ada-musl-support-fixes.patch rename to patches/gcc-10.3.1_git20210424-alpine/0027-ada-musl-support-fixes.patch index 8eb1342..e213959 100644 --- a/patches/gcc-10.2.0-alpine/0028-ada-musl-support-fixes.patch +++ b/patches/gcc-10.3.1_git20210424-alpine/0027-ada-musl-support-fixes.patch @@ -1,7 +1,7 @@ -From 5e3d7d2f1e2448b6c5eb207f9251c437629e43bc Mon Sep 17 00:00:00 2001 +From 61c266f5703b9032fc2afaa98756f89cfe62d897 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Fri, 21 Aug 2020 07:07:48 +0000 -Subject: [PATCH 28/30] ada: musl support fixes +Subject: [PATCH] ada: musl support fixes --- gcc/ada/Makefile.rtl | 10 +++++----- @@ -219,5 +219,5 @@ index af4417fab90..bab6bf3ca87 100644 status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL); #elif defined (USE_CLONE_DEVICE) -- -2.27.0 +2.31.0 diff --git a/patches/gcc-10.3.1_git20210424-alpine/0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch b/patches/gcc-10.3.1_git20210424-alpine/0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch new file mode 100644 index 0000000..5752caa --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch @@ -0,0 +1,48 @@ +From e4d804bdeb899b4a1d6539a3ad1404ad417f6abc Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" +Date: Sun, 30 Aug 2020 17:58:08 +0200 +Subject: [PATCH] gcc-go: Use _off_t type instead of _loff_t +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Taken from Adélie Linux. +--- + libgo/go/syscall/libcall_linux.go | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go +index 88286c07b6e..f8f5cfb5011 100644 +--- a/libgo/go/syscall/libcall_linux.go ++++ b/libgo/go/syscall/libcall_linux.go +@@ -206,19 +206,19 @@ func Gettid() (tid int) { + //sys Setxattr(path string, attr string, data []byte, flags int) (err error) + //setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int + +-//sys splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags int) (n int64, err error) +-//splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t, flags _C_uint) Ssize_t ++//sys splice(rfd int, roff *_off_t, wfd int, woff *_off_t, len int, flags int) (n int64, err error) ++//splice(rfd _C_int, roff *_off_t, wfd _C_int, woff *_off_t, len Size_t, flags _C_uint) Ssize_t + func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { +- var lroff _loff_t +- var plroff *_loff_t ++ var lroff _off_t ++ var plroff *_off_t + if roff != nil { +- lroff = _loff_t(*roff) ++ lroff = _off_t(*roff) + plroff = &lroff + } +- var lwoff _loff_t +- var plwoff *_loff_t ++ var lwoff _off_t ++ var plwoff *_off_t + if woff != nil { +- lwoff = _loff_t(*woff) ++ lwoff = _off_t(*woff) + plwoff = &lwoff + } + n, err = splice(rfd, plroff, wfd, plwoff, len, flags) +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/0029-gcc-go-Don-t-include-sys-user.h.patch b/patches/gcc-10.3.1_git20210424-alpine/0029-gcc-go-Don-t-include-sys-user.h.patch new file mode 100644 index 0000000..2a7181f --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0029-gcc-go-Don-t-include-sys-user.h.patch @@ -0,0 +1,30 @@ +From e04850ade73b4e9de9e95438f80bb4c0325168d8 Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" +Date: Sun, 30 Aug 2020 17:58:21 +0200 +Subject: [PATCH] gcc-go: Don't include sys/user.h +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Taken from Adélie Linux. +--- + libgo/sysinfo.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c +index 0692fd41eb7..c8d987358d9 100644 +--- a/libgo/sysinfo.c ++++ b/libgo/sysinfo.c +@@ -73,9 +73,6 @@ + #include + #include + #include +-#if defined(HAVE_SYS_USER_H) +-#include +-#endif + #if defined(HAVE_SYS_UTSNAME_H) + #include + #endif +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch b/patches/gcc-10.3.1_git20210424-alpine/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch new file mode 100644 index 0000000..3308afa --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0030-gcc-go-Fix-ucontext_t-on-PPC64.patch @@ -0,0 +1,29 @@ +From dee0f4faec19854beee5e258e91e40544fead83d Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" +Date: Sun, 30 Aug 2020 17:59:22 +0200 +Subject: [PATCH] gcc-go: Fix ucontext_t on PPC64 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Taken from Adélie Linux. +--- + libgo/runtime/go-signal.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c +index b429fdb2403..fd1c885f043 100644 +--- a/libgo/runtime/go-signal.c ++++ b/libgo/runtime/go-signal.c +@@ -224,7 +224,7 @@ getSiginfo(siginfo_t *info, void *context __attribute__((unused))) + #elif defined(__alpha__) && defined(__linux__) + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.sc_pc; + #elif defined(__PPC__) && defined(__linux__) +- ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip; ++ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32]; + #elif defined(__PPC__) && defined(_AIX) + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.jmp_context.iar; + #elif defined(__aarch64__) && defined(__linux__) +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch b/patches/gcc-10.3.1_git20210424-alpine/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch new file mode 100644 index 0000000..8531ba0 --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch @@ -0,0 +1,43 @@ +From 7c91fa8d1061a7dfe29081449cab03b8a3eae27f Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" +Date: Sun, 30 Aug 2020 17:59:45 +0200 +Subject: [PATCH] gcc-go: Fix handling of signal 34 on musl +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Taken from Adélie Linux. +--- + libgo/mksigtab.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libgo/mksigtab.sh b/libgo/mksigtab.sh +index 11e4ec436bd..fe866eacb27 100644 +--- a/libgo/mksigtab.sh ++++ b/libgo/mksigtab.sh +@@ -82,7 +82,7 @@ checksig _SIGPWR '{_SigNotify, "SIGPWR: power failure restart"}' + checksig _SIGEMT '{_SigThrow, "SIGEMT: emulate instruction executed"}' + checksig _SIGINFO '{_SigNotify, "SIGINFO: status request from keyboard"}' + checksig _SIGTHR '{_SigNotify, "SIGTHR: reserved"}' +-checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}' ++#checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}' + checksig _SIGWAITING '{_SigNotify, "SIGWAITING: reserved signal no longer used by"}' + checksig _SIGLWP '{_SigNotify, "SIGLWP: reserved signal no longer used by"}' + checksig _SIGFREEZE '{_SigNotify, "SIGFREEZE: special signal used by CPR"}' +@@ -95,10 +95,12 @@ checksig _SIGLOST ' {_SigNotify, "SIGLOST: resource lost (Sun); server died (G + + # Special handling of signals 32 and 33 on GNU/Linux systems, + # because they are special to glibc. ++# Signal 34 is additionally special to Linux systems with musl. + if test "${GOOS}" = "linux"; then +- SIGLIST=$SIGLIST"_32__33_" ++ SIGLIST=$SIGLIST"_32__33__34_" + echo ' 32: {_SigSetStack + _SigUnblock, "signal 32"}, /* SIGCANCEL; see issue 6997 */' + echo ' 33: {_SigSetStack + _SigUnblock, "signal 33"}, /* SIGSETXID; see issues 3871, 9400, 12498 */' ++ echo ' 34: {_SigSetStack + _SigUnblock, "signal 34"}, /* see issue 30062 */' + fi + + if test "${GOOS}" = "aix"; then +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch b/patches/gcc-10.3.1_git20210424-alpine/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch new file mode 100644 index 0000000..5c1892c --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch @@ -0,0 +1,38 @@ +From 2b990c08be4548705261e067233f798520a6ace0 Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" +Date: Sun, 30 Aug 2020 18:01:03 +0200 +Subject: [PATCH] gcc-go: Use int64 type as offset argument for mmap +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Taken from Adélie Linux. +--- + libgo/go/runtime/mem_gccgo.go | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgo/go/runtime/mem_gccgo.go b/libgo/go/runtime/mem_gccgo.go +index ba38ebaa9ab..3c9e5ce9461 100644 +--- a/libgo/go/runtime/mem_gccgo.go ++++ b/libgo/go/runtime/mem_gccgo.go +@@ -15,7 +15,7 @@ import ( + //go:linkname sysFree + + //extern mmap +-func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) unsafe.Pointer ++func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) unsafe.Pointer + + //extern munmap + func munmap(addr unsafe.Pointer, length uintptr) int32 +@@ -37,7 +37,7 @@ func init() { + } + } + +-func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (unsafe.Pointer, int) { ++func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) (unsafe.Pointer, int) { + p := sysMmap(addr, n, prot, flags, fd, off) + if uintptr(p) == _MAP_FAILED { + return nil, errno() +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch b/patches/gcc-10.3.1_git20210424-alpine/0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch new file mode 100644 index 0000000..485a418 --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch @@ -0,0 +1,37 @@ +From d42dbc871f149f658b6c3379bbc531efe427253b Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" +Date: Sun, 30 Aug 2020 18:02:28 +0200 +Subject: [PATCH] gcc-go: Fix st_{a,m,c}tim fields in generated sysinfo.go +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +There are more than one st_{a,m,c}tim fields in struct stat on time64 machines. + +Run the Go-isation on all of them. + +Taken from Adélie Linux. +--- + libgo/mksysinfo.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh +index bd2ba32cba1..972e2c379bc 100755 +--- a/libgo/mksysinfo.sh ++++ b/libgo/mksysinfo.sh +@@ -510,9 +510,9 @@ fi | sed -e 's/type _stat64/type Stat_t/' \ + -e 's/st_size/Size/' \ + -e 's/st_blksize/Blksize/' \ + -e 's/st_blocks/Blocks/' \ +- -e 's/st_atim/Atim/' \ +- -e 's/st_mtim/Mtim/' \ +- -e 's/st_ctim/Ctim/' \ ++ -e 's/st_atim/Atim/g' \ ++ -e 's/st_mtim/Mtim/g' \ ++ -e 's/st_ctim/Ctim/g' \ + -e 's/\([^a-zA-Z0-9_]\)_timeval\([^a-zA-Z0-9_]\)/\1Timeval\2/g' \ + -e 's/\([^a-zA-Z0-9_]\)_timespec_t\([^a-zA-Z0-9_]\)/\1Timespec\2/g' \ + -e 's/\([^a-zA-Z0-9_]\)_st_timespec_t\([^a-zA-Z0-9_]\)/\1StTimespec\2/g' \ +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/0034-gcc-go-signal-34-is-special-on-musl-libc.patch b/patches/gcc-10.3.1_git20210424-alpine/0034-gcc-go-signal-34-is-special-on-musl-libc.patch new file mode 100644 index 0000000..b085e03 --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0034-gcc-go-signal-34-is-special-on-musl-libc.patch @@ -0,0 +1,29 @@ +From aecc0619fab1b89a88bda30080417c0ddbb5d2aa Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" +Date: Sun, 30 Aug 2020 18:03:03 +0200 +Subject: [PATCH] gcc-go: signal 34 is special on musl libc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Taken from Adélie Linux. +--- + libgo/go/runtime/signal_gccgo.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgo/go/runtime/signal_gccgo.go b/libgo/go/runtime/signal_gccgo.go +index c555712a03c..9e228580d37 100644 +--- a/libgo/go/runtime/signal_gccgo.go ++++ b/libgo/go/runtime/signal_gccgo.go +@@ -106,7 +106,7 @@ func getsig(i uint32) uintptr { + if sigaction(i, nil, &sa) < 0 { + // On GNU/Linux glibc rejects attempts to call + // sigaction with signal 32 (SIGCANCEL) or 33 (SIGSETXID). +- if GOOS == "linux" && (i == 32 || i == 33) { ++ if GOOS == "linux" && (i == 32 || i == 33 || i == 34) { + return _SIG_DFL + } + throw("sigaction read failure") +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch b/patches/gcc-10.3.1_git20210424-alpine/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch new file mode 100644 index 0000000..1859b88 --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0035-gcc-go-Prefer-_off_t-over-_off64_t.patch @@ -0,0 +1,30 @@ +From c988692ec6b151541088b1b48a29d6a54269f55c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B6ren=20Tempel?= +Date: Sun, 30 Aug 2020 19:26:53 +0200 +Subject: [PATCH] gcc-go: Prefer _off_t over _off64_t + +musl does not seem to have _off64_t. +--- + libgo/mksysinfo.sh | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh +index 972e2c379bc..8d6da15f983 100755 +--- a/libgo/mksysinfo.sh ++++ b/libgo/mksysinfo.sh +@@ -379,11 +379,7 @@ fi + # Some basic types. + echo 'type Size_t _size_t' >> ${OUT} + echo "type Ssize_t _ssize_t" >> ${OUT} +-if grep '^const _HAVE_OFF64_T = ' gen-sysinfo.go > /dev/null 2>&1; then +- echo "type Offset_t _off64_t" >> ${OUT} +-else +- echo "type Offset_t _off_t" >> ${OUT} +-fi ++echo "type Offset_t _off_t" >> ${OUT} + echo "type Mode_t _mode_t" >> ${OUT} + echo "type Pid_t _pid_t" >> ${OUT} + echo "type Uid_t _uid_t" >> ${OUT} +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch b/patches/gcc-10.3.1_git20210424-alpine/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch new file mode 100644 index 0000000..a2c0c03 --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch @@ -0,0 +1,27 @@ +From f634ef3142f759c8220830b77487fe9686ee0f61 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B6ren=20Tempel?= +Date: Sun, 30 Aug 2020 19:27:51 +0200 +Subject: [PATCH] gcc-go: undef SETCONTEXT_CLOBBERS_TLS in proc.c + +--- + libgo/runtime/proc.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c +index 6f7d2e27996..5afd7902497 100644 +--- a/libgo/runtime/proc.c ++++ b/libgo/runtime/proc.c +@@ -66,6 +66,10 @@ static void gscanstack(G*); + + __thread G *g __asm__(GOSYM_PREFIX "runtime.g"); + ++/* libucontext does not seem to support tlsbase, undef the macro ++ * here to make sure we define initcontext and fixcontext as dummies. */ ++#undef SETCONTEXT_CLOBBERS_TLS ++ + #ifndef SETCONTEXT_CLOBBERS_TLS + + static inline void +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/0037-gcc-go-link-to-libucontext.patch b/patches/gcc-10.3.1_git20210424-alpine/0037-gcc-go-link-to-libucontext.patch new file mode 100644 index 0000000..a9befb1 --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0037-gcc-go-link-to-libucontext.patch @@ -0,0 +1,25 @@ +From 13f05ade4843b355a96d72cf3464694e5eca641e Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" +Date: Mon, 31 Aug 2020 08:59:40 +0200 +Subject: [PATCH] gcc-go: link to libucontext + +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 63627db68cf..c7f1f84d683 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -48823,7 +48823,7 @@ configure-target-libgo: + esac; \ + module_srcdir=libgo; \ + rm -f no-such-file || : ; \ +- CONFIG_SITE=no-such-file $(SHELL) \ ++ CONFIG_SITE=no-such-file LIBS="-lucontext $$LIBS" $(SHELL) \ + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \ +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch b/patches/gcc-10.3.1_git20210424-alpine/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch new file mode 100644 index 0000000..86793d8 --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch @@ -0,0 +1,26 @@ +From 6fb1014e9a20deb8c634fc12dd9a146a800e6b70 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B6ren=20Tempel?= +Date: Mon, 31 Aug 2020 20:26:56 +0200 +Subject: [PATCH] gcc-go: Disable printing of unaccessible ppc64 struct members + +These struct members do not seem to exist on musl. +--- + libgo/runtime/go-signal.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c +index fd1c885f043..e845e453332 100644 +--- a/libgo/runtime/go-signal.c ++++ b/libgo/runtime/go-signal.c +@@ -333,7 +333,7 @@ dumpregs(siginfo_t *info __attribute__((unused)), void *context __attribute__((u + runtime_printf("sp %X\n", m->sc_regs[30]); + runtime_printf("pc %X\n", m->sc_pc); + } +-#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__linux__) ++#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__GLIBC__) + { + mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext; + int i; +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch b/patches/gcc-10.3.1_git20210424-alpine/0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch new file mode 100644 index 0000000..bd5d628 --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch @@ -0,0 +1,53 @@ +From ae168d35da22feaa01f9f77f7b578aa05cd50c96 Mon Sep 17 00:00:00 2001 +From: Geod24 +Date: Mon, 16 Nov 2020 18:40:46 +0100 +Subject: [PATCH] CRuntime_Musl: Support v1.2.0 for 32 bits + +As explained in the comment, `time_t` on Musl is now always 64 bits, +but used to be 32 bits on 32 bits systems. +--- + .../libdruntime/core/sys/posix/sys/types.d | 25 ++++++++++++++++++- + 1 file changed, 24 insertions(+), 1 deletion(-) + +diff --git a/libphobos/libdruntime/core/sys/posix/sys/types.d b/libphobos/libdruntime/core/sys/posix/sys/types.d +index 451c8b4fccc..ca654fbe424 100644 +--- a/libphobos/libdruntime/core/sys/posix/sys/types.d ++++ b/libphobos/libdruntime/core/sys/posix/sys/types.d +@@ -139,10 +139,33 @@ else version (CRuntime_Musl) + alias int pid_t; + alias uint uid_t; + alias uint gid_t; ++ ++ /** ++ * Musl versions before v1.2.0 (up to v1.1.24) had different ++ * definitions for `time_t` for 32 bits. ++ * This was changed to always be 64 bits in v1.2.0: ++ * https://musl.libc.org/time64.html ++ * This change was only for 32 bits system and ++ * didn't affect 64 bits systems ++ * ++ * To check previous definitions, `grep` for `time_t` in `arch/`, ++ * and the result should be (in v1.1.24): ++ * --- ++ * // arch/riscv64/bits/alltypes.h.in:20:TYPEDEF long time_t; ++ * // arch/s390x/bits/alltypes.h.in:17:TYPEDEF long time_t; ++ * // arch/sh/bits/alltypes.h.in:21:TYPEDEF long time_t; ++ * --- ++ * ++ * In order to be compatible with old versions of Musl, ++ * one can recompile druntime with `CRuntime_Musl_Pre_Time64`. ++ */ + version (D_X32) + alias long time_t; +- else ++ else version (CRuntime_Musl_Pre_Time64) + alias c_long time_t; ++ else ++ alias long time_t; ++ + alias c_long clock_t; + alias c_ulong pthread_t; + version (D_LP64) +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch b/patches/gcc-10.3.1_git20210424-alpine/0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch new file mode 100644 index 0000000..1ba5828 --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch @@ -0,0 +1,269 @@ +From bfb6df1638635136c4fd8960575331476fb68d04 Mon Sep 17 00:00:00 2001 +From: Drew DeVault +Date: Wed, 9 Dec 2020 16:07:26 +0000 +Subject: [PATCH] configure: Add --enable-autolink-libatomic, use in + LINK_GCC_C_SEQUENCE_SPEC [PR81358] + +This fixes issues with RISC-V. +--- + Makefile.in | 1 + + gcc/config.in | 6 ++++++ + gcc/config/gnu-user.h | 12 +++++++++++- + gcc/configure | 34 ++++++++++++++++++++++++++++++++-- + gcc/configure.ac | 23 ++++++++++++++++++++++- + gcc/doc/install.texi | 8 ++++++++ + gcc/doc/tm.texi | 8 +++++++- + gcc/doc/tm.texi.in | 8 +++++++- + gcc/gcc.c | 12 +++++++++++- + 9 files changed, 105 insertions(+), 7 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index c7f1f84d683..cb3983ca547 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -222,6 +222,7 @@ HOST_EXPORTS = \ + RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \ + READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \ + TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ ++ TARGET_CONFIGDIRS="$(TARGET_CONFIGDIRS)"; export TARGET_CONFIGDIRS; \ + HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \ + GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \ + GMPINC="$(HOST_GMPINC)"; export GMPINC; \ +diff --git a/gcc/config.in b/gcc/config.in +index 9551c0dfdf9..c8ca910df8a 100644 +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -106,6 +106,12 @@ + #endif + + ++/* Define if libatomic should always be linked. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_AUTOLINK_LIBATOMIC ++#endif ++ ++ + /* Define to 1 to specify that we are using the BID decimal floating point + format instead of DPD */ + #ifndef USED_FOR_TARGET +diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h +index 7f30c363e4a..246698bfea5 100644 +--- a/gcc/config/gnu-user.h ++++ b/gcc/config/gnu-user.h +@@ -109,8 +109,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} " + #endif + ++#if !defined(LINK_LIBATOMIC_SPEC) && defined(ENABLE_AUTOLINK_LIBATOMIC) ++# ifdef LD_AS_NEEDED_OPTION ++# define LINK_LIBATOMIC_SPEC LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION ++# else ++# define LINK_LIBATOMIC_SPEC "-latomic" ++# endif ++#elif !defined(LINK_LIBATOMIC_SPEC) ++# define LINK_LIBATOMIC_SPEC "" ++#endif ++ + #define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \ +- "%{static|static-pie:--start-group} %G %{!nolibc:%L} \ ++ "%{static|static-pie:--start-group} %G %{!nolibc:" LINK_LIBATOMIC_SPEC " %L} \ + %{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}" + + #undef LINK_GCC_C_SEQUENCE_SPEC +diff --git a/gcc/configure b/gcc/configure +index 808570b6c99..6c1e95e0444 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -969,6 +969,7 @@ with_documentation_root_url + with_changes_root_url + enable_languages + with_multilib_list ++enable_autolink_libatomic + with_zstd + with_zstd_include + with_zstd_lib +@@ -1695,6 +1696,9 @@ Optional Features: + --disable-shared don't provide a shared libgcc + --disable-gcov don't provide libgcov and related host tools + --enable-languages=LIST specify which front-ends to build ++ --enable-autolink-libatomic ++ enable automatic linking of libatomic (ignored if ++ not built) + --disable-rpath do not hardcode runtime library paths + --enable-sjlj-exceptions + arrange to use setjmp/longjmp exception handling +@@ -8009,6 +8013,33 @@ else + fi + + ++# If libatomic is available, whether it should be linked automatically ++# Check whether --enable-autolink-libatomic was given. ++if test "${enable_autolink_libatomic+set}" = set; then : ++ enableval=$enable_autolink_libatomic; ++ case $enable_autolink_libatomic in ++ yes | no) ;; ++ *) as_fn_error $? "'$enable_autolink_libatomic' is an invalid value for ++--enable-autolink-libatomic. Valid choices are 'yes' and 'no'." "$LINENO" 5 ;; ++ esac ++ ++else ++ enable_autolink_libatomic='' ++fi ++ ++ ++if test x$enable_autolink_libatomic = xyes; then ++ if echo " ${TARGET_CONFIGDIRS} " | grep " libatomic " > /dev/null 2>&1 ; then ++ ++$as_echo "#define ENABLE_AUTOLINK_LIBATOMIC 1" >>confdefs.h ++ ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libatomic is not build for this target, --enable-autolink-libatomic ignored" >&5 ++$as_echo "$as_me: WARNING: libatomic is not build for this target, --enable-autolink-libatomic ignored" >&2;} ++ fi ++fi ++ ++ + # ------------------------- + # Checks for other programs + # ------------------------- +@@ -19131,7 +19162,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 19131 "configure" ++#line 19158 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -32267,4 +32298,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + fi + +- +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 9c2571de709..52fd6d8fe06 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1110,6 +1110,28 @@ AC_ARG_WITH(multilib-list, + :, + with_multilib_list=default) + ++# If libatomic is available, whether it should be linked automatically ++AC_ARG_ENABLE(autolink-libatomic, ++[AS_HELP_STRING([--enable-autolink-libatomic], ++ [enable automatic linking of libatomic (ignored if not built)])], ++[ ++ case $enable_autolink_libatomic in ++ yes | no) ;; ++ *) AC_MSG_ERROR(['$enable_autolink_libatomic' is an invalid value for ++--enable-autolink-libatomic. Valid choices are 'yes' and 'no'.]) ;; ++ esac ++], [enable_autolink_libatomic='']) ++ ++if test x$enable_autolink_libatomic = xyes; then ++ if echo " ${TARGET_CONFIGDIRS} " | grep " libatomic " > /dev/null 2>&1 ; then ++ AC_DEFINE(ENABLE_AUTOLINK_LIBATOMIC, 1, ++ [Define if libatomic should always be linked.]) ++ else ++ AC_MSG_WARN([libatomic is not build for this target, --enable-autolink-libatomic ignored]) ++ fi ++fi ++ ++ + # ------------------------- + # Checks for other programs + # ------------------------- +@@ -6945,4 +6967,3 @@ done + ], + [subdirs='$subdirs']) + AC_OUTPUT +- +diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi +index 7d98ec4190a..a58d5a05be2 100644 +--- a/gcc/doc/install.texi ++++ b/gcc/doc/install.texi +@@ -2169,6 +2169,14 @@ files, but these changed header paths may conflict with some compilation + environments. Enabled by default, and may be disabled using + @option{--disable-canonical-system-headers}. + ++@item --enable-autolink-libatomic ++@itemx --disable-autolink-libatomic ++Tell GCC that it should automatically link libatomic; if supported by ++the linker, the file is only linked as needed. This flag is ignored ++when libatomic is not built. Note that this conigure flag is in particular ++useful when building an offloading-target compiler; as for those, a ++user had to specify @code{-foffload=target=-latomic} otherwise. ++ + @item --with-glibc-version=@var{major}.@var{minor} + Tell GCC that when the GNU C Library (glibc) is used on the target it + will be version @var{major}.@var{minor} or later. Normally this can +diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi +index fcb7245e95c..67b485e8d0c 100644 +--- a/gcc/doc/tm.texi ++++ b/gcc/doc/tm.texi +@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search. + + @defmac LINK_GCC_C_SEQUENCE_SPEC + The sequence in which libgcc and libc are specified to the linker. +-By default this is @code{%G %L %G}. ++By default this is @code{%G LINK_LIBATOMIC_SPEC %L %G}. ++@end defmac ++ ++@defmac LINK_LIBATOMIC_SPEC ++This macro is used in the default @code{LINK_GCC_C_SEQUENCE_SPEC} to link ++libatomic. By default, it is unset unless @code{ENABLE_AUTOLINK_LIBATOMIC} ++is set. + @end defmac + + @defmac POST_LINK_SPEC +diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in +index c17209daa51..3ec63f6d091 100644 +--- a/gcc/doc/tm.texi.in ++++ b/gcc/doc/tm.texi.in +@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search. + + @defmac LINK_GCC_C_SEQUENCE_SPEC + The sequence in which libgcc and libc are specified to the linker. +-By default this is @code{%G %L %G}. ++By default this is @code{%G LINK_LIBATOMIC_SPEC %L %G}. ++@end defmac ++ ++@defmac LINK_LIBATOMIC_SPEC ++This macro is used in the default @code{LINK_GCC_C_SEQUENCE_SPEC} to link ++libatomic. By default, it is unset unless @code{ENABLE_AUTOLINK_LIBATOMIC} ++is set. + @end defmac + + @defmac POST_LINK_SPEC +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 40e07354b3d..81bd50b4d7c 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -877,13 +877,23 @@ proper position among the other output files. */ + # define ASM_DEBUG_SPEC "" + #endif + ++#if !defined(LINK_LIBATOMIC_SPEC) && defined(ENABLE_AUTOLINK_LIBATOMIC) ++# ifdef LD_AS_NEEDED_OPTION ++# define LINK_LIBATOMIC_SPEC LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION ++# else ++# define LINK_LIBATOMIC_SPEC "-latomic" ++# endif ++#elif !defined(LINK_LIBATOMIC_SPEC) ++# define LINK_LIBATOMIC_SPEC "" ++#endif ++ + /* Here is the spec for running the linker, after compiling all files. */ + + /* This is overridable by the target in case they need to specify the + -lgcc and -lc order specially, yet not require them to override all + of LINK_COMMAND_SPEC. */ + #ifndef LINK_GCC_C_SEQUENCE_SPEC +-#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}" ++#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:" LINK_LIBATOMIC_SPEC " %L %G}" + #endif + + #ifdef ENABLE_DEFAULT_SSP +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/0041-Use-generic-errstr.go-implementation-on-musl.patch b/patches/gcc-10.3.1_git20210424-alpine/0041-Use-generic-errstr.go-implementation-on-musl.patch new file mode 100644 index 0000000..1561a7c --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/0041-Use-generic-errstr.go-implementation-on-musl.patch @@ -0,0 +1,48 @@ +From 3bc47945dab0108423dbaa211332817c4784b3db Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B6ren=20Tempel?= +Date: Mon, 19 Apr 2021 07:21:41 +0200 +Subject: [PATCH] Use generic errstr.go implementation on musl + +glibc provides two version of strerror_r() depending on a feature test +macro. The first is the XSI-compliant version which returns an int, the +second is GNU-specific and returns a char pointer. + +Similarity, gcc's libgo provides two implementations of Errstr() both of +which use strerror_r(). On Linux, it is assumed that the GNU-specific +strerror_r version is used. However, musl only provides the +XSI-compliant version of strerror_r. This patch enables the generic +Errstr() implementation which also uses the XSI-compliant version of +strerror_r. +--- + libgo/go/syscall/errstr.go | 1 - + libgo/go/syscall/errstr_glibc.go | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/libgo/go/syscall/errstr.go b/libgo/go/syscall/errstr.go +index 6c2441d364d..8f7c5538163 100644 +--- a/libgo/go/syscall/errstr.go ++++ b/libgo/go/syscall/errstr.go +@@ -5,7 +5,6 @@ + // license that can be found in the LICENSE file. + + // +build !hurd +-// +build !linux + + package syscall + +diff --git a/libgo/go/syscall/errstr_glibc.go b/libgo/go/syscall/errstr_glibc.go +index 5b19e6f202d..8dc60172186 100644 +--- a/libgo/go/syscall/errstr_glibc.go ++++ b/libgo/go/syscall/errstr_glibc.go +@@ -7,7 +7,7 @@ + // We use this rather than errstr.go because on GNU/Linux sterror_r + // returns a pointer to the error message, and may not use buf at all. + +-// +build hurd linux ++// +build hurd !linux + + package syscall + +-- +2.31.0 + diff --git a/patches/gcc-10.3.1_git20210424-alpine/apply_patches.sh b/patches/gcc-10.3.1_git20210424-alpine/apply_patches.sh new file mode 100755 index 0000000..79defbe --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/apply_patches.sh @@ -0,0 +1,46 @@ +#! /bin/bash + +for p in 0001-posix_memalign.patch \ + 0002-gcc-poison-system-directories.patch \ + 0003-Turn-on-Wl-z-relro-z-now-by-default.patch \ + 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch \ + 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch \ + 0006-Enable-Wformat-and-Wformat-security-by-default.patch \ + 0007-Enable-Wtrampolines-by-default.patch \ + 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch \ + 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch \ + 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch \ + 0011-libiberty-copy-PIC-objects-during-build-process.patch \ + 0012-libitm-disable-FORTIFY.patch \ + 0013-libgcc_s.patch \ + 0014-nopie.patch \ + 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch \ + 0016-dlang-update-zlib-binding.patch \ + 0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch \ + 0018-ada-fix-shared-linking.patch \ + 0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch \ + 0020-add-fortify-headers-paths.patch \ + 0021-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch \ + 0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch \ + 0023-Pure-64-bit-MIPS.patch \ + 0024-use-pure-64-bit-configuration-where-appropriate.patch \ + 0025-always-build-libgcc_eh.a.patch \ + 0026-ada-libgnarl-compatibility-for-musl.patch \ + 0027-ada-musl-support-fixes.patch \ + 0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch \ + 0029-gcc-go-Don-t-include-sys-user.h.patch \ + 0030-gcc-go-Fix-ucontext_t-on-PPC64.patch \ + 0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch \ + 0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch \ + 0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch \ + 0034-gcc-go-signal-34-is-special-on-musl-libc.patch \ + 0035-gcc-go-Prefer-_off_t-over-_off64_t.patch \ + 0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch \ + 0037-gcc-go-link-to-libucontext.patch \ + 0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch \ + 0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch \ + 0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch \ + 0041-Use-generic-errstr.go-implementation-on-musl.patch +do + patch -Np1 -i ../patches/gcc-10.3.1_git20210424-alpine/$p +done diff --git a/patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh b/patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh new file mode 100755 index 0000000..3e3632b --- /dev/null +++ b/patches/gcc-10.3.1_git20210424-alpine/apply_patches_ct.sh @@ -0,0 +1,45 @@ +#! /bin/bash + +for p in 0001-posix_memalign.patch \ + 0002-gcc-poison-system-directories.patch \ + 0003-Turn-on-Wl-z-relro-z-now-by-default.patch \ + 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch \ + 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch \ + 0006-Enable-Wformat-and-Wformat-security-by-default.patch \ + 0007-Enable-Wtrampolines-by-default.patch \ + 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch \ + 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch \ + 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch \ + 0011-libiberty-copy-PIC-objects-during-build-process.patch \ + 0012-libitm-disable-FORTIFY.patch \ + 0013-libgcc_s.patch \ + 0014-nopie.patch \ + 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch \ + 0016-dlang-update-zlib-binding.patch \ + 0017-dlang-fix-fcntl-on-mips-add-libucontext-dep.patch \ + 0018-ada-fix-shared-linking.patch \ + 0019-build-fix-CXXFLAGS_FOR_BUILD-passing.patch \ + 0020-add-fortify-headers-paths.patch \ + 0022-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch \ + 0023-Pure-64-bit-MIPS.patch \ + 0024-use-pure-64-bit-configuration-where-appropriate.patch \ + 0025-always-build-libgcc_eh.a.patch \ + 0026-ada-libgnarl-compatibility-for-musl.patch \ + 0027-ada-musl-support-fixes.patch \ + 0028-gcc-go-Use-_off_t-type-instead-of-_loff_t.patch \ + 0029-gcc-go-Don-t-include-sys-user.h.patch \ + 0030-gcc-go-Fix-ucontext_t-on-PPC64.patch \ + 0031-gcc-go-Fix-handling-of-signal-34-on-musl.patch \ + 0032-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch \ + 0033-gcc-go-Fix-st_-a-m-c-tim-fields-in-generated-sysinfo.patch \ + 0034-gcc-go-signal-34-is-special-on-musl-libc.patch \ + 0035-gcc-go-Prefer-_off_t-over-_off64_t.patch \ + 0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch \ + 0037-gcc-go-link-to-libucontext.patch \ + 0038-gcc-go-Disable-printing-of-unaccessible-ppc64-struct.patch \ + 0039-CRuntime_Musl-Support-v1.2.0-for-32-bits.patch \ + 0040-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch \ + 0041-Use-generic-errstr.go-implementation-on-musl.patch +do + patch -Np1 -i ../patches/gcc-10.3.1_git20210424-alpine/$p +done diff --git a/patches/gcc-9.1.0-void/ada-shared.patch b/patches/gcc-9.1.0-void/ada-shared.patch deleted file mode 100644 index 7b42806..0000000 --- a/patches/gcc-9.1.0-void/ada-shared.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- gcc/ada/link.c -+++ gcc/ada/link.c -@@ -105,9 +105,9 @@ - - #elif defined (__FreeBSD__) - const char *__gnat_object_file_option = "-Wl,@"; --const char *__gnat_run_path_option = "-Wl,-rpath,"; --char __gnat_shared_libgnat_default = STATIC; --char __gnat_shared_libgcc_default = STATIC; -+const char *__gnat_run_path_option = ""; -+char __gnat_shared_libgnat_default = SHARED; -+char __gnat_shared_libgcc_default = SHARED; - int __gnat_link_max = 8192; - unsigned char __gnat_objlist_file_supported = 1; - const char *__gnat_object_library_extension = ".a"; -@@ -127,9 +127,9 @@ - - #elif defined (linux) || defined(__GLIBC__) - const char *__gnat_object_file_option = "-Wl,@"; --const char *__gnat_run_path_option = "-Wl,-rpath,"; --char __gnat_shared_libgnat_default = STATIC; --char __gnat_shared_libgcc_default = STATIC; -+const char *__gnat_run_path_option = ""; -+char __gnat_shared_libgnat_default = SHARED; -+char __gnat_shared_libgcc_default = SHARED; - int __gnat_link_max = 8192; - unsigned char __gnat_objlist_file_supported = 1; - const char *__gnat_object_library_extension = ".a"; diff --git a/patches/gcc-9.1.0-void/fix-cxxflags-passing.patch b/patches/gcc-9.1.0-void/fix-cxxflags-passing.patch deleted file mode 100644 index dda2a50..0000000 --- a/patches/gcc-9.1.0-void/fix-cxxflags-passing.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- Makefile.in.orig -+++ Makefile.in -@@ -169,6 +169,7 @@ - # built for the build system to override those in BASE_FLAGS_TO_PASSS. - EXTRA_BUILD_FLAGS = \ - CFLAGS="$(CFLAGS_FOR_BUILD)" \ -+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ - LDFLAGS="$(LDFLAGS_FOR_BUILD)" - - # This is the list of directories to built for the host system. diff --git a/patches/gcc-9.1.0-void/fix-musl-execinfo.patch b/patches/gcc-9.1.0-void/fix-musl-execinfo.patch deleted file mode 100644 index 583eac7..0000000 --- a/patches/gcc-9.1.0-void/fix-musl-execinfo.patch +++ /dev/null @@ -1,33 +0,0 @@ -There is no in musl libc - ---- libvtv/vtv_rts.cc 2016-09-23 16:17:11.000000000 +0200 -+++ libvtc/vtv_rts.cc 2016-09-25 15:08:57.896000000 +0200 -@@ -124,7 +124,7 @@ - #include - #include - #include --#else -+#elif defined (__GLIBC__) - #include - #endif - ---- libvtv/vtv_utils.cc 2016-09-23 16:17:11.000000000 +0200 -+++ libvtv/vtv_utils.cc 2016-09-25 15:15:35.529000000 +0200 -@@ -34,7 +34,7 @@ - #include - #if defined (__CYGWIN__) || defined (__MINGW32__) - #include --#else -+#elif defined (__GLIBC__) - #include - #endif - -@@ -178,7 +178,7 @@ - - __vtv_add_to_log (vtv_failures_log_fd, "%s", log_msg); - --#if !defined (__CYGWIN__) && !defined (__MINGW32__) -+#if !defined (__CYGWIN__) && !defined (__MINGW32__) && defined(__GLIBC__) - if (generate_backtrace) - { - #define STACK_DEPTH 20 diff --git a/patches/gcc-9.1.0-void/libgcc-musl-ldbl128-config.patch b/patches/gcc-9.1.0-void/libgcc-musl-ldbl128-config.patch deleted file mode 100644 index e692b41..0000000 --- a/patches/gcc-9.1.0-void/libgcc-musl-ldbl128-config.patch +++ /dev/null @@ -1,138 +0,0 @@ -From 330788a7acde436c1ee8fcb0c1fd657e6ffab8fd Mon Sep 17 00:00:00 2001 -From: q66 -Date: Thu, 2 May 2019 18:58:29 +0200 -Subject: [PATCH] libgcc: do not build 128-bit long double runtime support for - musl - -Another patch was already disabling 128-bit long doubles for the -compiler itself, this one additionally avoids building the runtime -support for that. - -Musl does not support 128-bit long doubles, and building libgcc -with 128-bit long double ABI was breaking things like ld.gold -which refuses to link two objects with different FP ABI tags. ---- - libgcc/config.host | 10 +++++++++- - libgcc/config/rs6000/ppc64-fp.c | 14 ++++++++++++++ - libgcc/config/rs6000/t-musl | 8 ++++++++ - 3 files changed, 31 insertions(+), 1 deletion(-) - create mode 100644 libgcc/config/rs6000/t-musl - -diff --git a/libgcc/config.host b/libgcc/config.host -index 11b4aca..51ceef5 100644 ---- libgcc/config.host -+++ libgcc/config.host -@@ -1071,8 +1071,16 @@ powerpc-*-rtems*) - extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o" - ;; - powerpc*-*-linux*) -- tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-linux t-dfprules rs6000/t-ppc64-fp t-slibgcc-libgcc" -+ tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-dfprules rs6000/t-ppc64-fp t-slibgcc-libgcc" - tmake_file="${tmake_file} t-stack rs6000/t-stack-rs6000" -+ case ${host} in -+ powerpc*-*-linux-musl*) -+ tmake_file="${tmake_file} rs6000/t-musl" -+ ;; -+ *) -+ tmake_file="${tmake_file} rs6000/t-linux" -+ ;; -+ esac - case $ppc_fp_type in - 64) - ;; -diff --git a/libgcc/config/rs6000/ppc64-fp.c b/libgcc/config/rs6000/ppc64-fp.c -index faffc82..9f479ee 100644 ---- libgcc/config/rs6000/ppc64-fp.c -+++ libgcc/config/rs6000/ppc64-fp.c -@@ -25,25 +25,34 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - - #if defined(__powerpc64__) || defined (__64BIT__) || defined(__ppc64__) -+#if __LDBL_MANT_DIG__ > __DBL_MANT_DIG__ - #define TMODES -+#endif - #include "fp-bit.h" - -+#ifdef TMODES - extern DItype __fixtfdi (TFtype); -+#endif - extern DItype __fixdfdi (DFtype); - extern DItype __fixsfdi (SFtype); - extern USItype __fixunsdfsi (DFtype); - extern USItype __fixunssfsi (SFtype); -+#ifdef TMODES - extern TFtype __floatditf (DItype); - extern TFtype __floatunditf (UDItype); -+#endif - extern DFtype __floatdidf (DItype); - extern DFtype __floatundidf (UDItype); - extern SFtype __floatdisf (DItype); - extern SFtype __floatundisf (UDItype); -+#ifdef TMODES - extern DItype __fixunstfdi (TFtype); -+#endif - - static DItype local_fixunssfdi (SFtype); - static DItype local_fixunsdfdi (DFtype); - -+#ifdef TMODES - DItype - __fixtfdi (TFtype a) - { -@@ -51,6 +60,7 @@ __fixtfdi (TFtype a) - return - __fixunstfdi (-a); - return __fixunstfdi (a); - } -+#endif - - DItype - __fixdfdi (DFtype a) -@@ -86,6 +96,7 @@ __fixunssfsi (SFtype a) - return (SItype) a; - } - -+#ifdef TMODES - TFtype - __floatditf (DItype u) - { -@@ -109,6 +120,7 @@ __floatunditf (UDItype u) - - return (TFtype) dh + (TFtype) dl; - } -+#endif - - DFtype - __floatdidf (DItype u) -@@ -183,6 +195,7 @@ __floatundisf (UDItype u) - return (SFtype) f; - } - -+#ifdef TMODES - DItype - __fixunstfdi (TFtype a) - { -@@ -206,6 +219,7 @@ __fixunstfdi (TFtype a) - v += (USItype) a; - return v; - } -+#endif - - /* This version is needed to prevent recursion; fixunsdfdi in libgcc - calls fixdfdi, which in turn calls calls fixunsdfdi. */ -diff --git a/libgcc/config/rs6000/t-musl b/libgcc/config/rs6000/t-musl -new file mode 100644 -index 0000000..f261d8a ---- /dev/null -+++ libgcc/config/rs6000/t-musl -@@ -0,0 +1,8 @@ -+# Overrides for musl; we want to avoid building all these implementations -+# required for quad-precision float handling as musl does not support that, -+# ibm-ldouble.c is added into the build by t-ppccomm -+ -+HOST_LIBGCC2_CFLAGS += -mlong-double-64 -mno-minimal-toc -+ -+# We do not want to build ibm-ldouble.c. -+LIB2ADD := $(filter-out %ibm-ldouble.c, $(LIB2ADD)) --- -2.21.0 - diff --git a/patches/gcc-9.1.0-void/musl-ada.patch b/patches/gcc-9.1.0-void/musl-ada.patch deleted file mode 100644 index 5e91b04..0000000 --- a/patches/gcc-9.1.0-void/musl-ada.patch +++ /dev/null @@ -1,204 +0,0 @@ -diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c -index 3b0aea9..ee0bb69 100644 ---- gcc/ada/adaint.c -+++ gcc/ada/adaint.c -@@ -76,6 +76,11 @@ - #include - #include - #endif -+ -+#if defined (linux) -+#define _GNU_SOURCE 1 -+#include -+#endif - - #ifdef __PikeOS__ - #define __BSD_VISIBLE 1 -@@ -3255,7 +3260,6 @@ __gnat_lwp_self (void) - #endif - - #if defined (__linux__) --#include - - /* glibc versions earlier than 2.7 do not define the routines to handle - dynamically allocated CPU sets. For these targets, we use the static -@@ -3265,7 +3269,7 @@ __gnat_lwp_self (void) - - /* Dynamic cpu sets */ - --cpu_set_t * -+void * - __gnat_cpu_alloc (size_t count) - { - return CPU_ALLOC (count); -@@ -3278,33 +3282,33 @@ __gnat_cpu_alloc_size (size_t count) - } - - void --__gnat_cpu_free (cpu_set_t *set) -+__gnat_cpu_free (void *set) - { -- CPU_FREE (set); -+ CPU_FREE ((cpu_set_t *) set); - } - - void --__gnat_cpu_zero (size_t count, cpu_set_t *set) -+__gnat_cpu_zero (size_t count, void *set) - { -- CPU_ZERO_S (count, set); -+ CPU_ZERO_S (count, (cpu_set_t *) set); - } - - void --__gnat_cpu_set (int cpu, size_t count, cpu_set_t *set) -+__gnat_cpu_set (int cpu, size_t count, void *set) - { - /* Ada handles CPU numbers starting from 1, while C identifies the first - CPU by a 0, so we need to adjust. */ -- CPU_SET_S (cpu - 1, count, set); -+ CPU_SET_S (cpu - 1, count, (cpu_set_t *) set); - } - - #else /* !CPU_ALLOC */ - - /* Static cpu sets */ - --cpu_set_t * -+void * - __gnat_cpu_alloc (size_t count ATTRIBUTE_UNUSED) - { -- return (cpu_set_t *) xmalloc (sizeof (cpu_set_t)); -+ return xmalloc (sizeof (cpu_set_t)); - } - - size_t -@@ -3314,23 +3318,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED) - } - - void --__gnat_cpu_free (cpu_set_t *set) -+__gnat_cpu_free (void *set) - { - free (set); - } - - void --__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, cpu_set_t *set) -+__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, void *set) - { -- CPU_ZERO (set); -+ CPU_ZERO ((cpu_set_t *) set); - } - - void --__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, cpu_set_t *set) -+__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, void *set) - { - /* Ada handles CPU numbers starting from 1, while C identifies the first - CPU by a 0, so we need to adjust. */ -- CPU_SET (cpu - 1, set); -+ CPU_SET (cpu - 1, (cpu_set_t *) set); - } - #endif /* !CPU_ALLOC */ - #endif /* __linux__ */ -diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h -index 0d12f7e..a063b47 100644 ---- gcc/ada/adaint.h -+++ gcc/ada/adaint.h -@@ -316,13 +316,11 @@ extern void *__gnat_lwp_self (void); - - /* Routines for interface to required CPU set primitives */ - --#include -- --extern cpu_set_t *__gnat_cpu_alloc (size_t); -+extern void * __gnat_cpu_alloc (size_t); - extern size_t __gnat_cpu_alloc_size (size_t); --extern void __gnat_cpu_free (cpu_set_t *); --extern void __gnat_cpu_zero (size_t, cpu_set_t *); --extern void __gnat_cpu_set (int, size_t, cpu_set_t *); -+extern void __gnat_cpu_free (void *); -+extern void __gnat_cpu_zero (size_t, void *); -+extern void __gnat_cpu_set (int, size_t, void *); - #endif - - #if defined (_WIN32) ---- gcc/ada/Makefile.rtl 2019-05-14 21:18:45.217455681 +0200 -+++ gcc/ada/Makefile.rtl 2019-05-14 21:21:30.686464218 +0200 -@@ -1521,7 +1521,7 @@ - s-tpopsp.adb -Upstream: yes -Reason: PR tree-optimization/90949 -* tree-ssa-copy.c (fini_copy_prop): Use reset_flow_sensitive_info. -* tree-ssanames.c (reset_flow_sensitive_info): Reset non-null state. - ---- gcc/tree-ssa-copy.c 2019-01-01 13:31:55.000000000 +0100 -+++ gcc/tree-ssa-copy.c 2019-06-26 18:50:01.030395471 +0200 -@@ -545,13 +545,12 @@ - duplicate_ssa_name_ptr_info (copy_of[i].value, - SSA_NAME_PTR_INFO (var)); - /* Points-to information is cfg insensitive, -- but alignment info might be cfg sensitive, if it -- e.g. is derived from VRP derived non-zero bits. -- So, do not copy alignment info if the two SSA_NAMEs -- aren't defined in the same basic block. */ -+ but [E]VRP might record context sensitive alignment -+ info, non-nullness, etc. So reset context sensitive -+ info if the two SSA_NAMEs aren't defined in the same -+ basic block. */ - if (var_bb != copy_of_bb) -- mark_ptr_info_alignment_unknown -- (SSA_NAME_PTR_INFO (copy_of[i].value)); -+ reset_flow_sensitive_info (copy_of[i].value); - } - else if (!POINTER_TYPE_P (TREE_TYPE (var)) - && SSA_NAME_RANGE_INFO (var) ---- gcc/tree-ssanames.c 2019-03-18 14:59:11.000000000 +0100 -+++ gcc/tree-ssanames.c 2019-06-26 18:50:11.282394906 +0200 -@@ -820,7 +820,12 @@ - { - /* points-to info is not flow-sensitive. */ - if (SSA_NAME_PTR_INFO (name)) -- mark_ptr_info_alignment_unknown (SSA_NAME_PTR_INFO (name)); -+ { -+ /* [E]VRP can derive context sensitive alignment info and -+ non-nullness properties. We must reset both. */ -+ mark_ptr_info_alignment_unknown (SSA_NAME_PTR_INFO (name)); -+ SSA_NAME_PTR_INFO (name)->pt.null = 1; -+ } - } - else - SSA_NAME_RANGE_INFO (name) = NULL; ---- /dev/null -+++ gcc/testsuite/gcc.c-torture/pr90949.c 2019-06-26 18:53:16.870384679 +0200 -@@ -0,0 +1,42 @@ -+void __attribute__ ((noipa, noinline)) my_puts (const char *str) { } -+ -+void __attribute__ ((noipa, noinline)) my_free (void *p) { } -+ -+ -+struct Node -+{ -+ struct Node *child; -+}; -+ -+struct Node space[2] = { }; -+ -+struct Node * __attribute__ ((noipa, noinline)) my_malloc (int bytes) -+{ -+ return &space[0]; -+} -+ -+void -+walk (struct Node *module, int cleanup) -+{ -+ if (module == 0) -+ { -+ return; -+ } -+ if (!cleanup) -+ { -+ my_puts ("No cleanup"); -+ } -+ walk (module->child, cleanup); -+ if (cleanup) -+ { -+ my_free (module); -+ } -+} -+ -+int -+main () -+{ -+ struct Node *node = my_malloc (sizeof (struct Node)); -+ node->child = 0; -+ walk (node, 1); -+} diff --git a/patches/gettext-tiny-adiele/line-length.patch b/patches/gettext-tiny-adiele/line-length.patch new file mode 100755 index 0000000..0ba9781 --- /dev/null +++ b/patches/gettext-tiny-adiele/line-length.patch @@ -0,0 +1,15 @@ +https://github.com/sabotage-linux/gettext-tiny/issues/50 + +We're losing the battle of the bulge; someone really should make this use malloc. + +--- gettext-tiny-0.3.1_git20191130/src/msgfmt.c.old 2020-01-14 08:03:11.000000000 +0000 ++++ gettext-tiny-0.3.1_git20191130/src/msgfmt.c 2020-01-21 18:58:28.257709860 +0000 +@@ -160,7 +160,7 @@ + + int process(FILE *in, FILE *out, bool strict) { + struct mo_hdr mohdr = def_hdr; +- char line[8192]; char *lp; ++ char line[12288]; char *lp; + size_t off, i; + enum po_error t; + char convbuf[32768]; diff --git a/patches/gettext-tiny-adiele/respect-cflags.patch b/patches/gettext-tiny-adiele/respect-cflags.patch new file mode 100755 index 0000000..dd1cf3f --- /dev/null +++ b/patches/gettext-tiny-adiele/respect-cflags.patch @@ -0,0 +1,11 @@ +--- gettext-tiny-0.2.0/Makefile.old 2017-08-02 06:14:20.000000000 -0500 ++++ gettext-tiny-0.2.0/Makefile 2018-06-16 21:21:57.148735892 -0500 +@@ -32,7 +32,7 @@ + ALL_M4S=$(sort $(wildcard m4/*.m4)) + ALL_DATA=$(sort $(wildcard data/*)) + +-CFLAGS=-O0 -fPIC ++CFLAGS ?= -O0 -fPIC + + AR ?= $(CROSS_COMPILE)ar + RANLIB ?= $(CROSS_COMPILE)ranlib diff --git a/patches/gettext-tiny-adiele/stop-doing-macro-crap.patch b/patches/gettext-tiny-adiele/stop-doing-macro-crap.patch new file mode 100755 index 0000000..277bc7a --- /dev/null +++ b/patches/gettext-tiny-adiele/stop-doing-macro-crap.patch @@ -0,0 +1,20 @@ +--- gettext-tiny-0.2.0/include/libintl.h.old 2017-08-02 06:14:20.000000000 -0500 ++++ gettext-tiny-0.2.0/include/libintl.h 2018-06-15 02:31:14.241446687 -0500 +@@ -34,14 +34,14 @@ + #undef gettext_noop + #define gettext_noop(X) X + +-#ifndef LIBINTL_NO_MACROS ++#ifdef LIBINTL_MACROS + /* if these macros are defined, configure checks will detect libintl as + * built into the libc because test programs will work without -lintl. + * for example: + * checking for ngettext in libc ... yes + * the consequence is that -lintl will not be added to the LDFLAGS. +- * so if for some reason you want that libintl.a gets linked, +- * add -DLIBINTL_NO_MACROS=1 to your CPPFLAGS. */ ++ * so if for some reason you dont want that libintl.a gets linked, ++ * add -DLIBINTL_MACROS=1 to your CPPFLAGS. */ + + #define gettext(X) ((char*) (X)) + #define dgettext(dom, X) ((void)(dom), (char*) (X)) diff --git a/patches/grub-alpine/alpine-mkconfig.patch b/patches/grub-alpine/alpine-mkconfig.patch new file mode 100644 index 0000000..276f8ab --- /dev/null +++ b/patches/grub-alpine/alpine-mkconfig.patch @@ -0,0 +1,70 @@ +diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in +index 4532266..42e0248 100644 +--- a/util/grub.d/10_linux.in ++++ b/util/grub.d/10_linux.in +@@ -21,17 +21,22 @@ prefix="@prefix@" + exec_prefix="@exec_prefix@" + datarootdir="@datarootdir@" + ++if [ -f /etc/update-extlinux.conf ]; then ++ . /etc/update-extlinux.conf ++ GRUB_CMDLINE_LINUX_DEFAULT="modules=${modules} ${default_kernel_opts} ${GRUB_CMDLINE_LINUX_DEFAULT}" ++fi + . "$pkgdatadir/grub-mkconfig_lib" + ++ + export TEXTDOMAIN=@PACKAGE@ + export TEXTDOMAINDIR="@localedir@" + + CLASS="--class gnu-linux --class gnu --class os" + + if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then +- OS=GNU/Linux ++ OS="$( . /etc/os-release; echo "$PRETTY_NAME")" + else +- OS="${GRUB_DISTRIBUTOR} GNU/Linux" ++ OS="${GRUB_DISTRIBUTOR}" + CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}" + fi + +@@ -52,8 +57,6 @@ GRUB_DISABLE_LINUX_PARTUUID=${GRUB_DISABLE_LINUX_PARTUUID-true} + if ( [ "x${GRUB_DEVICE_UUID}" = "x" ] && [ "x${GRUB_DEVICE_PARTUUID}" = "x" ] ) \ + || ( [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \ + && [ "x${GRUB_DISABLE_LINUX_PARTUUID}" = "xtrue" ] ) \ +- || ( ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \ +- && ! test -e "/dev/disk/by-partuuid/${GRUB_DEVICE_PARTUUID}" ) \ + || ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then + LINUX_ROOT_DEVICE=${GRUB_DEVICE} + elif [ "x${GRUB_DEVICE_UUID}" = "x" ] \ +@@ -215,6 +218,7 @@ while [ "x$list" != "x" ] ; do + "initrd-${version}" "initramfs-${version}.img" \ + "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ + "initrd-${alt_version}" "initramfs-${alt_version}.img" \ ++ "initramfs-${version}" \ + "initramfs-genkernel-${version}" \ + "initramfs-genkernel-${alt_version}" \ + "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ +diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in +index 96179ea..6c4c411 100644 +--- a/util/grub.d/20_linux_xen.in ++++ b/util/grub.d/20_linux_xen.in +@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@" + CLASS="--class gnu-linux --class gnu --class os --class xen" + + if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then +- OS=GNU/Linux ++ OS="$( . /etc/os-release; echo "$PRETTY_NAME")" + else +- OS="${GRUB_DISTRIBUTOR} GNU/Linux" ++ OS="${GRUB_DISTRIBUTOR}" + CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}" + fi + +@@ -256,6 +256,7 @@ while [ "x${xen_list}" != "x" ] ; do + "initrd-${version}" "initramfs-${version}.img" \ + "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ + "initrd-${alt_version}" "initramfs-${alt_version}.img" \ ++ "initramfs-${version}" \ + "initramfs-genkernel-${version}" \ + "initramfs-genkernel-${alt_version}" \ + "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ diff --git a/patches/grub-alpine/fix-gcc-no-pie-specs.patch b/patches/grub-alpine/fix-gcc-no-pie-specs.patch new file mode 100644 index 0000000..273c9db --- /dev/null +++ b/patches/grub-alpine/fix-gcc-no-pie-specs.patch @@ -0,0 +1,11 @@ +--- ./configure.ac.orig ++++ ./configure.ac +@@ -1100,7 +1100,7 @@ + if test x"$grub_cv_target_cc_efiemu64_link_format" = xunknown; then + efiemu_excuse="no suitable link format for efiemu64 found" + else +- EFIEMU64_LINK_FORMAT="-Wl,$grub_cv_target_cc_efiemu64_link_format" ++ EFIEMU64_LINK_FORMAT="-Wl,$grub_cv_target_cc_efiemu64_link_format -no-pie" + fi + fi + if test x"$enable_efiemu" = xyes && test x"$efiemu_excuse" != x ; then diff --git a/patches/grub-alpine/lang-C.UTF-8.patch b/patches/grub-alpine/lang-C.UTF-8.patch new file mode 100644 index 0000000..0b74654 --- /dev/null +++ b/patches/grub-alpine/lang-C.UTF-8.patch @@ -0,0 +1,13 @@ +diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in +index 93a9023..130abd4 100644 +--- a/util/grub.d/00_header.in ++++ b/util/grub.d/00_header.in +@@ -191,7 +191,7 @@ EOF + EOF + + # Gettext variables and module +-if [ "x${LANG}" != "xC" ] && [ "x${LANG}" != "x" ]; then ++if [ "x${LANG%.UTF-8}" != "xC" ] && [ "x${LANG}" != "x" ]; then + cat << EOF + set locale_dir=\$prefix/locale + set lang=${grub_lang} diff --git a/patches/inetutils-mlfs/logwtmp.patch b/patches/inetutils-mlfs/logwtmp.patch new file mode 100755 index 0000000..a8a6e41 --- /dev/null +++ b/patches/inetutils-mlfs/logwtmp.patch @@ -0,0 +1,12 @@ +diff -uNr inetutils-1.9.4.orig/libinetutils/logwtmpko.c inetutils-1.9.4/libinetutils/logwtmpko.c +--- inetutils-1.9.4.orig/libinetutils/logwtmpko.c 2015-03-31 15:40:48.000000000 +0000 ++++ inetutils-1.9.4/libinetutils/logwtmpko.c 2020-10-30 23:49:16.601844196 +0000 +@@ -32,7 +32,7 @@ + */ + #if defined HAVE_UPDWTMPX && !defined HAVE_LOGWTMP + void +-logwtmp (char *line, char *name, char *host) ++logwtmp (char const *line, char const *name, const char *host) + { + struct utmpx ut; + struct timeval tv; diff --git a/patches/iproute2-void/fix-musl-devlink.patch b/patches/iproute2-void/fix-musl-devlink.patch deleted file mode 100644 index 8e4a15f..0000000 --- a/patches/iproute2-void/fix-musl-devlink.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- devlink/devlink.c.orig 2020-06-08 08:00:37.855433217 +0200 -+++ devlink/devlink.c 2020-06-08 08:00:47.755432741 +0200 -@@ -26,6 +26,7 @@ - #include - #include - #include -+#include - - #include "SNAPSHOT.h" - #include "list.h" diff --git a/patches/kbd-lfs/kbd-2.3.0-backspace-1.patch b/patches/kbd-lfs/kbd-2.3.0-backspace-1.patch old mode 100644 new mode 100755 diff --git a/patches/kernel/include-uapi-linux-swab-Fix-potentially-missing-__always_inline.patch b/patches/kernel/include-uapi-linux-swab-Fix-potentially-missing-__always_inline.patch new file mode 100644 index 0000000..977e771 --- /dev/null +++ b/patches/kernel/include-uapi-linux-swab-Fix-potentially-missing-__always_inline.patch @@ -0,0 +1,12 @@ +--- linux-5.12.10.orig/include/uapi/linux/swab.h 2021-06-10 11:41:49.000000000 +0000 ++++ linux-5.12.10/include/uapi/linux/swab.h 2021-06-18 19:32:55.629671643 +0000 +@@ -3,7 +3,8 @@ + #define _UAPI_LINUX_SWAB_H + + #include +-#include ++ ++#include + #include + #include + diff --git a/patches/kernel/more-uarches-for-kernel-5.8+.patch b/patches/kernel/more-uarches-for-kernel-5.8+.patch new file mode 100755 index 0000000..c45d13b --- /dev/null +++ b/patches/kernel/more-uarches-for-kernel-5.8+.patch @@ -0,0 +1,682 @@ +From 4af44fbc97bc51eb742f0d6555bde23cf580d4e3 Mon Sep 17 00:00:00 2001 +From: graysky +Date: Sun, 6 Jun 2021 09:41:36 -0400 +Subject: [PATCH] more uarches for kernel 5.8+ +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +FEATURES +This patch adds additional CPU options to the Linux kernel accessible under: + Processor type and features ---> + Processor family ---> + +With the release of gcc 11.1 and clang 12.0, several generic 64-bit levels are +offered which are good for supported Intel or AMD CPUs: +• x86-64-v2 +• x86-64-v3 +• x86-64-v4 + +Users of glibc 2.33 and above can see which level is supported by current +hardware by running: + /lib/ld-linux-x86-64.so.2 --help | grep supported + +Alternatively, compare the flags from /proc/cpuinfo to this list.[1] + +CPU-specific microarchitectures include: +• AMD Improved K8-family +• AMD K10-family +• AMD Family 10h (Barcelona) +• AMD Family 14h (Bobcat) +• AMD Family 16h (Jaguar) +• AMD Family 15h (Bulldozer) +• AMD Family 15h (Piledriver) +• AMD Family 15h (Steamroller) +• AMD Family 15h (Excavator) +• AMD Family 17h (Zen) +• AMD Family 17h (Zen 2) +• AMD Family 19h (Zen 3)† +• Intel Silvermont low-power processors +• Intel Goldmont low-power processors (Apollo Lake and Denverton) +• Intel Goldmont Plus low-power processors (Gemini Lake) +• Intel 1st Gen Core i3/i5/i7 (Nehalem) +• Intel 1.5 Gen Core i3/i5/i7 (Westmere) +• Intel 2nd Gen Core i3/i5/i7 (Sandybridge) +• Intel 3rd Gen Core i3/i5/i7 (Ivybridge) +• Intel 4th Gen Core i3/i5/i7 (Haswell) +• Intel 5th Gen Core i3/i5/i7 (Broadwell) +• Intel 6th Gen Core i3/i5/i7 (Skylake) +• Intel 6th Gen Core i7/i9 (Skylake X) +• Intel 8th Gen Core i3/i5/i7 (Cannon Lake) +• Intel 10th Gen Core i7/i9 (Ice Lake) +• Intel Xeon (Cascade Lake) +• Intel Xeon (Cooper Lake)* +• Intel 3rd Gen 10nm++ i3/i5/i7/i9-family (Tiger Lake)* +• Intel 3rd Gen 10nm++ Xeon (Sapphire Rapids)‡ +• Intel 11th Gen i3/i5/i7/i9-family (Rocket Lake)‡ +• Intel 12th Gen i3/i5/i7/i9-family (Alder Lake)‡ + +Notes: If not otherwise noted, gcc >=9.1 is required for support. + *Requires gcc >=10.1 or clang >=10.0 + †Required gcc >=10.3 or clang >=12.0 + ‡Required gcc >=11.1 or clang >=12.0 + +It also offers to compile passing the 'native' option which, "selects the CPU +to generate code for at compilation time by determining the processor type of +the compiling machine. Using -march=native enables all instruction subsets +supported by the local machine and will produce code optimized for the local +machine under the constraints of the selected instruction set."[2] + +Users of Intel CPUs should select the 'Intel-Native' option and users of AMD +CPUs should select the 'AMD-Native' option. + +MINOR NOTES RELATING TO INTEL ATOM PROCESSORS +This patch also changes -march=atom to -march=bonnell in accordance with the +gcc v4.9 changes. Upstream is using the deprecated -match=atom flags when I +believe it should use the newer -march=bonnell flag for atom processors.[3] + +It is not recommended to compile on Atom-CPUs with the 'native' option.[4] The +recommendation is to use the 'atom' option instead. + +BENEFITS +Small but real speed increases are measurable using a make endpoint comparing +a generic kernel to one built with one of the respective microarchs. + +See the following experimental evidence supporting this statement: +https://github.com/graysky2/kernel_gcc_patch + +REQUIREMENTS +linux version >=5.8 +gcc version >=9.0 or clang version >=9.0 + +ACKNOWLEDGMENTS +This patch builds on the seminal work by Jeroen.[5] + +REFERENCES +1. https://gitlab.com/x86-psABIs/x86-64-ABI/-/commit/77566eb03bc6a326811cb7e9 +2. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-x86-Options +3. https://bugzilla.kernel.org/show_bug.cgi?id=77461 +4. https://github.com/graysky2/kernel_gcc_patch/issues/15 +5. http://www.linuxforge.net/docs/linux/linux-gcc.php + +Signed-off-by: graysky +--- + arch/x86/Kconfig.cpu | 332 ++++++++++++++++++++++++++++++-- + arch/x86/Makefile | 47 ++++- + arch/x86/include/asm/vermagic.h | 66 +++++++ + 3 files changed, 428 insertions(+), 17 deletions(-) + +diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu +index 814fe0d349b0..8acf6519d279 100644 +--- a/arch/x86/Kconfig.cpu ++++ b/arch/x86/Kconfig.cpu +@@ -157,7 +157,7 @@ config MPENTIUM4 + + + config MK6 +- bool "K6/K6-II/K6-III" ++ bool "AMD K6/K6-II/K6-III" + depends on X86_32 + help + Select this for an AMD K6-family processor. Enables use of +@@ -165,7 +165,7 @@ config MK6 + flags to GCC. + + config MK7 +- bool "Athlon/Duron/K7" ++ bool "AMD Athlon/Duron/K7" + depends on X86_32 + help + Select this for an AMD Athlon K7-family processor. Enables use of +@@ -173,12 +173,98 @@ config MK7 + flags to GCC. + + config MK8 +- bool "Opteron/Athlon64/Hammer/K8" ++ bool "AMD Opteron/Athlon64/Hammer/K8" + help + Select this for an AMD Opteron or Athlon64 Hammer-family processor. + Enables use of some extended instructions, and passes appropriate + optimization flags to GCC. + ++config MK8SSE3 ++ bool "AMD Opteron/Athlon64/Hammer/K8 with SSE3" ++ help ++ Select this for improved AMD Opteron or Athlon64 Hammer-family processors. ++ Enables use of some extended instructions, and passes appropriate ++ optimization flags to GCC. ++ ++config MK10 ++ bool "AMD 61xx/7x50/PhenomX3/X4/II/K10" ++ help ++ Select this for an AMD 61xx Eight-Core Magny-Cours, Athlon X2 7x50, ++ Phenom X3/X4/II, Athlon II X2/X3/X4, or Turion II-family processor. ++ Enables use of some extended instructions, and passes appropriate ++ optimization flags to GCC. ++ ++config MBARCELONA ++ bool "AMD Barcelona" ++ help ++ Select this for AMD Family 10h Barcelona processors. ++ ++ Enables -march=barcelona ++ ++config MBOBCAT ++ bool "AMD Bobcat" ++ help ++ Select this for AMD Family 14h Bobcat processors. ++ ++ Enables -march=btver1 ++ ++config MJAGUAR ++ bool "AMD Jaguar" ++ help ++ Select this for AMD Family 16h Jaguar processors. ++ ++ Enables -march=btver2 ++ ++config MBULLDOZER ++ bool "AMD Bulldozer" ++ help ++ Select this for AMD Family 15h Bulldozer processors. ++ ++ Enables -march=bdver1 ++ ++config MPILEDRIVER ++ bool "AMD Piledriver" ++ help ++ Select this for AMD Family 15h Piledriver processors. ++ ++ Enables -march=bdver2 ++ ++config MSTEAMROLLER ++ bool "AMD Steamroller" ++ help ++ Select this for AMD Family 15h Steamroller processors. ++ ++ Enables -march=bdver3 ++ ++config MEXCAVATOR ++ bool "AMD Excavator" ++ help ++ Select this for AMD Family 15h Excavator processors. ++ ++ Enables -march=bdver4 ++ ++config MZEN ++ bool "AMD Zen" ++ help ++ Select this for AMD Family 17h Zen processors. ++ ++ Enables -march=znver1 ++ ++config MZEN2 ++ bool "AMD Zen 2" ++ help ++ Select this for AMD Family 17h Zen 2 processors. ++ ++ Enables -march=znver2 ++ ++config MZEN3 ++ bool "AMD Zen 3" ++ depends on ( CC_IS_GCC && GCC_VERSION >= 100300 ) || ( CC_IS_CLANG && CLANG_VERSION >= 120000 ) ++ help ++ Select this for AMD Family 19h Zen 3 processors. ++ ++ Enables -march=znver3 ++ + config MCRUSOE + bool "Crusoe" + depends on X86_32 +@@ -270,7 +356,7 @@ config MPSC + in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one. + + config MCORE2 +- bool "Core 2/newer Xeon" ++ bool "Intel Core 2" + help + + Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and +@@ -278,6 +364,8 @@ config MCORE2 + family in /proc/cpuinfo. Newer ones have 6 and older ones 15 + (not a typo) + ++ Enables -march=core2 ++ + config MATOM + bool "Intel Atom" + help +@@ -287,6 +375,182 @@ config MATOM + accordingly optimized code. Use a recent GCC with specific Atom + support in order to fully benefit from selecting this option. + ++config MNEHALEM ++ bool "Intel Nehalem" ++ select X86_P6_NOP ++ help ++ ++ Select this for 1st Gen Core processors in the Nehalem family. ++ ++ Enables -march=nehalem ++ ++config MWESTMERE ++ bool "Intel Westmere" ++ select X86_P6_NOP ++ help ++ ++ Select this for the Intel Westmere formerly Nehalem-C family. ++ ++ Enables -march=westmere ++ ++config MSILVERMONT ++ bool "Intel Silvermont" ++ select X86_P6_NOP ++ help ++ ++ Select this for the Intel Silvermont platform. ++ ++ Enables -march=silvermont ++ ++config MGOLDMONT ++ bool "Intel Goldmont" ++ select X86_P6_NOP ++ help ++ ++ Select this for the Intel Goldmont platform including Apollo Lake and Denverton. ++ ++ Enables -march=goldmont ++ ++config MGOLDMONTPLUS ++ bool "Intel Goldmont Plus" ++ select X86_P6_NOP ++ help ++ ++ Select this for the Intel Goldmont Plus platform including Gemini Lake. ++ ++ Enables -march=goldmont-plus ++ ++config MSANDYBRIDGE ++ bool "Intel Sandy Bridge" ++ select X86_P6_NOP ++ help ++ ++ Select this for 2nd Gen Core processors in the Sandy Bridge family. ++ ++ Enables -march=sandybridge ++ ++config MIVYBRIDGE ++ bool "Intel Ivy Bridge" ++ select X86_P6_NOP ++ help ++ ++ Select this for 3rd Gen Core processors in the Ivy Bridge family. ++ ++ Enables -march=ivybridge ++ ++config MHASWELL ++ bool "Intel Haswell" ++ select X86_P6_NOP ++ help ++ ++ Select this for 4th Gen Core processors in the Haswell family. ++ ++ Enables -march=haswell ++ ++config MBROADWELL ++ bool "Intel Broadwell" ++ select X86_P6_NOP ++ help ++ ++ Select this for 5th Gen Core processors in the Broadwell family. ++ ++ Enables -march=broadwell ++ ++config MSKYLAKE ++ bool "Intel Skylake" ++ select X86_P6_NOP ++ help ++ ++ Select this for 6th Gen Core processors in the Skylake family. ++ ++ Enables -march=skylake ++ ++config MSKYLAKEX ++ bool "Intel Skylake X" ++ select X86_P6_NOP ++ help ++ ++ Select this for 6th Gen Core processors in the Skylake X family. ++ ++ Enables -march=skylake-avx512 ++ ++config MCANNONLAKE ++ bool "Intel Cannon Lake" ++ select X86_P6_NOP ++ help ++ ++ Select this for 8th Gen Core processors ++ ++ Enables -march=cannonlake ++ ++config MICELAKE ++ bool "Intel Ice Lake" ++ select X86_P6_NOP ++ help ++ ++ Select this for 10th Gen Core processors in the Ice Lake family. ++ ++ Enables -march=icelake-client ++ ++config MCASCADELAKE ++ bool "Intel Cascade Lake" ++ select X86_P6_NOP ++ help ++ ++ Select this for Xeon processors in the Cascade Lake family. ++ ++ Enables -march=cascadelake ++ ++config MCOOPERLAKE ++ bool "Intel Cooper Lake" ++ depends on ( CC_IS_GCC && GCC_VERSION > 100100 ) || ( CC_IS_CLANG && CLANG_VERSION >= 100000 ) ++ select X86_P6_NOP ++ help ++ ++ Select this for Xeon processors in the Cooper Lake family. ++ ++ Enables -march=cooperlake ++ ++config MTIGERLAKE ++ bool "Intel Tiger Lake" ++ depends on ( CC_IS_GCC && GCC_VERSION > 100100 ) || ( CC_IS_CLANG && CLANG_VERSION >= 100000 ) ++ select X86_P6_NOP ++ help ++ ++ Select this for third-generation 10 nm process processors in the Tiger Lake family. ++ ++ Enables -march=tigerlake ++ ++config MSAPPHIRERAPIDS ++ bool "Intel Sapphire Rapids" ++ depends on ( CC_IS_GCC && GCC_VERSION > 110000 ) || ( CC_IS_CLANG && CLANG_VERSION >= 120000 ) ++ select X86_P6_NOP ++ help ++ ++ Select this for third-generation 10 nm process processors in the Sapphire Rapids family. ++ ++ Enables -march=sapphirerapids ++ ++config MROCKETLAKE ++ bool "Intel Rocket Lake" ++ depends on ( CC_IS_GCC && GCC_VERSION > 110000 ) || ( CC_IS_CLANG && CLANG_VERSION >= 120000 ) ++ select X86_P6_NOP ++ help ++ ++ Select this for eleventh-generation processors in the Rocket Lake family. ++ ++ Enables -march=rocketlake ++ ++config MALDERLAKE ++ bool "Intel Alder Lake" ++ depends on ( CC_IS_GCC && GCC_VERSION > 110000 ) || ( CC_IS_CLANG && CLANG_VERSION >= 120000 ) ++ select X86_P6_NOP ++ help ++ ++ Select this for twelfth-generation processors in the Alder Lake family. ++ ++ Enables -march=alderlake ++ + config GENERIC_CPU + bool "Generic-x86-64" + depends on X86_64 +@@ -294,6 +558,50 @@ config GENERIC_CPU + Generic x86-64 CPU. + Run equally well on all x86-64 CPUs. + ++config GENERIC_CPU2 ++ bool "Generic-x86-64-v2" ++ depends on ( CC_IS_GCC && GCC_VERSION > 110000 ) || ( CC_IS_CLANG && LANG_VERSION >= 120000 ) ++ depends on X86_64 ++ help ++ Generic x86-64 CPU. ++ Run equally well on all x86-64 CPUs with min support of x86-64-v2. ++ ++config GENERIC_CPU3 ++ bool "Generic-x86-64-v3" ++ depends on ( CC_IS_GCC && GCC_VERSION > 110000 ) || ( CC_IS_CLANG && LANG_VERSION >= 120000 ) ++ depends on X86_64 ++ help ++ Generic x86-64-v3 CPU with v3 instructions. ++ Run equally well on all x86-64 CPUs with min support of x86-64-v3. ++ ++config GENERIC_CPU4 ++ bool "Generic-x86-64-v4" ++ depends on ( CC_IS_GCC && GCC_VERSION > 110000 ) || ( CC_IS_CLANG && LANG_VERSION >= 120000 ) ++ depends on X86_64 ++ help ++ Generic x86-64 CPU with v4 instructions. ++ Run equally well on all x86-64 CPUs with min support of x86-64-v4. ++ ++config MNATIVE_INTEL ++ bool "Intel-Native optimizations autodetected by the compiler" ++ help ++ ++ Clang 3.8, GCC 4.2 and above support -march=native, which automatically detects ++ the optimum settings to use based on your processor. Do NOT use this ++ for AMD CPUs. Intel Only! ++ ++ Enables -march=native ++ ++config MNATIVE_AMD ++ bool "AMD-Native optimizations autodetected by the compiler" ++ help ++ ++ Clang 3.8, GCC 4.2 and above support -march=native, which automatically detects ++ the optimum settings to use based on your processor. Do NOT use this ++ for Intel CPUs. AMD Only! ++ ++ Enables -march=native ++ + endchoice + + config X86_GENERIC +@@ -318,7 +626,7 @@ config X86_INTERNODE_CACHE_SHIFT + config X86_L1_CACHE_SHIFT + int + default "7" if MPENTIUM4 || MPSC +- default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU ++ default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MZEN3 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL || MNATIVE_AMD || X86_GENERIC || GENERIC_CPU || GENERIC_CPU2 || GENERIC_CPU3 || GENERIC_CPU4 + default "4" if MELAN || M486SX || M486 || MGEODEGX1 + default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX + +@@ -336,11 +644,11 @@ config X86_ALIGNMENT_16 + + config X86_INTEL_USERCOPY + def_bool y +- depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2 ++ depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL + + config X86_USE_PPRO_CHECKSUM + def_bool y +- depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM ++ depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MZEN3 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL || MNATIVE_AMD + + config X86_USE_3DNOW + def_bool y +@@ -360,26 +668,26 @@ config X86_USE_3DNOW + config X86_P6_NOP + def_bool y + depends on X86_64 +- depends on (MCORE2 || MPENTIUM4 || MPSC) ++ depends on (MCORE2 || MPENTIUM4 || MPSC || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL) + + config X86_TSC + def_bool y +- depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM) || X86_64 ++ depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MZEN3 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL || MNATIVE_AMD) || X86_64 + + config X86_CMPXCHG64 + def_bool y +- depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8 ++ depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MZEN3 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL || MNATIVE_AMD + + # this should be set for all -march=.. options where the compiler + # generates cmov. + config X86_CMOV + def_bool y +- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX) ++ depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MZEN3 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL || MNATIVE_AMD) + + config X86_MINIMUM_CPU_FAMILY + int + default "64" if X86_64 +- default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8) ++ default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MZEN3 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL || MNATIVE_AMD) + default "5" if X86_32 && X86_CMPXCHG64 + default "4" + +diff --git a/arch/x86/Makefile b/arch/x86/Makefile +index 78faf9c7e3ae..ee0cd507af8b 100644 +--- a/arch/x86/Makefile ++++ b/arch/x86/Makefile +@@ -114,11 +114,48 @@ else + # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) + cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) + cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) +- +- cflags-$(CONFIG_MCORE2) += \ +- $(call cc-option,-march=core2,$(call cc-option,-mtune=generic)) +- cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \ +- $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic)) ++ cflags-$(CONFIG_MK8SSE3) += $(call cc-option,-march=k8-sse3) ++ cflags-$(CONFIG_MK10) += $(call cc-option,-march=amdfam10) ++ cflags-$(CONFIG_MBARCELONA) += $(call cc-option,-march=barcelona) ++ cflags-$(CONFIG_MBOBCAT) += $(call cc-option,-march=btver1) ++ cflags-$(CONFIG_MJAGUAR) += $(call cc-option,-march=btver2) ++ cflags-$(CONFIG_MBULLDOZER) += $(call cc-option,-march=bdver1) ++ cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-march=bdver2) ++ cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-mno-tbm) ++ cflags-$(CONFIG_MSTEAMROLLER) += $(call cc-option,-march=bdver3) ++ cflags-$(CONFIG_MSTEAMROLLER) += $(call cc-option,-mno-tbm) ++ cflags-$(CONFIG_MEXCAVATOR) += $(call cc-option,-march=bdver4) ++ cflags-$(CONFIG_MEXCAVATOR) += $(call cc-option,-mno-tbm) ++ cflags-$(CONFIG_MZEN) += $(call cc-option,-march=znver1) ++ cflags-$(CONFIG_MZEN2) += $(call cc-option,-march=znver2) ++ cflags-$(CONFIG_MZEN3) += $(call cc-option,-march=znver3) ++ ++ cflags-$(CONFIG_MNATIVE_INTEL) += $(call cc-option,-march=native) ++ cflags-$(CONFIG_MNATIVE_AMD) += $(call cc-option,-march=native) ++ cflags-$(CONFIG_MATOM) += $(call cc-option,-march=bonnell) ++ cflags-$(CONFIG_MCORE2) += $(call cc-option,-march=core2) ++ cflags-$(CONFIG_MNEHALEM) += $(call cc-option,-march=nehalem) ++ cflags-$(CONFIG_MWESTMERE) += $(call cc-option,-march=westmere) ++ cflags-$(CONFIG_MSILVERMONT) += $(call cc-option,-march=silvermont) ++ cflags-$(CONFIG_MGOLDMONT) += $(call cc-option,-march=goldmont) ++ cflags-$(CONFIG_MGOLDMONTPLUS) += $(call cc-option,-march=goldmont-plus) ++ cflags-$(CONFIG_MSANDYBRIDGE) += $(call cc-option,-march=sandybridge) ++ cflags-$(CONFIG_MIVYBRIDGE) += $(call cc-option,-march=ivybridge) ++ cflags-$(CONFIG_MHASWELL) += $(call cc-option,-march=haswell) ++ cflags-$(CONFIG_MBROADWELL) += $(call cc-option,-march=broadwell) ++ cflags-$(CONFIG_MSKYLAKE) += $(call cc-option,-march=skylake) ++ cflags-$(CONFIG_MSKYLAKEX) += $(call cc-option,-march=skylake-avx512) ++ cflags-$(CONFIG_MCANNONLAKE) += $(call cc-option,-march=cannonlake) ++ cflags-$(CONFIG_MICELAKE) += $(call cc-option,-march=icelake-client) ++ cflags-$(CONFIG_MCASCADELAKE) += $(call cc-option,-march=cascadelake) ++ cflags-$(CONFIG_MCOOPERLAKE) += $(call cc-option,-march=cooperlake) ++ cflags-$(CONFIG_MTIGERLAKE) += $(call cc-option,-march=tigerlake) ++ cflags-$(CONFIG_MSAPPHIRERAPIDS) += $(call cc-option,-march=sapphirerapids) ++ cflags-$(CONFIG_MROCKETLAKE) += $(call cc-option,-march=rocketlake) ++ cflags-$(CONFIG_MALDERLAKE) += $(call cc-option,-march=alderlake) ++ cflags-$(CONFIG_GENERIC_CPU2) += $(call cc-option,-march=x86-64-v2) ++ cflags-$(CONFIG_GENERIC_CPU3) += $(call cc-option,-march=x86-64-v3) ++ cflags-$(CONFIG_GENERIC_CPU4) += $(call cc-option,-march=x86-64-v4) + cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) + KBUILD_CFLAGS += $(cflags-y) + +diff --git a/arch/x86/include/asm/vermagic.h b/arch/x86/include/asm/vermagic.h +index 75884d2cdec3..4e6a08d4c7e5 100644 +--- a/arch/x86/include/asm/vermagic.h ++++ b/arch/x86/include/asm/vermagic.h +@@ -17,6 +17,48 @@ + #define MODULE_PROC_FAMILY "586MMX " + #elif defined CONFIG_MCORE2 + #define MODULE_PROC_FAMILY "CORE2 " ++#elif defined CONFIG_MNATIVE_INTEL ++#define MODULE_PROC_FAMILY "NATIVE_INTEL " ++#elif defined CONFIG_MNATIVE_AMD ++#define MODULE_PROC_FAMILY "NATIVE_AMD " ++#elif defined CONFIG_MNEHALEM ++#define MODULE_PROC_FAMILY "NEHALEM " ++#elif defined CONFIG_MWESTMERE ++#define MODULE_PROC_FAMILY "WESTMERE " ++#elif defined CONFIG_MSILVERMONT ++#define MODULE_PROC_FAMILY "SILVERMONT " ++#elif defined CONFIG_MGOLDMONT ++#define MODULE_PROC_FAMILY "GOLDMONT " ++#elif defined CONFIG_MGOLDMONTPLUS ++#define MODULE_PROC_FAMILY "GOLDMONTPLUS " ++#elif defined CONFIG_MSANDYBRIDGE ++#define MODULE_PROC_FAMILY "SANDYBRIDGE " ++#elif defined CONFIG_MIVYBRIDGE ++#define MODULE_PROC_FAMILY "IVYBRIDGE " ++#elif defined CONFIG_MHASWELL ++#define MODULE_PROC_FAMILY "HASWELL " ++#elif defined CONFIG_MBROADWELL ++#define MODULE_PROC_FAMILY "BROADWELL " ++#elif defined CONFIG_MSKYLAKE ++#define MODULE_PROC_FAMILY "SKYLAKE " ++#elif defined CONFIG_MSKYLAKEX ++#define MODULE_PROC_FAMILY "SKYLAKEX " ++#elif defined CONFIG_MCANNONLAKE ++#define MODULE_PROC_FAMILY "CANNONLAKE " ++#elif defined CONFIG_MICELAKE ++#define MODULE_PROC_FAMILY "ICELAKE " ++#elif defined CONFIG_MCASCADELAKE ++#define MODULE_PROC_FAMILY "CASCADELAKE " ++#elif defined CONFIG_MCOOPERLAKE ++#define MODULE_PROC_FAMILY "COOPERLAKE " ++#elif defined CONFIG_MTIGERLAKE ++#define MODULE_PROC_FAMILY "TIGERLAKE " ++#elif defined CONFIG_MSAPPHIRERAPIDS ++#define MODULE_PROC_FAMILY "SAPPHIRERAPIDS " ++#elif defined CONFIG_ROCKETLAKE ++#define MODULE_PROC_FAMILY "ROCKETLAKE " ++#elif defined CONFIG_MALDERLAKE ++#define MODULE_PROC_FAMILY "ALDERLAKE " + #elif defined CONFIG_MATOM + #define MODULE_PROC_FAMILY "ATOM " + #elif defined CONFIG_M686 +@@ -35,6 +77,30 @@ + #define MODULE_PROC_FAMILY "K7 " + #elif defined CONFIG_MK8 + #define MODULE_PROC_FAMILY "K8 " ++#elif defined CONFIG_MK8SSE3 ++#define MODULE_PROC_FAMILY "K8SSE3 " ++#elif defined CONFIG_MK10 ++#define MODULE_PROC_FAMILY "K10 " ++#elif defined CONFIG_MBARCELONA ++#define MODULE_PROC_FAMILY "BARCELONA " ++#elif defined CONFIG_MBOBCAT ++#define MODULE_PROC_FAMILY "BOBCAT " ++#elif defined CONFIG_MBULLDOZER ++#define MODULE_PROC_FAMILY "BULLDOZER " ++#elif defined CONFIG_MPILEDRIVER ++#define MODULE_PROC_FAMILY "PILEDRIVER " ++#elif defined CONFIG_MSTEAMROLLER ++#define MODULE_PROC_FAMILY "STEAMROLLER " ++#elif defined CONFIG_MJAGUAR ++#define MODULE_PROC_FAMILY "JAGUAR " ++#elif defined CONFIG_MEXCAVATOR ++#define MODULE_PROC_FAMILY "EXCAVATOR " ++#elif defined CONFIG_MZEN ++#define MODULE_PROC_FAMILY "ZEN " ++#elif defined CONFIG_MZEN2 ++#define MODULE_PROC_FAMILY "ZEN2 " ++#elif defined CONFIG_MZEN3 ++#define MODULE_PROC_FAMILY "ZEN3 " + #elif defined CONFIG_MELAN + #define MODULE_PROC_FAMILY "ELAN " + #elif defined CONFIG_MCRUSOE +-- +2.31.1 + diff --git a/patches/libffi-void/libffi-race-condition.patch b/patches/libffi-void/libffi-race-condition.patch old mode 100644 new mode 100755 diff --git a/patches/libffi-void/no-toolexeclibdir.patch b/patches/libffi-void/no-toolexeclibdir.patch old mode 100644 new mode 100755 diff --git a/patches/libressl-2.9.2/fix-getprogname.patch b/patches/libressl-2.9.2/fix-getprogname.patch deleted file mode 100644 index 7e80e1e..0000000 --- a/patches/libressl-2.9.2/fix-getprogname.patch +++ /dev/null @@ -1,50 +0,0 @@ -From a747aacc23607c993cc481378782b2c7dd5bc53b Mon Sep 17 00:00:00 2001 -From: Ishimoto Shinobu <47295761+protonesso@users.noreply.github.com> -Date: Tue, 21 May 2019 22:41:05 +0900 -Subject: [PATCH 1/2] avoid glibc - -cause problems on musl systems - -Patch-Source: https://github.com/libressl-portable/portable/issues/528 ---- - crypto/compat/getprogname_linux.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/crypto/compat/getprogname_linux.c b/crypto/compat/getprogname_linux.c -index 2c8974326..4e7e31f41 100644 ---- a/crypto/compat/getprogname_linux.c -+++ b/crypto/compat/getprogname_linux.c -@@ -26,9 +26,7 @@ getprogname(void) - #if defined(__ANDROID_API__) && __ANDROID_API__ < 21 - extern const char *__progname; - return __progname; --#elif defined(__GLIBC__) -- return program_invocation_short_name; - #else --#error "Cannot emulate getprogname" -+ return program_invocation_short_name; - #endif - } - -From 65159f37d0b5cc4c191edf6fbfd14ce57ecc58b7 Mon Sep 17 00:00:00 2001 -From: Ishimoto Shinobu <47295761+protonesso@users.noreply.github.com> -Date: Wed, 22 May 2019 10:47:47 +0300 -Subject: [PATCH 2/2] Remove info about glibc - ---- - crypto/compat/getprogname_linux.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/crypto/compat/getprogname_linux.c b/crypto/compat/getprogname_linux.c -index 4e7e31f41..6550eb863 100644 ---- a/crypto/compat/getprogname_linux.c -+++ b/crypto/compat/getprogname_linux.c -@@ -12,8 +12,6 @@ getprogname(void) - * Since Android is using portions of OpenBSD libc, it should have - * a symbol called __progname [1]. - * -- * Regarding program_invocation_short_name, it is a GNU libc ext [2] and -- * so make it conditional to __GLIBC__ [3]. - * - * .. [0] https://github.com/aosp-mirror/platform_bionic/blob/1eb6d3/libc/include/stdlib.h#L160 - * diff --git a/patches/libressl-2.9.2/s_client-add-options-verify_.patch b/patches/libressl-2.9.2/s_client-add-options-verify_.patch deleted file mode 100644 index 24048ce..0000000 --- a/patches/libressl-2.9.2/s_client-add-options-verify_.patch +++ /dev/null @@ -1,71 +0,0 @@ -From: Jakub Jirutka -Date: Sun, 27 May 2018 22:08:00 +0200 -Subject: [PATCH] s_client: Add options -verify_{hostname,email,ip} - -This code is ported from OpenSSL 1.0.2o. We need it for Busybox wget. - ---- a/apps/openssl/apps.c -+++ b/apps/openssl/apps.c -@@ -1845,6 +1845,9 @@ - char **oldargs = *pargs; - char *arg = **pargs, *argn = (*pargs)[1]; - time_t at_time = 0; -+ char *hostname = NULL; -+ char *email = NULL; -+ char *ipasc = NULL; - const char *errstr = NULL; - - if (!strcmp(arg, "-policy")) { -@@ -1905,6 +1908,21 @@ - at_time = (time_t) timestamp; - } - (*pargs)++; -+ } else if (strcmp(arg, "-verify_hostname") == 0) { -+ if (!argn) -+ *badarg = 1; -+ hostname = argn; -+ (*pargs)++; -+ } else if (strcmp(arg, "-verify_email") == 0) { -+ if (!argn) -+ *badarg = 1; -+ email = argn; -+ (*pargs)++; -+ } else if (strcmp(arg, "-verify_ip") == 0) { -+ if (!argn) -+ *badarg = 1; -+ ipasc = argn; -+ (*pargs)++; - } else if (!strcmp(arg, "-ignore_critical")) - flags |= X509_V_FLAG_IGNORE_CRITICAL; - else if (!strcmp(arg, "-issuer_checks")) -@@ -1958,6 +1976,15 @@ - - if (at_time) - X509_VERIFY_PARAM_set_time(*pm, at_time); -+ -+ if (hostname && !X509_VERIFY_PARAM_set1_host(*pm, hostname, 0)) -+ *badarg = 1; -+ -+ if (email && !X509_VERIFY_PARAM_set1_email(*pm, email, 0)) -+ *badarg = 1; -+ -+ if (ipasc && !X509_VERIFY_PARAM_set1_ip_asc(*pm, ipasc)) -+ *badarg = 1; - - end: - (*pargs)++; ---- a/apps/openssl/s_client.c -+++ b/apps/openssl/s_client.c -@@ -200,8 +200,12 @@ - BIO_printf(bio_err, " -port port - use -connect instead\n"); - BIO_printf(bio_err, " -connect host:port - who to connect to (default is %s:%s)\n", SSL_HOST_NAME, PORT_STR); - BIO_printf(bio_err, " -proxy host:port - connect to http proxy\n"); -+ BIO_printf(bio_err, " -verify_hostname host - check peer certificate matches \"host\"\n"); -+ BIO_printf(bio_err, " -verify_email email - check peer certificate matches \"email\"\n"); -+ BIO_printf(bio_err, " -verify_ip ipaddr - check peer certificate matches \"ipaddr\"\n"); - - BIO_printf(bio_err, " -verify arg - turn on peer certificate verification\n"); -+ BIO_printf(bio_err, " -verify_return_error - return verification errors\n"); - BIO_printf(bio_err, " -cert arg - certificate file to use, PEM format assumed\n"); - BIO_printf(bio_err, " -certform arg - certificate format (PEM or DER) PEM default\n"); - BIO_printf(bio_err, " -key arg - Private key file to use, in cert file if\n"); diff --git a/patches/libressl-2.9.2/ssl-libcompat.patch b/patches/libressl-2.9.2/ssl-libcompat.patch deleted file mode 100644 index c28c33a..0000000 --- a/patches/libressl-2.9.2/ssl-libcompat.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ssl/Makefile.am b/ssl/Makefile.am -index 99d138a..9d8f1f4 100644 ---- a/ssl/Makefile.am -+++ b/ssl/Makefile.am -@@ -7,7 +7,7 @@ EXTRA_DIST += CMakeLists.txt - EXTRA_DIST += ssl.sym - - libssl_la_LDFLAGS = -version-info @LIBSSL_VERSION@ -no-undefined -export-symbols $(top_srcdir)/ssl/ssl.sym --libssl_la_LIBADD = $(abs_top_builddir)/crypto/libcrypto.la -+libssl_la_LIBADD = $(abs_top_builddir)/crypto/libcrypto.la $(abs_top_builddir)/crypto/libcompat.la - - libssl_la_SOURCES = bio_ssl.c - libssl_la_SOURCES += bs_ber.c diff --git a/patches/libressl-2.9.2/starttls-ldap.patch b/patches/libressl-2.9.2/starttls-ldap.patch deleted file mode 100644 index 3ee44d8..0000000 --- a/patches/libressl-2.9.2/starttls-ldap.patch +++ /dev/null @@ -1,207 +0,0 @@ ---- a/apps/openssl/s_client.c -+++ b/apps/openssl/s_client.c -@@ -56,7 +56,7 @@ - * [including the GNU Public Licence.] - */ - /* ==================================================================== -- * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. -+ * Copyright (c) 1998-2017 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions -@@ -184,6 +184,7 @@ - static void sc_usage(void); - static void print_stuff(BIO * berr, SSL * con, int full); - static int ocsp_resp_cb(SSL * s, void *arg); -+static int ldap_ExtendedResponse_parse(const char *buf, long rem); - static BIO *bio_c_out = NULL; - static int c_quiet = 0; - static int c_ign_eof = 0; -@@ -234,7 +235,7 @@ - BIO_printf(bio_err, " -starttls prot - use the STARTTLS command before starting TLS\n"); - BIO_printf(bio_err, " for those protocols that support it, where\n"); - BIO_printf(bio_err, " 'prot' defines which one to assume. Currently,\n"); -- BIO_printf(bio_err, " only \"smtp\", \"lmtp\", \"pop3\", \"imap\", \"ftp\" and \"xmpp\"\n"); -+ BIO_printf(bio_err, " only \"smtp\", \"lmtp\", \"pop3\", \"imap\", \"ftp\", \"xmpp\" and \"ldap\"\n"); - BIO_printf(bio_err, " are supported.\n"); - BIO_printf(bio_err, " -xmpphost host - connect to this virtual host on the xmpp server\n"); - BIO_printf(bio_err, " -sess_out arg - file to write SSL session to\n"); -@@ -284,7 +285,8 @@ - PROTO_POP3, - PROTO_IMAP, - PROTO_FTP, -- PROTO_XMPP -+ PROTO_XMPP, -+ PROTO_LDAP - }; - - int -@@ -543,6 +545,8 @@ - starttls_proto = PROTO_FTP; - else if (strcmp(*argv, "xmpp") == 0) - starttls_proto = PROTO_XMPP; -+ else if (strcmp(*argv, "ldap") == 0) -+ starttls_proto = PROTO_LDAP; - else - goto bad; - } -@@ -934,6 +938,72 @@ - if (!strstr(sbuf, "value.sequence->data, -+ atyp->value.sequence->length); -+ (void)BIO_flush(sbio); -+ ASN1_TYPE_free(atyp); -+ -+ mbuf_len = BIO_read(sbio, mbuf, BUFSIZZ); -+ if (mbuf_len < 0) { -+ BIO_printf(bio_err, "BIO_read failed\n"); -+ goto end; -+ } -+ result = ldap_ExtendedResponse_parse(mbuf, mbuf_len); -+ if (result < 0) { -+ BIO_printf(bio_err, "ldap_ExtendedResponse_parse failed\n"); -+ goto shut; -+ } else if (result > 0) { -+ BIO_printf(bio_err, "STARTTLS failed, LDAP Result Code: %i\n", -+ result); -+ goto shut; -+ } -+ mbuf_len = 0; - } else if (proxy != NULL) { - BIO_printf(sbio, "CONNECT %s HTTP/1.0\r\n\r\n", connect); - mbuf_len = BIO_read(sbio, mbuf, BUFSIZZ); -@@ -1437,3 +1507,86 @@ - return 1; - } - -+static int ldap_ExtendedResponse_parse(const char *buf, long rem) -+{ -+ const unsigned char *cur, *end; -+ long len; -+ int tag, xclass, inf, ret = -1; -+ -+ cur = (const unsigned char *)buf; -+ end = cur + rem; -+ -+ /* -+ * From RFC 4511: -+ * -+ * LDAPMessage ::= SEQUENCE { -+ * messageID MessageID, -+ * protocolOp CHOICE { -+ * ... -+ * extendedResp ExtendedResponse, -+ * ... }, -+ * controls [0] Controls OPTIONAL } -+ * -+ * ExtendedResponse ::= [APPLICATION 24] SEQUENCE { -+ * COMPONENTS OF LDAPResult, -+ * responseName [10] LDAPOID OPTIONAL, -+ * responseValue [11] OCTET STRING OPTIONAL } -+ * -+ * LDAPResult ::= SEQUENCE { -+ * resultCode ENUMERATED { -+ * success (0), -+ * ... -+ * other (80), -+ * ... }, -+ * matchedDN LDAPDN, -+ * diagnosticMessage LDAPString, -+ * referral [3] Referral OPTIONAL } -+ */ -+ -+ /* pull SEQUENCE */ -+ inf = ASN1_get_object(&cur, &len, &tag, &xclass, rem); -+ if (inf != V_ASN1_CONSTRUCTED || tag != V_ASN1_SEQUENCE || -+ (rem = end - cur, len > rem)) { -+ BIO_printf(bio_err, "Unexpected LDAP response\n"); -+ goto end; -+ } -+ -+ rem = len; /* ensure that we don't overstep the SEQUENCE */ -+ -+ /* pull MessageID */ -+ inf = ASN1_get_object(&cur, &len, &tag, &xclass, rem); -+ if (inf != V_ASN1_UNIVERSAL || tag != V_ASN1_INTEGER || -+ (rem = end - cur, len > rem)) { -+ BIO_printf(bio_err, "No MessageID\n"); -+ goto end; -+ } -+ -+ cur += len; /* shall we check for MessageId match or just skip? */ -+ -+ /* pull [APPLICATION 24] */ -+ rem = end - cur; -+ inf = ASN1_get_object(&cur, &len, &tag, &xclass, rem); -+ if (inf != V_ASN1_CONSTRUCTED || xclass != V_ASN1_APPLICATION || -+ tag != 24) { -+ BIO_printf(bio_err, "Not ExtendedResponse\n"); -+ goto end; -+ } -+ -+ /* pull resultCode */ -+ rem = end - cur; -+ inf = ASN1_get_object(&cur, &len, &tag, &xclass, rem); -+ if (inf != V_ASN1_UNIVERSAL || tag != V_ASN1_ENUMERATED || len == 0 || -+ (rem = end - cur, len > rem)) { -+ BIO_printf(bio_err, "Not LDAPResult\n"); -+ goto end; -+ } -+ -+ /* len should always be one, but just in case... */ -+ for (ret = 0, inf = 0; inf < len; inf++) { -+ ret <<= 8; -+ ret |= cur[inf]; -+ } -+ /* There is more data, but we don't care... */ -+ end: -+ return ret; -+} diff --git a/patches/libressl-alpine/s_client-add-options-verify_.patch b/patches/libressl-alpine/s_client-add-options-verify_.patch deleted file mode 100644 index 24048ce..0000000 --- a/patches/libressl-alpine/s_client-add-options-verify_.patch +++ /dev/null @@ -1,71 +0,0 @@ -From: Jakub Jirutka -Date: Sun, 27 May 2018 22:08:00 +0200 -Subject: [PATCH] s_client: Add options -verify_{hostname,email,ip} - -This code is ported from OpenSSL 1.0.2o. We need it for Busybox wget. - ---- a/apps/openssl/apps.c -+++ b/apps/openssl/apps.c -@@ -1845,6 +1845,9 @@ - char **oldargs = *pargs; - char *arg = **pargs, *argn = (*pargs)[1]; - time_t at_time = 0; -+ char *hostname = NULL; -+ char *email = NULL; -+ char *ipasc = NULL; - const char *errstr = NULL; - - if (!strcmp(arg, "-policy")) { -@@ -1905,6 +1908,21 @@ - at_time = (time_t) timestamp; - } - (*pargs)++; -+ } else if (strcmp(arg, "-verify_hostname") == 0) { -+ if (!argn) -+ *badarg = 1; -+ hostname = argn; -+ (*pargs)++; -+ } else if (strcmp(arg, "-verify_email") == 0) { -+ if (!argn) -+ *badarg = 1; -+ email = argn; -+ (*pargs)++; -+ } else if (strcmp(arg, "-verify_ip") == 0) { -+ if (!argn) -+ *badarg = 1; -+ ipasc = argn; -+ (*pargs)++; - } else if (!strcmp(arg, "-ignore_critical")) - flags |= X509_V_FLAG_IGNORE_CRITICAL; - else if (!strcmp(arg, "-issuer_checks")) -@@ -1958,6 +1976,15 @@ - - if (at_time) - X509_VERIFY_PARAM_set_time(*pm, at_time); -+ -+ if (hostname && !X509_VERIFY_PARAM_set1_host(*pm, hostname, 0)) -+ *badarg = 1; -+ -+ if (email && !X509_VERIFY_PARAM_set1_email(*pm, email, 0)) -+ *badarg = 1; -+ -+ if (ipasc && !X509_VERIFY_PARAM_set1_ip_asc(*pm, ipasc)) -+ *badarg = 1; - - end: - (*pargs)++; ---- a/apps/openssl/s_client.c -+++ b/apps/openssl/s_client.c -@@ -200,8 +200,12 @@ - BIO_printf(bio_err, " -port port - use -connect instead\n"); - BIO_printf(bio_err, " -connect host:port - who to connect to (default is %s:%s)\n", SSL_HOST_NAME, PORT_STR); - BIO_printf(bio_err, " -proxy host:port - connect to http proxy\n"); -+ BIO_printf(bio_err, " -verify_hostname host - check peer certificate matches \"host\"\n"); -+ BIO_printf(bio_err, " -verify_email email - check peer certificate matches \"email\"\n"); -+ BIO_printf(bio_err, " -verify_ip ipaddr - check peer certificate matches \"ipaddr\"\n"); - - BIO_printf(bio_err, " -verify arg - turn on peer certificate verification\n"); -+ BIO_printf(bio_err, " -verify_return_error - return verification errors\n"); - BIO_printf(bio_err, " -cert arg - certificate file to use, PEM format assumed\n"); - BIO_printf(bio_err, " -certform arg - certificate format (PEM or DER) PEM default\n"); - BIO_printf(bio_err, " -key arg - Private key file to use, in cert file if\n"); diff --git a/patches/libressl-alpine/ssl-libcompat.patch b/patches/libressl-alpine/ssl-libcompat.patch deleted file mode 100644 index 4af15c3..0000000 --- a/patches/libressl-alpine/ssl-libcompat.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ssl/Makefile.am b/ssl/Makefile.am -index 99d138a..9d8f1f4 100644 ---- a/ssl/Makefile.am -+++ b/ssl/Makefile.am -@@ -7,7 +7,7 @@ - EXTRA_DIST += ssl.sym - - libssl_la_LDFLAGS = -version-info @LIBSSL_VERSION@ -no-undefined -export-symbols $(top_srcdir)/ssl/ssl.sym --libssl_la_LIBADD = $(abs_top_builddir)/crypto/libcrypto.la $(PLATFORM_LDADD) -+libssl_la_LIBADD = $(abs_top_builddir)/crypto/libcrypto.la $(abs_top_builddir)/crypto/libcompat.la $(PLATFORM_LDADD) - - libssl_la_SOURCES = bio_ssl.c - libssl_la_SOURCES += bs_ber.c diff --git a/patches/libressl-alpine/starttls-ldap.patch b/patches/libressl-alpine/starttls-ldap.patch deleted file mode 100644 index 3ee44d8..0000000 --- a/patches/libressl-alpine/starttls-ldap.patch +++ /dev/null @@ -1,207 +0,0 @@ ---- a/apps/openssl/s_client.c -+++ b/apps/openssl/s_client.c -@@ -56,7 +56,7 @@ - * [including the GNU Public Licence.] - */ - /* ==================================================================== -- * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. -+ * Copyright (c) 1998-2017 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions -@@ -184,6 +184,7 @@ - static void sc_usage(void); - static void print_stuff(BIO * berr, SSL * con, int full); - static int ocsp_resp_cb(SSL * s, void *arg); -+static int ldap_ExtendedResponse_parse(const char *buf, long rem); - static BIO *bio_c_out = NULL; - static int c_quiet = 0; - static int c_ign_eof = 0; -@@ -234,7 +235,7 @@ - BIO_printf(bio_err, " -starttls prot - use the STARTTLS command before starting TLS\n"); - BIO_printf(bio_err, " for those protocols that support it, where\n"); - BIO_printf(bio_err, " 'prot' defines which one to assume. Currently,\n"); -- BIO_printf(bio_err, " only \"smtp\", \"lmtp\", \"pop3\", \"imap\", \"ftp\" and \"xmpp\"\n"); -+ BIO_printf(bio_err, " only \"smtp\", \"lmtp\", \"pop3\", \"imap\", \"ftp\", \"xmpp\" and \"ldap\"\n"); - BIO_printf(bio_err, " are supported.\n"); - BIO_printf(bio_err, " -xmpphost host - connect to this virtual host on the xmpp server\n"); - BIO_printf(bio_err, " -sess_out arg - file to write SSL session to\n"); -@@ -284,7 +285,8 @@ - PROTO_POP3, - PROTO_IMAP, - PROTO_FTP, -- PROTO_XMPP -+ PROTO_XMPP, -+ PROTO_LDAP - }; - - int -@@ -543,6 +545,8 @@ - starttls_proto = PROTO_FTP; - else if (strcmp(*argv, "xmpp") == 0) - starttls_proto = PROTO_XMPP; -+ else if (strcmp(*argv, "ldap") == 0) -+ starttls_proto = PROTO_LDAP; - else - goto bad; - } -@@ -934,6 +938,72 @@ - if (!strstr(sbuf, "value.sequence->data, -+ atyp->value.sequence->length); -+ (void)BIO_flush(sbio); -+ ASN1_TYPE_free(atyp); -+ -+ mbuf_len = BIO_read(sbio, mbuf, BUFSIZZ); -+ if (mbuf_len < 0) { -+ BIO_printf(bio_err, "BIO_read failed\n"); -+ goto end; -+ } -+ result = ldap_ExtendedResponse_parse(mbuf, mbuf_len); -+ if (result < 0) { -+ BIO_printf(bio_err, "ldap_ExtendedResponse_parse failed\n"); -+ goto shut; -+ } else if (result > 0) { -+ BIO_printf(bio_err, "STARTTLS failed, LDAP Result Code: %i\n", -+ result); -+ goto shut; -+ } -+ mbuf_len = 0; - } else if (proxy != NULL) { - BIO_printf(sbio, "CONNECT %s HTTP/1.0\r\n\r\n", connect); - mbuf_len = BIO_read(sbio, mbuf, BUFSIZZ); -@@ -1437,3 +1507,86 @@ - return 1; - } - -+static int ldap_ExtendedResponse_parse(const char *buf, long rem) -+{ -+ const unsigned char *cur, *end; -+ long len; -+ int tag, xclass, inf, ret = -1; -+ -+ cur = (const unsigned char *)buf; -+ end = cur + rem; -+ -+ /* -+ * From RFC 4511: -+ * -+ * LDAPMessage ::= SEQUENCE { -+ * messageID MessageID, -+ * protocolOp CHOICE { -+ * ... -+ * extendedResp ExtendedResponse, -+ * ... }, -+ * controls [0] Controls OPTIONAL } -+ * -+ * ExtendedResponse ::= [APPLICATION 24] SEQUENCE { -+ * COMPONENTS OF LDAPResult, -+ * responseName [10] LDAPOID OPTIONAL, -+ * responseValue [11] OCTET STRING OPTIONAL } -+ * -+ * LDAPResult ::= SEQUENCE { -+ * resultCode ENUMERATED { -+ * success (0), -+ * ... -+ * other (80), -+ * ... }, -+ * matchedDN LDAPDN, -+ * diagnosticMessage LDAPString, -+ * referral [3] Referral OPTIONAL } -+ */ -+ -+ /* pull SEQUENCE */ -+ inf = ASN1_get_object(&cur, &len, &tag, &xclass, rem); -+ if (inf != V_ASN1_CONSTRUCTED || tag != V_ASN1_SEQUENCE || -+ (rem = end - cur, len > rem)) { -+ BIO_printf(bio_err, "Unexpected LDAP response\n"); -+ goto end; -+ } -+ -+ rem = len; /* ensure that we don't overstep the SEQUENCE */ -+ -+ /* pull MessageID */ -+ inf = ASN1_get_object(&cur, &len, &tag, &xclass, rem); -+ if (inf != V_ASN1_UNIVERSAL || tag != V_ASN1_INTEGER || -+ (rem = end - cur, len > rem)) { -+ BIO_printf(bio_err, "No MessageID\n"); -+ goto end; -+ } -+ -+ cur += len; /* shall we check for MessageId match or just skip? */ -+ -+ /* pull [APPLICATION 24] */ -+ rem = end - cur; -+ inf = ASN1_get_object(&cur, &len, &tag, &xclass, rem); -+ if (inf != V_ASN1_CONSTRUCTED || xclass != V_ASN1_APPLICATION || -+ tag != 24) { -+ BIO_printf(bio_err, "Not ExtendedResponse\n"); -+ goto end; -+ } -+ -+ /* pull resultCode */ -+ rem = end - cur; -+ inf = ASN1_get_object(&cur, &len, &tag, &xclass, rem); -+ if (inf != V_ASN1_UNIVERSAL || tag != V_ASN1_ENUMERATED || len == 0 || -+ (rem = end - cur, len > rem)) { -+ BIO_printf(bio_err, "Not LDAPResult\n"); -+ goto end; -+ } -+ -+ /* len should always be one, but just in case... */ -+ for (ret = 0, inf = 0; inf < len; inf++) { -+ ret <<= 8; -+ ret |= cur[inf]; -+ } -+ /* There is more data, but we don't care... */ -+ end: -+ return ret; -+} diff --git a/patches/m4-adelie/disable-mbrtowc-test.patch b/patches/m4-adelie/disable-mbrtowc-test.patch new file mode 100755 index 0000000..cc2be24 --- /dev/null +++ b/patches/m4-adelie/disable-mbrtowc-test.patch @@ -0,0 +1,10 @@ +--- m4-1.4.18/tests/test-mbrtowc5.sh.old 2016-12-31 13:54:43.000000000 +0000 ++++ m4-1.4.18/tests/test-mbrtowc5.sh 2017-07-30 17:29:50.879924130 +0000 +@@ -1,6 +1,2 @@ + #!/bin/sh +-# Test whether the POSIX locale has encoding errors. +-LC_ALL=C \ +-./test-mbrtowc${EXEEXT} 5 || exit +-LC_ALL=POSIX \ +-./test-mbrtowc${EXEEXT} 5 ++exit 77 diff --git a/patches/m4-adelie/gnulib-tests-dont-require-gpg-passphrase.patch b/patches/m4-adelie/gnulib-tests-dont-require-gpg-passphrase.patch new file mode 100755 index 0000000..d00fbfd --- /dev/null +++ b/patches/m4-adelie/gnulib-tests-dont-require-gpg-passphrase.patch @@ -0,0 +1,10 @@ +--- m4-1.4.18/tests/test-vc-list-files-git.sh.old 2018-01-03 18:36:29.000000000 -0600 ++++ m4-1.4.18/tests/test-vc-list-files-git.sh 2018-06-18 21:57:08.305562148 -0500 +@@ -32,6 +32,7 @@ + touch d/a b c && + git config user.email "you@example.com" && + git config user.name "Your Name" && ++ git config commit.gpgsign false && + git add . > /dev/null && + git commit -q -a -m log && + printf '%s\n' b c d/a > expected && diff --git a/patches/m4-adelie/localename-test-fix.patch b/patches/m4-adelie/localename-test-fix.patch new file mode 100755 index 0000000..04584ab --- /dev/null +++ b/patches/m4-adelie/localename-test-fix.patch @@ -0,0 +1,34 @@ +--- m4-1.4.18/tests/localename.c.old 2016-12-31 13:54:43.000000000 +0000 ++++ m4-1.4.18/tests/localename.c 2017-07-30 16:40:47.098541270 +0000 +@@ -40,7 +40,7 @@ + # if defined __APPLE__ && defined __MACH__ + # include + # endif +-# if __GLIBC__ >= 2 && !defined __UCLIBC__ ++# if defined __linux__ + # include + # endif + # if !defined IN_LIBINTL +@@ -2692,16 +2692,19 @@ + locale_t thread_locale = uselocale (NULL); + if (thread_locale != LC_GLOBAL_LOCALE) + { +-# if __GLIBC__ >= 2 && !defined __UCLIBC__ ++# if defined(_NL_LOCALE_NAME) ++ const char *name = nl_langinfo(_NL_LOCALE_NAME(category)); ++# if __GLIBC__ >= 2 && !defined __UCLIBC__ + /* Work around an incorrect definition of the _NL_LOCALE_NAME macro in + glibc < 2.12. + See . */ +- const char *name = +- nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1))); ++ if (name[0] == '\0') ++ name = nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1))); + if (name[0] == '\0') + /* Fallback code for glibc < 2.4, which did not implement + nl_langinfo (_NL_LOCALE_NAME (category)). */ + name = thread_locale->__names[category]; ++# endif + return name; + # elif defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__) + /* FreeBSD, Mac OS X */ diff --git a/patches/man-db-void/add-missing-stdlib_h-include.patch b/patches/man-db-void/add-missing-stdlib_h-include.patch old mode 100644 new mode 100755 diff --git a/patches/man-db-void/guard-glibc-iconv-ext.patch b/patches/man-db-void/guard-glibc-iconv-ext.patch old mode 100644 new mode 100755 diff --git a/patches/musl-1.2.1-void/mo_lookup.patch b/patches/musl-1.2.1-void/mo_lookup.patch deleted file mode 100644 index c23eaf3..0000000 --- a/patches/musl-1.2.1-void/mo_lookup.patch +++ /dev/null @@ -1,19 +0,0 @@ -Do not crash with a NULL pointer dereference when dcngettext() -is called with NULL msgid[12] arguments. - -Fix for https://github.com/void-linux/void-packages/issues/12042 -and probably others. - - --xtraeme - ---- src/locale/__mo_lookup.c.orig 2019-06-26 09:55:36.843012674 +0200 -+++ src/locale/__mo_lookup.c 2019-06-26 09:56:11.529443955 +0200 -@@ -13,7 +13,7 @@ const char *__mo_lookup(const void *p, s - uint32_t b = 0, n = swapc(mo[2], sw); - uint32_t o = swapc(mo[3], sw); - uint32_t t = swapc(mo[4], sw); -- if (n>=size/4 || o>=size-4*n || t>=size-4*n || ((o|t)%4)) -+ if (!s || n>=size/4 || o>=size-4*n || t>=size-4*n || ((o|t)%4)) - return 0; - o/=4; - t/=4; diff --git a/patches/musl-alpine/0001-riscv64-define-ELF_NFPREG.patch b/patches/musl-alpine/0001-riscv64-define-ELF_NFPREG.patch new file mode 100644 index 0000000..b2f0a0f --- /dev/null +++ b/patches/musl-alpine/0001-riscv64-define-ELF_NFPREG.patch @@ -0,0 +1,24 @@ +From e5d2823631bbfebacf48e1a34ed28f28d7cb2570 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 11 Jan 2021 09:40:33 -0800 +Subject: [PATCH] riscv64: define ELF_NFPREG + +ELF_NFPREG is used by some userspace applications like gdb +--- + arch/riscv64/bits/user.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/riscv64/bits/user.h b/arch/riscv64/bits/user.h +index 2da743ea..0d37de0b 100644 +--- a/arch/riscv64/bits/user.h ++++ b/arch/riscv64/bits/user.h +@@ -1,5 +1,6 @@ + #include + + #define ELF_NGREG 32 ++#define ELF_NFPREG 33 + typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; + typedef union __riscv_mc_fp_state elf_fpregset_t; +-- +2.30.1 + diff --git a/patches/musl-alpine/handle-aux-at_base.patch b/patches/musl-alpine/handle-aux-at_base.patch new file mode 100644 index 0000000..7c9f2dc --- /dev/null +++ b/patches/musl-alpine/handle-aux-at_base.patch @@ -0,0 +1,46 @@ +This is required to make the gcompat ELF interpreter stub work with some +packed binaries. + +diff --git a/src/env/__init_tls.c b/src/env/__init_tls.c +index b125eb1..616c6a6 100644 +--- a/src/env/__init_tls.c ++++ b/src/env/__init_tls.c +@@ -66,8 +66,10 @@ void *__copy_tls(unsigned char *mem) + } + + #if ULONG_MAX == 0xffffffff ++typedef Elf32_Ehdr Ehdr; + typedef Elf32_Phdr Phdr; + #else ++typedef Elf64_Ehdr Ehdr; + typedef Elf64_Phdr Phdr; + #endif + +@@ -77,15 +79,23 @@ extern const size_t _DYNAMIC[]; + static void static_init_tls(size_t *aux) + { + unsigned char *p; +- size_t n; ++ size_t n, e; + Phdr *phdr, *tls_phdr=0; + size_t base = 0; + void *mem; + +- for (p=(void *)aux[AT_PHDR],n=aux[AT_PHNUM]; n; n--,p+=aux[AT_PHENT]) { ++ if (aux[AT_BASE]) { ++ Ehdr *ehdr = (void *)aux[AT_BASE]; ++ p = (unsigned char *)aux[AT_BASE] + ehdr->e_phoff; ++ n = ehdr->e_phnum; ++ e = ehdr->e_phentsize; ++ } else { ++ p = (void *)aux[AT_PHDR]; ++ n = aux[AT_PHNUM]; ++ e = aux[AT_PHENT]; ++ } ++ for (; n; n--, p+=e) { + phdr = (void *)p; +- if (phdr->p_type == PT_PHDR) +- base = aux[AT_PHDR] - phdr->p_vaddr; + if (phdr->p_type == PT_DYNAMIC && _DYNAMIC) + base = (size_t)_DYNAMIC - phdr->p_vaddr; + if (phdr->p_type == PT_TLS) diff --git a/patches/musl-alpine/syscall-cp-epoll.patch b/patches/musl-alpine/syscall-cp-epoll.patch new file mode 100644 index 0000000..338620a --- /dev/null +++ b/patches/musl-alpine/syscall-cp-epoll.patch @@ -0,0 +1,16 @@ +diff --git a/src/linux/epoll.c b/src/linux/epoll.c +index deff5b10..93baa814 100644 +--- a/src/linux/epoll.c ++++ b/src/linux/epoll.c +@@ -24,9 +24,9 @@ int epoll_ctl(int fd, int op, int fd2, struct epoll_event *ev) + + int epoll_pwait(int fd, struct epoll_event *ev, int cnt, int to, const sigset_t *sigs) + { +- int r = __syscall(SYS_epoll_pwait, fd, ev, cnt, to, sigs, _NSIG/8); ++ int r = __syscall_cp(SYS_epoll_pwait, fd, ev, cnt, to, sigs, _NSIG/8); + #ifdef SYS_epoll_wait +- if (r==-ENOSYS && !sigs) r = __syscall(SYS_epoll_wait, fd, ev, cnt, to); ++ if (r==-ENOSYS && !sigs) r = __syscall_cp(SYS_epoll_wait, fd, ev, cnt, to); + #endif + return __syscall_ret(r); + } diff --git a/patches/musl-mlfs/fix-utmp-wtmp-paths.patch b/patches/musl-mlfs/fix-utmp-wtmp-paths.patch new file mode 100644 index 0000000..2888bf8 --- /dev/null +++ b/patches/musl-mlfs/fix-utmp-wtmp-paths.patch @@ -0,0 +1,15 @@ +diff -uNr musl-1.2.1.orig/include/paths.h musl-1.2.1/include/paths.h +--- musl-1.2.1.orig/include/paths.h 2020-08-03 23:21:09.000000000 -0500 ++++ musl-1.2.1/include/paths.h 2020-12-14 21:50:07.613214612 -0600 +@@ -18,9 +18,9 @@ + #define _PATH_SHADOW "/etc/shadow" + #define _PATH_SHELLS "/etc/shells" + #define _PATH_TTY "/dev/tty" +-#define _PATH_UTMP "/dev/null/utmp" ++#define _PATH_UTMP "/run/utmps/utmp" + #define _PATH_VI "/usr/bin/vi" +-#define _PATH_WTMP "/dev/null/wtmp" ++#define _PATH_WTMP "/run/utmps/wtmp" + + #define _PATH_DEV "/dev/" + #define _PATH_TMP "/tmp/" diff --git a/patches/musl-1.2.1-void/i686-fix-rounding.patch b/patches/musl-mlfs/i686-fix-rounding.patch old mode 100644 new mode 100755 similarity index 100% rename from patches/musl-1.2.1-void/i686-fix-rounding.patch rename to patches/musl-mlfs/i686-fix-rounding.patch diff --git a/patches/perl-5.30-alpine/musl-locale.patch b/patches/perl-alpine/musl-locale.patch similarity index 100% rename from patches/perl-5.30-alpine/musl-locale.patch rename to patches/perl-alpine/musl-locale.patch diff --git a/patches/perl-alpine/musl-stack-size.patch b/patches/perl-alpine/musl-stack-size.patch new file mode 100644 index 0000000..08a9ef0 --- /dev/null +++ b/patches/perl-alpine/musl-stack-size.patch @@ -0,0 +1,16 @@ +Tests fails on s390x due to low thread stack size +upstream report: https://github.com/Perl/perl5/issues/18160 + +diff --git a/t/thread_it.pl b/t/thread_it.pl +index f38a580..e8c450a 100644 +--- a/t/thread_it.pl ++++ b/t/thread_it.pl +@@ -36,7 +36,7 @@ my $curr = threads->create({ + stack_size => $^O eq 'hpux' ? 524288 : + $^O eq 'darwin' ? 2000000: + $^O eq 'VMS' ? 150000 : +- $^O eq 'aix' ? 1500000 : 0, ++ $^O eq 'aix' ? 1500000 : 256*1024, + }, sub { + run_tests(); + return defined &curr_test ? curr_test() : () diff --git a/patches/posixtz-adelie/0001-posixtz-fix-up-lseek.patch b/patches/posixtz-adelie/0001-posixtz-fix-up-lseek.patch new file mode 100755 index 0000000..4bf164f --- /dev/null +++ b/patches/posixtz-adelie/0001-posixtz-fix-up-lseek.patch @@ -0,0 +1,27 @@ +From 5c4cd3cee03428636e8d7cc4ed644389a4d598b3 Mon Sep 17 00:00:00 2001 +From: William Pitcock +Date: Thu, 28 Apr 2011 02:56:42 -0500 +Subject: [PATCH] posixtz: ensure the file offset we pass to lseek is off_t + +on 32-bit systems, sizeof(off_t) is 4, on 64-bit sizeof(off_t) is 8 +causing a word masking issue. +--- + posixtz.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/posixtz.c b/posixtz.c +index cddcb3e..972ca31 100644 +--- a/posixtz-0.5/posixtz.c ++++ b/posixtz-0.5/posixtz.c +@@ -36,7 +36,7 @@ char *posix_tz(const char *filename) + if (r != TZ_BUFLEN + || strncmp(buf, "TZif", 4) != 0 + || (unsigned char)buf[4] < 2 +- || lseek(fd, -TZ_BUFLEN, SEEK_END) < 0 ++ || lseek(fd, (off_t) -TZ_BUFLEN, SEEK_END) < 0 + ) + goto ERROR; + +-- +1.7.4.5 + diff --git a/patches/procps-adelie/use-utmpx.patch b/patches/procps-adelie/use-utmpx.patch new file mode 100755 index 0000000..83047cf --- /dev/null +++ b/patches/procps-adelie/use-utmpx.patch @@ -0,0 +1,132 @@ +diff --git a/configure.ac b/configure.ac +index bc84a0d..da2916e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -44,7 +44,7 @@ AC_PROG_MAKE_SET + + # Checks for header files. + AC_HEADER_MAJOR +-AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h langinfo.h libintl.h limits.h locale.h netinet/in.h stdint.h stdio_ext.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/time.h termios.h unistd.h utmp.h values.h wchar.h wctype.h]) ++AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h langinfo.h libintl.h limits.h locale.h netinet/in.h stdint.h stdio_ext.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/time.h termios.h unistd.h utmp.h utmpx.h values.h wchar.h wctype.h]) + + # Checks for typedefs, structures, and compiler characteristics. + AC_CHECK_HEADER_STDBOOL +diff --git a/proc/whattime.c b/proc/whattime.c +index c223cad..d55fd22 100644 +--- a/proc/whattime.c ++++ b/proc/whattime.c +@@ -33,7 +33,7 @@ + #include + #include + #include +-#include ++#include + #include + #include "whattime.h" + #include "sysinfo.h" +@@ -42,7 +42,7 @@ static char buf[256]; + static double av[3]; + + char *sprint_uptime(int human_readable) { +- struct utmp *utmpstruct; ++ struct utmpx *utmpstruct; + int upminutes, uphours, updays, upweeks, upyears, updecades; + int pos; + int comma; +@@ -98,13 +98,13 @@ char *sprint_uptime(int human_readable) { + /* count the number of users */ + + numuser = 0; +- setutent(); +- while ((utmpstruct = getutent())) { ++ setutxent(); ++ while ((utmpstruct = getutxent())) { + if ((utmpstruct->ut_type == USER_PROCESS) && + (utmpstruct->ut_name[0] != '\0')) + numuser++; + } +- endutent(); ++ endutxent(); + + pos += sprintf(buf + pos, "%2d user%s, ", numuser, numuser == 1 ? "" : "s"); + +diff --git a/w.c b/w.c +index 35710a3..6caa8a6 100644 +--- a/w.c ++++ b/w.c +@@ -23,6 +23,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + ++#include "config.h" + #include "c.h" + #include "fileutils.h" + #include "nls.h" +@@ -54,14 +55,22 @@ + #include + #include + #include +-#include ++#ifdef HAVE_UTMPX_H ++# include ++#else ++# include ++#endif + #include + + static int ignoreuser = 0; /* for '-u' */ + static int oldstyle = 0; /* for '-o' */ + static proc_t **procs; /* our snapshot of the process table */ + ++#ifdef HAVE_UTMPX_H ++typedef struct utmpx utmp_t; ++#else + typedef struct utmp utmp_t; ++#endif + + #ifdef W_SHOWFROM + # define FROM_STRING "on" +@@ -604,11 +613,19 @@ int main(int argc, char **argv) + printf(_(" IDLE WHAT\n")); + } + ++#ifdef HAVE_UTMPX_H ++ setutxent(); ++#else + utmpname(UTMP_FILE); + setutent(); ++#endif + if (user) { + for (;;) { ++#ifdef HAVE_UTMPX_H ++ u = getutxent(); ++#else + u = getutent(); ++#endif + if (unlikely(!u)) + break; + if (u->ut_type != USER_PROCESS) +@@ -619,7 +636,11 @@ int main(int argc, char **argv) + } + } else { + for (;;) { ++#ifdef HAVE_UTMPX_H ++ u = getutxent(); ++#else + u = getutent(); ++#endif + if (unlikely(!u)) + break; + if (u->ut_type != USER_PROCESS) +@@ -629,7 +650,11 @@ int main(int argc, char **argv) + fromlen, ip_addresses); + } + } ++#ifdef HAVE_UTMPX_H ++ endutxent(); ++#else + endutent(); ++#endif + + return EXIT_SUCCESS; + } diff --git a/patches/procps-mlfs/use_utmpx.patch b/patches/procps-mlfs/use_utmpx.patch new file mode 100644 index 0000000..ea9e9e2 --- /dev/null +++ b/patches/procps-mlfs/use_utmpx.patch @@ -0,0 +1,38 @@ +diff -uNr procps-3.3.17.orig/proc/whattime.c procps-3.3.17/proc/whattime.c +--- procps-3.3.17.orig/proc/whattime.c 2021-02-09 04:11:25.000000000 -0600 ++++ procps-3.3.17/proc/whattime.c 2021-03-19 13:40:17.910049032 -0500 +@@ -33,7 +33,7 @@ + #include + #include + #include +-#include ++#include + #include + #include "whattime.h" + #include "sysinfo.h" +@@ -42,7 +42,7 @@ + static double av[3]; + + char *sprint_uptime(int human_readable) { +- struct utmp *utmpstruct; ++ struct utmpx *utmpstruct; + int upminutes, uphours, updays, upweeks, upyears, updecades; + int pos; + int comma; +@@ -98,13 +98,13 @@ + /* count the number of users */ + + numuser = 0; +- setutent(); +- while ((utmpstruct = getutent())) { ++ setutxent(); ++ while ((utmpstruct = getutxent())) { + if ((utmpstruct->ut_type == USER_PROCESS) && + (utmpstruct->ut_name[0] != '\0')) + numuser++; + } +- endutent(); ++ endutxent(); + + pos += sprintf(buf + pos, "%2d user%s, ", numuser, numuser == 1 ? "" : "s"); + diff --git a/patches/python3-void/musl-find_library.patch b/patches/python3-void/musl-find_library.patch old mode 100644 new mode 100755 diff --git a/patches/python3-void/tweak-MULTIARCH-for-powerpc-linux-musl.patch b/patches/python3-void/tweak-MULTIARCH-for-powerpc-linux-musl.patch old mode 100644 new mode 100755 diff --git a/patches/util-linux-void/fix-musl.patch b/patches/util-linux-void/fix-musl.patch old mode 100644 new mode 100755 diff --git a/sources.list b/sources.list index c2bd228..a7da7ea 100644 --- a/sources.list +++ b/sources.list @@ -1,87 +1,86 @@ -https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.xz -https://ftp.gnu.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz -ftp://ftp.astron.com/pub/file/file-5.39.tar.gz -https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.1.tar.xz -http://musl.libc.org/releases/musl-1.2.1.tar.gz -http://www.mpfr.org/mpfr-4.1.0/mpfr-4.1.0.tar.xz -https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz -https://ftp.gnu.org/gnu/gmp/gmp-6.2.0.tar.xz -https://downloads.sourceforge.net/tcl/tcl8.6.10-src.tar.gz -https://sourceforge.net/projects/expect/files/Expect/5.45.3/expect5.45.3.tar.gz -https://ftp.gnu.org/gnu/dejagnu/dejagnu-1.6.2.tar.gz -https://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz -https://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz -https://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz -https://ftp.gnu.org/gnu/bison/bison-3.7.1.tar.xz -https://www.sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz -https://ftp.gnu.org/gnu/coreutils/coreutils-8.32.tar.xz -https://ftp.gnu.org/gnu/diffutils/diffutils-3.7.tar.xz -https://ftp.gnu.org/gnu/findutils/findutils-4.7.0.tar.xz -https://ftp.gnu.org/gnu/gawk/gawk-5.1.0.tar.xz -https://ftp.gnu.org/gnu/gettext/gettext-0.21.tar.xz -https://ftp.gnu.org/gnu/grep/grep-3.4.tar.xz -https://ftp.gnu.org/gnu/gzip/gzip-1.10.tar.xz -https://ftp.gnu.org/gnu/make/make-4.3.tar.gz -https://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz -https://www.cpan.org/src/5.0/perl-5.32.0.tar.xz -https://github.com/arsv/perl-cross/releases/download/1.3.4/perl-cross-1.3.4.tar.gz -https://ftp.gnu.org/gnu/sed/sed-4.8.tar.xz -https://ftp.gnu.org/gnu/tar/tar-1.32.tar.xz -https://ftp.gnu.org/gnu/texinfo/texinfo-6.7.tar.xz -https://tukaani.org/xz/xz-5.2.5.tar.xz -http://download.savannah.gnu.org/releases/lzip/lzip-1.21.tar.gz -http://anduin.linuxfromscratch.org/LFS/vim-8.2.1361.tar.gz -https://www.nano-editor.org/dist/v5/nano-5.1.tar.xz -https://www.kernel.org/pub/linux/utils/util-linux/v2.36/util-linux-2.36.tar.xz -https://www.kernel.org/pub/linux/docs/man-pages/man-pages-5.08.tar.xz -https://data.iana.org/time-zones/releases/tzdb-2020a.tar.lz +https://www.kernel.org/pub/linux/docs/man-pages/man-pages-5.11.tar.xz +https://www.musl-libc.org/releases/musl-1.2.2.tar.gz +http://skarnet.org/software/skalibs/skalibs-2.10.0.3.tar.gz +https://skarnet.org/software/utmps/utmps-0.1.0.2.tar.gz +https://www.iana.org/time-zones/repository/releases/tzdata2021a.tar.gz +https://www.iana.org/time-zones/repository/releases/tzcode2021a.tar.gz +https://dev.alpinelinux.org/archive/posixtz/posixtz-0.5.tar.xz http://www.lysator.liu.se/~nisse/misc/argp-standalone-1.3.tar.gz https://zlib.net/zlib-1.2.11.tar.xz -https://ftp.gnu.org/gnu/readline/readline-8.0.tar.gz -https://github.com/gavinhoward/bc/releases/download/3.1.5/bc-3.1.5.tar.xz +ftp://ftp.astron.com/pub/file/file-5.40.tar.gz +http://ftp.gnu.org/gnu/readline/readline-8.1.tar.gz +http://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz +https://github.com/gavinhoward/bc/releases/download/4.0.2/bc-4.0.2.tar.xz +http://ftp.gnu.org/gnu/binutils/binutils-2.36.1.tar.xz +http://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz +http://www.mpfr.org/mpfr-4.1.0/mpfr-4.1.0.tar.xz +https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz https://github.com/shadow-maint/shadow/releases/download/4.8.1/shadow-4.8.1.tar.xz -http://isl.gforge.inria.fr/isl-0.19.tar.xz -https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz -http://download.savannah.gnu.org/releases/attr/attr-2.4.48.tar.gz -https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.42.tar.xz -http://anduin.linuxfromscratch.org/LFS/iana-etc-20200429.tar.gz -https://sourceforge.net/projects/psmisc/files/psmisc/psmisc-23.3.tar.xz +https://dev.alpinelinux.org/~nenolod/gcc-10.3.1_git20210424.tar.xz +http://isl.gforge.inria.fr/isl-0.23.tar.bz2 +http://anduin.linuxfromscratch.org/LFS/bzip2-1.0.8.tar.gz +https://distfiles.dereferenced.org/pkgconf/pkgconf-1.7.4.tar.xz +http://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz +https://download.savannah.gnu.org/releases/attr/attr-2.5.1.tar.gz +https://download.savannah.gnu.org/releases/acl/acl-2.3.1.tar.xz +https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.50.tar.xz +http://ftp.gnu.org/gnu/sed/sed-4.8.tar.xz +https://sourceforge.net/projects/psmisc/files/psmisc/psmisc-23.4.tar.xz +https://github.com/Mic92/iana-etc/releases/download/20210526/iana-etc-20210526.tar.gz +http://ftp.gnu.org/gnu/bison/bison-3.7.6.tar.xz https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz -https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz -https://ftp.gnu.org/gnu/gdbm/gdbm-1.18.1.tar.gz -https://ftp.gnu.org/gnu/gperf/gperf-3.1.tar.gz -https://prdownloads.sourceforge.net/expat/expat-2.2.9.tar.xz -https://ftp.gnu.org/gnu/inetutils/inetutils-1.9.4.tar.xz +http://ftp.gnu.org/gnu/grep/grep-3.6.tar.xz +http://ftp.gnu.org/gnu/bash/bash-5.1.tar.gz +http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz +https://ftp.gnu.org/gnu/gdbm/gdbm-1.19.tar.gz +http://ftp.gnu.org/gnu/gperf/gperf-3.1.tar.gz +https://prdownloads.sourceforge.net/expat/expat-2.4.1.tar.xz +https://ftp.gnu.org/gnu/inetutils/inetutils-2.0.tar.xz +https://www.cpan.org/src/5.0/perl-5.34.0.tar.xz https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.46.tar.gz -https://ftp.gnu.org/gnu/automake/automake-1.16.2.tar.xz -https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xz -https://github.com/pullmoll/musl-rpmatch/archive/v1.0.tar.gz -https://github.com/pullmoll/musl-obstack/archive/v1.1.tar.gz +https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz +http://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz +http://ftp.gnu.org/gnu/automake/automake-1.16.3.tar.xz https://github.com/pullmoll/musl-fts/archive/v1.2.7.tar.gz -https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-27.tar.xz -https://sourceware.org/ftp/elfutils/0.180/elfutils-0.180.tar.bz2 +https://github.com/pullmoll/musl-obstack/archive/v1.1.tar.gz +https://github.com/pullmoll/musl-rpmatch/archive/v1.0.tar.gz +https://tukaani.org/xz/xz-5.2.5.tar.xz +https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-29.tar.xz +http://ftp.barfooze.de/pub/sabotage/tarballs/gettext-tiny-0.3.2.tar.xz +https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz +https://sourceware.org/ftp/elfutils/0.185/elfutils-0.185.tar.bz2 ftp://sourceware.org/pub/libffi/libffi-3.3.tar.gz -http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.2.1.tar.gz -https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tar.xz -https://github.com/ninja-build/ninja/archive/v1.10.0/ninja-1.10.0.tar.gz -https://github.com/mesonbuild/meson/releases/download/0.55.1/meson-0.55.1.tar.gz -https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-3.3.16.tar.xz +http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.3.3.tar.gz +https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tar.xz +https://github.com/ninja-build/ninja/archive/v1.10.2/ninja-1.10.2.tar.gz +https://github.com/mesonbuild/meson/releases/download/0.58.0/meson-0.58.0.tar.gz +https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-3.3.17.tar.xz +http://ftp.gnu.org/gnu/coreutils/coreutils-8.32.tar.xz https://github.com/libcheck/check/releases/download/0.15.2/check-0.15.2.tar.gz -https://ftp.gnu.org/gnu/groff/groff-1.22.4.tar.gz -https://ftp.gnu.org/gnu/grub/grub-2.04.tar.xz -http://www.greenwoodsoftware.com/less/less-551.tar.gz -https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-5.8.0.tar.xz -https://www.kernel.org/pub/linux/utils/kbd/kbd-2.3.0.tar.xz +http://ftp.gnu.org/gnu/diffutils/diffutils-3.7.tar.xz +http://ftp.gnu.org/gnu/gawk/gawk-5.1.0.tar.xz +http://ftp.gnu.org/gnu/findutils/findutils-4.8.0.tar.xz +http://ftp.gnu.org/gnu/groff/groff-1.22.4.tar.gz +https://ftp.gnu.org/gnu/grub/grub-2.06.tar.xz +https://www.greenwoodsoftware.com/less/less-581.tar.gz +http://ftp.gnu.org/gnu/gzip/gzip-1.10.tar.xz +https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-5.12.0.tar.xz +https://www.kernel.org/pub/linux/utils/kbd/kbd-2.4.0.tar.xz http://download.savannah.gnu.org/releases/libpipeline/libpipeline-1.5.3.tar.gz -https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.45.6/e2fsprogs-1.45.6.tar.gz -https://dev.gentoo.org/~blueness/eudev/eudev-3.2.9.tar.gz -https://github.com/facebook/zstd/releases/download/v1.4.5/zstd-1.4.5.tar.gz +http://ftp.gnu.org/gnu/make/make-4.3.tar.bz2 +http://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz +http://download.savannah.gnu.org/releases/man-db/man-db-2.9.4.tar.xz +http://ftp.gnu.org/gnu/tar/tar-1.34.tar.xz +http://ftp.gnu.org/gnu/texinfo/texinfo-6.7.tar.xz +http://anduin.linuxfromscratch.org/LFS/vim-8.2.2890.tar.gz +https://www.kernel.org/pub/linux/utils/util-linux/v2.36/util-linux-2.36.2.tar.xz +https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.46.2/e2fsprogs-1.46.2.tar.gz +https://dev.gentoo.org/~blueness/eudev/eudev-3.2.10.tar.gz https://ftp.gnu.org/gnu/cpio/cpio-2.13.tar.bz2 -http://skarnet.org/software/skalibs/skalibs-2.9.2.1.tar.gz -http://www.skarnet.org/software/execline/execline-2.6.1.0.tar.gz -https://github.com/skarnet/s6/archive/v2.7.2.2.tar.gz -http://www.skarnet.org/software/s6-linux-utils/s6-linux-utils-2.5.1.2.tar.gz -http://www.skarnet.org/software/s6-portable-utils/s6-portable-utils-2.2.2.4.tar.gz -https://github.com/dslm4515/MLFS-S6-Bootscripts/releases/download/3.02/MLFS-S6-Bootscripts-3.02.tar.xz -http://download.savannah.gnu.org/releases/man-db/man-db-2.9.3.tar.xz -http://download.savannah.gnu.org/releases/acl/acl-2.2.53.tar.gz +https://skarnet.org/software/execline/execline-2.8.0.1.tar.gz +https://www.skarnet.org/software/s6/s6-2.10.0.3.tar.gz +https://www.skarnet.org/software/s6-rc/s6-rc-0.5.2.2.tar.gz +https://www.skarnet.org/software/s6-linux-utils/s6-linux-utils-2.5.1.5.tar.gz +https://www.skarnet.org/software/s6-portable-utils/s6-portable-utils-2.2.3.2.tar.gz +https://www.skarnet.org/software/s6-linux-init/s6-linux-init-1.0.6.3.tar.gz +https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.12.10.tar.xz diff --git a/sources.md5 b/sources.md5 new file mode 100644 index 0000000..166ebf7 --- /dev/null +++ b/sources.md5 @@ -0,0 +1,93 @@ +71f7ada6bec9cdbf4538adc326120cfd Python-3.9.5.tar.xz +80bb18a8e6240fcf7ec2f7b57601c170 XML-Parser-2.46.tar.gz +95ce715fe09acca7c12d3306d0f076b2 acl-2.3.1.tar.xz +720704bac078d067111b32444e24ba69 argp-standalone-1.3.tar.gz +ac1c5a7a084f0f83b8cace34211f64d8 attr-2.5.1.tar.gz +12cfa1687ffa2606337efe1a64416106 autoconf-2.71.tar.xz +c27f608a4e1f302ec7ce42f1251c184e automake-1.16.3.tar.xz +bb91a17fd6c9032c26d0b2b78b50aff5 bash-5.1.tar.gz +230d780f978f1bc3f725bfbaf63c2b43 bc-4.0.2.tar.xz +628d490d976d8957279bbbff06cf29d4 binutils-2.36.1.tar.xz +d61aa92e3562cb7292b004ce96173cf7 bison-3.7.6.tar.xz +67e051268d0c475ea773822f7500d0e5 bzip2-1.0.8.tar.gz +50fcafcecde5a380415b12e9c574e0b2 check-0.15.2.tar.gz +022042695b7d5bcf1a93559a9735e668 coreutils-8.32.tar.xz +f3438e672e3fa273a7dc26339dd1eed6 cpio-2.13.tar.bz2 +e1b07516533f351b3aba3423fafeffd6 dejagnu-1.6.2.tar.gz +4824adc0e95dbbf11dfbdfaad6a1e461 diffutils-3.7.tar.xz +e8ef5fa3b72557be5e9fe564a25da6eb e2fsprogs-1.46.2.tar.gz +2b6e94c2eebc1f2194173e31bca9396e elfutils-0.185.tar.bz2 +60b135a189523f333cea5f71a3345c8d eudev-3.2.10.tar.gz +1db2962b05f2566826ad9da4e3b5c475 execline-2.8.0.1.tar.gz +a4fb91a9441bcaec576d4c4a56fa3aa6 expat-2.4.1.tar.xz +a8855cd41c1ef004b9794db9e2a57a9d expect5.45.3.tar.gz +72540ea1cc8c6e1dee35d6100ec66589 file-5.40.tar.gz +eeefe2e6380931a77dfa6d9350b43186 findutils-4.8.0.tar.xz +2882e3179748cc9f9c23ec593d6adc8d flex-2.6.4.tar.gz +8470c34eeecc41c1aa0c5d89e630df50 gawk-5.1.0.tar.xz +6b2dfc39ee0f301f09edfebd163c2cc8 gcc-10.3.1_git20210424.tar.xz +aeb29c6a90350a4c959cd1df38cd0a7e gdbm-1.19.tar.gz +9ddf4d35636fa3beacd3627cc02723ff gettext-tiny-0.3.2.tar.xz +0b82665c4a92fd2ade7440c13fcaa42b gmp-6.2.1.tar.xz +9e251c0a618ad0824b51117d5d9db87e gperf-3.1.tar.gz +f47fe27049510b2249dba7f862ac1b51 grep-3.6.tar.xz +08fb04335e2f5e73f23ea4c3adbf0c5f groff-1.22.4.tar.gz +cf0fd928b1e5479c8108ee52cb114363 grub-2.06.tar.xz +691b1221694c3394f1c537df4eee39d3 gzip-1.10.tar.xz +8442d67cc5f5b3616d128e25779a93c7 iana-etc-20210526.tar.gz +5e1018502cd131ed8e42339f6b5c98aa inetutils-2.0.tar.xz +12e517cac2b57a0121cda351570f1e63 intltool-0.51.0.tar.gz +bbebacdabd4628ff86453ef4771a242a iproute2-5.12.0.tar.xz +a43a8da08df0744a6453956718e2b76b isl-0.23.tar.bz2 +3cac5be0096fcf7b32dcbd3c53831380 kbd-2.4.0.tar.xz +e81e63acd80697d001c8d85c1acb38a0 kmod-29.tar.xz +6201df5b9dae2af9767fc220471471b3 less-581.tar.gz +66a561afa81666236ff973544ff4e864 libcap-2.50.tar.xz +6313289e32f1d38a9df4770b014a2ca7 libffi-3.3.tar.gz +dad443d0911cf9f0f1bd90a334bc9004 libpipeline-1.5.3.tar.gz +c4a3a25c89cacf19fa36470ab69624e4 libressl-3.3.3.tar.gz +1bfb9b923f2c1339b4d2ce1807064aa5 libtool-2.4.6.tar.xz +b08f35724e00a83ddd9effd33c663a45 linux-5.10.16.tar.xz +730bb15d96fffe47e148d1e09235af82 m4-1.4.18.tar.xz +fc7a67ea86ace13195b0bce683fd4469 make-4.3.tar.gz +6e233a555f7b9ae91ce7cd0faa322bce man-db-2.9.4.tar.xz +9f40e8fff6766563837d98d7d7c6e19b man-pages-5.11.tar.xz +18ac55e3d6a5acb17b5737eb2a15bb5b meson-0.58.0.tar.gz +9f16c976c25bb0f76b50be749cd7a3a8 mpc-1.2.1.tar.gz +bdd3d5efba9c17da8d83a35ec552baef mpfr-4.1.0.tar.xz +aed8ae9e2b0898151b36a204088292dd musl-1.2.2.tar.gz +bce0b5de0cf2519a74fbfacead60369d musl-fts-1.2.7.tar.gz +185975cc117dba8e6158cce847ba44d5 musl-obstack1.1.tar.gz +8f5a5022fa66d94b7b0934618dfa6350 musl-rpmatch-1.0.tar.gz +30b80ba5ae1823897cfbd0fc962c33c6 nano-5.1.tar.xz +e812da327b1c2214ac1aed440ea3ae8d ncurses-6.2.tar.gz +639f75bc2e3b19ab893eaf2c810d4eb4 ninja-1.10.2.tar.gz +78ad9937e4caadcba1526ef1853730d5 patch-2.7.6.tar.xz +7f104064b906ad8c7329ca5e409a32d7 perl-5.32.1.tar.xz +df7ecb0653440b26dc951ad9dbfab517 perl-5.34.0.tar.xz +a4d8faf1946e1074f88e711b8658716d perl-cross-1.3.5.tar.gz +be4e3987047a95c2b75fbbf1884353ad pkgconf-1.7.4.tar.xz +80f8ae1df19dd28e1c8b192c6ea7b836 posixtz-0.5.tar.xz +d60613e88c2f442ebd462b5a75313d56 procps-ng-3.3.17.tar.xz +8114cd4489b95308efe2509c3a406bbf psmisc-23.4.tar.xz +e9557dd5b1409f5d7b37ef717c64518e readline-8.1.tar.gz +c3956a7c46522e4eea3bf89634d29f88 s6-2.10.0.3.tar.gz +d245f2d3c0399f32b5e834adb30c0531 s6-linux-init-1.0.6.3.tar.gz +75aa0af78c6096c201cdc6173503a5f4 s6-linux-utils-2.5.1.5.tar.gz +0b1f21f6f0d958d586a557e2d4c6467d s6-portable-utils-2.2.3.2.tar.gz +1e003badbde728137170775806c6776b s6-rc-0.5.2.2.tar.gz +6d906edfdb3202304059233f51f9a71d sed-4.8.tar.xz +4b05eff8a427cf50e615bda324b5bc45 shadow-4.8.1.tar.xz +85ad305218d10fe65b38c4c351faa395 skalibs-2.10.0.3.tar.gz +9a08d29a9ac4727130b5708347c0f5cf tar-1.34.tar.xz +97c55573f8520bcab74e21bfd8d0aadc tcl8.6.10-src.tar.gz +d4c5d8cc84438c5993ec5163a59522a6 texinfo-6.7.tar.xz +41a624869eed4cc36b9d163764f972a3 tzcode2021a.tar.gz +20eae7d1da671c6eac56339c8df85bbd tzdata2021a.tar.gz +f78419af679ac9678190ad961eb3cf27 util-linux-2.36.2.tar.xz +75eb0a648098332d4042f1646eca4069 util-linux-2.37.tar.xz +38703cc7056c8ee9c001c47a925b26a5 utmps-0.1.0.2.tar.gz +ec8a8ec5f67b0ad0edba82cad2354d33 vim-8.2.2890.tar.gz +aa1621ec7013a19abab52a8aff04fe5b xz-5.2.5.tar.xz +85adef240c5f370b308da8c938951a68 zlib-1.2.11.tar.xz +a6eb7fb1f2c21fa80030a47993853e92 zstd-1.5.0.tar.gz diff --git a/sources.md5sum b/sources.md5sum deleted file mode 100644 index 3725194..0000000 --- a/sources.md5sum +++ /dev/null @@ -1,87 +0,0 @@ -3171c5e93904bd7666b5f807d41721be MLFS-S6-Bootscripts-3.02.tar.xz -35b5a3d0254c1c59be9736373d429db7 Python-3.8.5.tar.xz -80bb18a8e6240fcf7ec2f7b57601c170 XML-Parser-2.46.tar.gz -007aabf1dbb550bcddde52a244cd1070 acl-2.2.53.tar.gz -720704bac078d067111b32444e24ba69 argp-standalone-1.3.tar.gz -bc1e5cb5c96d99b24886f1f527d3bb3d attr-2.4.48.tar.gz -50f97f4159805e374639a73e2636f22e autoconf-2.69.tar.xz -6cb234c86f3f984df29ce758e6d0d1d7 automake-1.16.2.tar.xz -2b44b47b905be16f45709648f671820b bash-5.0.tar.gz -bd6a6693f68c2ac5963127f82507716f bc-3.1.5.tar.xz -fc8d55e2f6096de8ff8171173b6f5087 binutils-2.35.tar.xz -e7c8c321351ebdf70f5f0825f3faaee2 bison-3.7.1.tar.xz -67e051268d0c475ea773822f7500d0e5 bzip2-1.0.8.tar.gz -50fcafcecde5a380415b12e9c574e0b2 check-0.15.2.tar.gz -022042695b7d5bcf1a93559a9735e668 coreutils-8.32.tar.xz -f3438e672e3fa273a7dc26339dd1eed6 cpio-2.13.tar.bz2 -e1b07516533f351b3aba3423fafeffd6 dejagnu-1.6.2.tar.gz -4824adc0e95dbbf11dfbdfaad6a1e461 diffutils-3.7.tar.xz -cccfb706d162514e4f9dbfbc9e5d65ee e2fsprogs-1.45.6.tar.gz -23feddb1b3859b03ffdbaf53ba6bd09b elfutils-0.180.tar.bz2 -dedfb1964f6098fe9320de827957331f eudev-3.2.9.tar.gz -150ee543391b0dff693cf3b8fdd76e54 execline-2.6.1.0.tar.gz -d2384fa607223447e713e1b9bd272376 expat-2.2.9.tar.xz -a8855cd41c1ef004b9794db9e2a57a9d expect5.45.3.tar.gz -1c450306053622803a25647d88f80f25 file-5.39.tar.gz -731356dec4b1109b812fecfddfead6b2 findutils-4.7.0.tar.xz -2882e3179748cc9f9c23ec593d6adc8d flex-2.6.4.tar.gz -8470c34eeecc41c1aa0c5d89e630df50 gawk-5.1.0.tar.xz -e9fd9b1789155ad09bcf3ae747596b50 gcc-10.2.0.tar.xz -988dc82182121c7570e0cb8b4fcd5415 gdbm-1.18.1.tar.gz -40996bbaf7d1356d3c22e33a8b255b31 gettext-0.21.tar.xz -a325e3f09e6d91e62101e59f9bda3ec1 gmp-6.2.0.tar.xz -9e251c0a618ad0824b51117d5d9db87e gperf-3.1.tar.gz -111b117d22d6a7d049d6ae7505e9c4d2 grep-3.4.tar.xz -08fb04335e2f5e73f23ea4c3adbf0c5f groff-1.22.4.tar.gz -5aaca6713b47ca2456d8324a58755ac7 grub-2.04.tar.xz -691b1221694c3394f1c537df4eee39d3 gzip-1.10.tar.xz -f9f7cda56c0ebe6ac2fa69a0be5d5400 iana-etc-20200429.tar.gz -87fef1fa3f603aef11c41dcc097af75e inetutils-1.9.4.tar.xz -e2016acc07d91b2508916c459a8435af iproute2-5.8.0.tar.xz -1ae893020fa078531e6158cb243880a5 isl-0.19.tar.xz -ac7ec9cedad48f4c279251cddc72008a kbd-2.3.0.tar.xz -3973a74786670d3062d89a827e266581 kmod-27.tar.xz -4ad4408b06d7a6626a055cb453f36819 less-551.tar.gz -f22cd619e04ae7b88a6a0c109b9523eb libcap-2.42.tar.xz -6313289e32f1d38a9df4770b014a2ca7 libffi-3.3.tar.gz -dad443d0911cf9f0f1bd90a334bc9004 libpipeline-1.5.3.tar.gz -d2f6cc43c6155e834228256a27d80163 libressl-3.2.1.tar.gz -1bfb9b923f2c1339b4d2ce1807064aa5 libtool-2.4.6.tar.xz -ee17763117af02637f9f98bfeee32a09 linux-5.8.1.tar.xz -c0061730d017ea593a09308edc547128 lzip-1.21.tar.gz -730bb15d96fffe47e148d1e09235af82 m4-1.4.18.tar.xz -fc7a67ea86ace13195b0bce683fd4469 make-4.3.tar.gz -4c8721faa54a4c950c640e5e5c713fb0 man-db-2.9.3.tar.xz -ee4161cbf5ba59be7419937e063252d9 man-pages-5.08.tar.xz -90c68b7fbb792d734f49957e63756b6c meson-0.55.1.tar.gz -4125404e41e482ec68282a2e687f6c73 mpc-1.1.0.tar.gz -bdd3d5efba9c17da8d83a35ec552baef mpfr-4.1.0.tar.xz -2720bdbed739e94c4d7acdc91c0cd9d6 musl-1.2.1.tar.gz -30b80ba5ae1823897cfbd0fc962c33c6 nano-5.1.tar.xz -e812da327b1c2214ac1aed440ea3ae8d ncurses-6.2.tar.gz -cf1d964113a171da42a8940e7607e71a ninja-1.10.0.tar.gz -78ad9937e4caadcba1526ef1853730d5 patch-2.7.6.tar.xz -3812cd9a096a72cb27767c7e2e40441c perl-5.32.0.tar.xz -2690c01ac1958a11ac33b080e75c63ca perl-cross-1.3.4.tar.gz -f6e931e319531b736fadc017f470e68a pkg-config-0.29.2.tar.gz -e8dc8455e573bdc40b8381d572bbb89b procps-ng-3.3.16.tar.xz -573bf80e6b0de86e7f307e310098cf86 psmisc-23.3.tar.xz -7e6c1f16aee3244a69aba6e438295ca3 readline-8.0.tar.gz -8e4f27ca6fff4c7c977c5f6cd76ee771 s6-linux-utils-2.5.1.2.tar.gz -47dba56e0b87f7c5fe278c83532c6e14 s6-portable-utils-2.2.2.4.tar.gz -6d906edfdb3202304059233f51f9a71d sed-4.8.tar.xz -4b05eff8a427cf50e615bda324b5bc45 shadow-4.8.1.tar.xz -da4c3f1adcd8a204ae9c5fcff4ce4a9a skalibs-2.9.2.1.tar.gz -83e38700a80a26e30b2df054e69956e5 tar-1.32.tar.xz -97c55573f8520bcab74e21bfd8d0aadc tcl8.6.10-src.tar.gz -d4c5d8cc84438c5993ec5163a59522a6 texinfo-6.7.tar.xz -5cd57477719833a3431fde4d882144cf tzdb-2020a.tar.lz -fe7c0f7e439f08970e462c9d44599903 util-linux-2.36.tar.xz -8f5a5022fa66d94b7b0934618dfa6350 v1.0.tar.gz -185975cc117dba8e6158cce847ba44d5 v1.1.tar.gz -bce0b5de0cf2519a74fbfacead60369d v1.2.7.tar.gz -3b3b1e3b131ea9a888aec8a557fbaedd v2.7.2.2.tar.gz -e07b0c1e71aa059cdfddc7c93c00c62a vim-8.2.1361.tar.gz -aa1621ec7013a19abab52a8aff04fe5b xz-5.2.5.tar.xz -85adef240c5f370b308da8c938951a68 zlib-1.2.11.tar.xz -dd0b53631303b8f972dafa6fd34beb0c zstd-1.4.5.tar.gz