summaryrefslogtreecommitdiff
path: root/bootstrap/stage2.sh
diff options
context:
space:
mode:
authordavidovski <git@davidovski.xyz>2022-04-07 21:04:30 +0100
committerdavidovski <git@davidovski.xyz>2022-04-07 21:04:30 +0100
commit7865aeacb7cb02d82c1276f64f07bfb968838ca6 (patch)
treeb887f5584ebd2ffcf9d1eefe7b1dacfd3d8108ef /bootstrap/stage2.sh
parent819fa943defac148c7970ef1ddf1ad4a6030396a (diff)
patched to work with sbase
Diffstat (limited to 'bootstrap/stage2.sh')
-rw-r--r--bootstrap/stage2.sh74
1 files changed, 37 insertions, 37 deletions
diff --git a/bootstrap/stage2.sh b/bootstrap/stage2.sh
index 161f799..c8409b2 100644
--- a/bootstrap/stage2.sh
+++ b/bootstrap/stage2.sh
@@ -21,26 +21,26 @@ toolchain_musl () {
make && 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
+ x86_64) rm $TOOLS/lib/ld-musl-x86_64.so.1
+ ln -s libc.so $TOOLS/lib/ld-musl-x86_64.so.1
export barch=$(uname -m)
;;
- i686) rm -v $TOOLS/lib/ld-musl-i386.so.1
- ln -sv libc.so $TOOLS/lib/ld-musl-i386.so.1
+ i686) rm $TOOLS/lib/ld-musl-i386.so.1
+ ln -s libc.so $TOOLS/lib/ld-musl-i386.so.1
export barch=i386
;;
- arm*) rm -v $TOOLS/lib/ld-musl-arm.so.1
- ln -sv libc.so $TOOLS/lib/ld-musl-arm.so.1
+ arm*) rm $TOOLS/lib/ld-musl-arm.so.1
+ ln -s libc.so $TOOLS/lib/ld-musl-arm.so.1
export barch=arm
;;
- aarch64) rm -v $TOOLS/lib/ld-musl-aarch64.so.1
- ln -sv libc.so $TOOLS/lib/ld-musl-aarch64.so.1
+ aarch64) rm $TOOLS/lib/ld-musl-aarch64.so.1
+ ln -s libc.so $TOOLS/lib/ld-musl-aarch64.so.1
export barch=$(uname -m)
;;
esac &&
# Create dynamic linker config
- mkdir -pv $TOOLS/etc &&
+ mkdir -p $TOOLS/etc &&
echo "$TOOLS/lib" > $TOOLS/etc/ld-musl-${barch}.path
unset barch
}
@@ -123,8 +123,8 @@ toolchain_adjustments () {
unset SPECFILE
GCC_INCLUDEDIR=`dirname $(${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}/*` &&
+ find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rf '{}' \; &&
+ rm -f `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` &&
unset GCC_INCLUDEDIR
echo 'int main(){}' > dummy.c
@@ -132,7 +132,7 @@ toolchain_adjustments () {
readelf -l a.out | grep ': /tools'
read confirm
- rm -v dummy.c a.out
+ rm dummy.c a.out
}
@@ -141,11 +141,11 @@ toolchain_binutils () {
# 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 -s lib $TOOLS/lib64 ;;
esac &&
# Configure in dedicated build directory
- mkdir -v build && cd build &&
+ mkdir build && cd build &&
../configure --prefix=$TOOLS \
--with-lib-path=$TOOLS/lib \
--build=${HOST} \
@@ -160,7 +160,7 @@ toolchain_binutils () {
make -C ld clean &&
make -C ld LIB_PATH=/usr/lib:/lib &&
- cp -v ld/ld-new $TOOLS/bin
+ cp ld/ld-new $TOOLS/bin
}
toolchain_gcc () {
@@ -169,9 +169,9 @@ toolchain_gcc () {
src "https://ftp.gnu.org/gnu/mpc/mpc-$MPC_VER.tar.gz"
src "https://ftp.gnu.org/gnu/gcc/gcc-$GCC_VER/gcc-$GCC_VER.tar.xz"
- mv -v ../mpfr-$MPFR_VER mpfr &&
- mv -v ../gmp-$GMP_VER gmp &&
- mv -v ../mpc-$MPC_VER mpc &&
+ mv ../mpfr-$MPFR_VER mpfr &&
+ mv ../gmp-$GMP_VER gmp &&
+ mv ../mpc-$MPC_VER mpc &&
patch_gcc &&
@@ -184,7 +184,7 @@ toolchain_gcc () {
# For i686/x86_64:
for file in gcc/config/linux/linux.h gcc/config/linux/linux64.h gcc/config/i386/linux.h gcc/config/i386/linux64.h
do
- cp -uv $file $file.orig
+ cp $file $file.orig
sed -e "s,/lib\(64\)\?\(32\)\?/ld,$TOOLS&,g" \
-e "s,/usr,$TOOLS,g" ${file}.orig > ${file}
echo "
@@ -196,7 +196,7 @@ toolchain_gcc () {
done &&
# Configure in dedicated build directory
- mkdir -v build && cd build &&
+ mkdir build && cd build &&
CFLAGS='-g0 -O0' \
CXXFLAGS=$CFLAGS \
../configure \
@@ -221,7 +221,7 @@ toolchain_gcc () {
PATH=$CROSS_TOOLS/bin:/bin:/usr/bin:$TOOLS/bin make &&
make install &&
- ln -sv gcc $TOOLS/bin/cc
+ ln -s gcc $TOOLS/bin/cc
}
toolchain_kernel_headers () {
@@ -229,10 +229,10 @@ toolchain_kernel_headers () {
make mrproper &&
ARCH=${ARCH} make headers &&
- cp -rv usr/include/* $TOOLS/include
+ cp -r usr/include/* $TOOLS/include
- find $TOOLS/include -name '.*.cmd' -exec rm -vf {} \;
- rm -v $TOOLS/include/Makefile
+ find $TOOLS/include -name '.*.cmd' -exec rm -f {} \;
+ rm $TOOLS/include/Makefile
}
toolchain_libstdcxx () {
@@ -242,14 +242,14 @@ toolchain_libstdcxx () {
src "https://ftp.gnu.org/gnu/mpc/mpc-$MPC_VER.tar.gz"
src "https://ftp.gnu.org/gnu/gcc/gcc-$GCC_VER/gcc-$GCC_VER.tar.xz"
- mv -v ../mpfr-$MPFR_VER mpfr &&
- mv -v ../gmp-$GMP_VER gmp &&
- mv -v ../mpc-$MPC_VER mpc &&
+ mv ../mpfr-$MPFR_VER mpfr &&
+ mv ../gmp-$GMP_VER gmp &&
+ mv ../mpc-$MPC_VER mpc &&
ptch "https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/patches/gcc-mlfs-$GCC_VER/fix_fenv_header.patch" &&
patch_gcc &&
- mkdir -v build && cd build &&
+ mkdir build && cd build &&
../libstdc++-v3/configure \
--target=${TARGET} \
--build=${HOST} \
@@ -283,9 +283,9 @@ toolchain_tcl () {
make && make install
- chmod -v u+w $TOOLS/lib/libtcl${TCL_VER%.*}.so
+ chmod u+w $TOOLS/lib/libtcl${TCL_VER%.*}.so
make install-private-headers
- ln -sv tclsh${TCL_VER%.*} $TOOLS/bin/tclsh
+ ln -s tclsh${TCL_VER%.*} $TOOLS/bin/tclsh
}
toolchain_expect () {
@@ -298,7 +298,7 @@ toolchain_expect () {
curl ${CURL_OPTS} "https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/files/config.guess-musl" > tclconfig/config.guess
curl ${CURL_OPTS} "https://raw.githubusercontent.com/dslm4515/Musl-LFS/master/files/config.sub-musl" > tclconfig/config.sub
- cp -v configure configure.orig
+ cp configure configure.orig
sed 's:/usr/local/bin:/bin:' configure.orig > configure
./configure --build=${HOST} \
@@ -428,7 +428,7 @@ toolchain_gawk () {
toolchain_gettext () {
src "https://ftp.barfooze.de/pub/sabotage/tarballs/gettext-tiny-$GETTEXT_TINY_VER.tar.xz"
make ${MJ} LIBINTL=MUSL prefix=$TOOLS
- cp -v msgfmt msgmerge xgettext $TOOLS/bin
+ cp msgfmt msgmerge xgettext $TOOLS/bin
}
toolchain_grep () {
@@ -470,14 +470,14 @@ toolchain_perl () {
src "https://github.com/arsv/perl-cross/releases/download/$PERL_CROSS_VER/perl-cross-$PERL_CROSS_VER.tar.gz"
src "https://www.cpan.org/src/5.0/perl-$PERL_VER.tar.xz"
- cp -vrf ../perl-cross-$PERL_CROSS_VER/* ./
+ cp -rf ../perl-cross-$PERL_CROSS_VER/* ./
./configure --prefix=${TOOLS} \
--target=${TARGET} &&
make &&
- cp -v perl cpan/podlators/scripts/pod2man ${TOOLS}/bin &&
- mkdir -pv ${TOOLS}/lib/perl5/$PERL_VER &&
- cp -Rv lib/* ${TOOLS}/lib/perl5/$PERL_VER
+ cp perl cpan/podlators/scripts/pod2man ${TOOLS}/bin &&
+ mkdir -p ${TOOLS}/lib/perl5/$PERL_VER &&
+ cp -r lib/* ${TOOLS}/lib/perl5/$PERL_VER
}
toolchain_texinfo () {
@@ -512,7 +512,7 @@ toolchain_strip () {
${TOOLS}/man \
${TOOLS}/doc
- find ${TOOLS}/lib ${TOOLS}/libexec -name \*.la -exec rm -rvf {} \;
+ find ${TOOLS}/lib ${TOOLS}/libexec -name \*.la -exec rm -rf {} \;
}
printf "${BLUE}building musl...\n${RESET}"