cross build more software
This commit is contained in:
parent
ca870daf8d
commit
589c219e38
1 changed files with 174 additions and 88 deletions
260
build.sh
260
build.sh
|
|
@ -65,6 +65,9 @@ echo ""
|
||||||
make --version
|
make --version
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
export BUILD_MACHINE_TRIPLET=$(gcc -dumpmachine)
|
||||||
|
export TARGET_MACHINE_TRIPLET=$LFS_TGT
|
||||||
|
|
||||||
# Create the target directory
|
# Create the target directory
|
||||||
mkdir -p "$LFS"
|
mkdir -p "$LFS"
|
||||||
export STEPS_DIR="$LFS/../steps/"
|
export STEPS_DIR="$LFS/../steps/"
|
||||||
|
|
@ -159,32 +162,32 @@ if [ ! -f "$STEPS_DIR/gcc-step1" ]; then
|
||||||
mkdir -vp build
|
mkdir -vp build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
"../configure" \
|
"../configure" \
|
||||||
--target=$LFS_TGT \
|
--target=$LFS_TGT \
|
||||||
--host=$(../config.guess) \
|
--host=${BUILD_MACHINE_TRIPLET} \
|
||||||
--build=$(../config.guess) \
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--prefix=$LFS_TOOLS \
|
--prefix=$LFS_TOOLS \
|
||||||
--with-glibc-version=2.40 \
|
--with-glibc-version=2.40 \
|
||||||
--with-sysroot=$LFS \
|
--with-sysroot=$LFS \
|
||||||
--with-newlib \
|
--with-newlib \
|
||||||
--disable-gdbtk \
|
--disable-gdbtk \
|
||||||
--disable-shared \
|
--disable-shared \
|
||||||
--without-headers \
|
--without-headers \
|
||||||
--enable-default-pie \
|
--enable-default-pie \
|
||||||
--enable-default-ssp \
|
--enable-default-ssp \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
--disable-threads \
|
--disable-threads \
|
||||||
--disable-libatomic \
|
--disable-libatomic \
|
||||||
--disable-libmudflap \
|
--disable-libmudflap \
|
||||||
--disable-libgomp \
|
--disable-libgomp \
|
||||||
--disable-libquadmath \
|
--disable-libquadmath \
|
||||||
--disable-libquadmath-support \
|
--disable-libquadmath-support \
|
||||||
--disable-libssp \
|
--disable-libssp \
|
||||||
--disable-libvtv \
|
--disable-libvtv \
|
||||||
--disable-libstdcxx \
|
--disable-libstdcxx \
|
||||||
--disable-decimal-float \
|
--disable-decimal-float \
|
||||||
--disable-libsanitizer \
|
--disable-libsanitizer \
|
||||||
--enable-languages=c
|
--enable-languages=c
|
||||||
make -j 32 all-gcc # if build fails add --disable-libsanitizer
|
make -j 32 all-gcc # if build fails add --disable-libsanitizer
|
||||||
make -j 32 install-gcc
|
make -j 32 install-gcc
|
||||||
|
|
@ -231,7 +234,7 @@ if [ ! -f "$STEPS_DIR/glibc" ]; then
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--target=$LFS_TGT \
|
--target=$LFS_TGT \
|
||||||
--host=$LFS_TGT \
|
--host=$LFS_TGT \
|
||||||
--build=$(../scripts/config.guess) \
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--with-headers=$LFS/usr/include \
|
--with-headers=$LFS/usr/include \
|
||||||
--with-binutils=$LFS_TOOLS/bin \
|
--with-binutils=$LFS_TOOLS/bin \
|
||||||
--without-cvs \
|
--without-cvs \
|
||||||
|
|
@ -313,29 +316,29 @@ if [ ! -f "$STEPS_DIR/gcc-step2" ]; then
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
# ../configure is already done
|
# ../configure is already done
|
||||||
"../configure" \
|
"../configure" \
|
||||||
--target=$LFS_TGT \
|
--target=$LFS_TGT \
|
||||||
--host=$(../config.guess) \
|
--host=${BUILD_MACHINE_TRIPLET} \
|
||||||
--build=$(../config.guess) \
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--prefix=$LFS_TOOLS \
|
--prefix=$LFS_TOOLS \
|
||||||
--with-glibc-version=2.40 \
|
--with-glibc-version=2.40 \
|
||||||
--with-sysroot=$LFS \
|
--with-sysroot=$LFS \
|
||||||
--enable-c99 \
|
--enable-c99 \
|
||||||
--enable-long-long \
|
--enable-long-long \
|
||||||
--enable-default-pie \
|
--enable-default-pie \
|
||||||
--enable-default-ssp \
|
--enable-default-ssp \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
--disable-libatomic \
|
--disable-libatomic \
|
||||||
--disable-libmudflap \
|
--disable-libmudflap \
|
||||||
--disable-libgomp \
|
--disable-libgomp \
|
||||||
--disable-libquadmath \
|
--disable-libquadmath \
|
||||||
--disable-libquadmath-support \
|
--disable-libquadmath-support \
|
||||||
--disable-libssp \
|
--disable-libssp \
|
||||||
--disable-libvtv \
|
--disable-libvtv \
|
||||||
--disable-libstdcxx \
|
--disable-libstdcxx \
|
||||||
--disable-decimal-float \
|
--disable-decimal-float \
|
||||||
--disable-libsanitizer \
|
--disable-libsanitizer \
|
||||||
--enable-languages=c
|
--enable-languages=c
|
||||||
|
|
||||||
# Repeat this
|
# Repeat this
|
||||||
|
|
@ -399,23 +402,23 @@ if [ ! -f "$STEPS_DIR/gcc-step3" ]; then
|
||||||
fi
|
fi
|
||||||
cd "$LFS_BUILD/gcc/build"
|
cd "$LFS_BUILD/gcc/build"
|
||||||
|
|
||||||
"../configure" \
|
"../configure" \
|
||||||
--target=$LFS_TGT \
|
--target=$LFS_TGT \
|
||||||
--host=$(../config.guess) \
|
--host=${BUILD_MACHINE_TRIPLET} \
|
||||||
--build=$(../config.guess) \
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--prefix=$LFS_TOOLS \
|
--prefix=$LFS_TOOLS \
|
||||||
--with-glibc-version=2.40 \
|
--with-glibc-version=2.40 \
|
||||||
--with-sysroot=$LFS \
|
--with-sysroot=$LFS \
|
||||||
--enable-c99 \
|
--enable-c99 \
|
||||||
--enable-long-long \
|
--enable-long-long \
|
||||||
--enable-default-pie \
|
--enable-default-pie \
|
||||||
--enable-default-ssp \
|
--enable-default-ssp \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
--disable-libgomp \
|
--disable-libgomp \
|
||||||
--disable-libquadmath \
|
--disable-libquadmath \
|
||||||
--disable-libquadmath-support \
|
--disable-libquadmath-support \
|
||||||
--disable-decimal-float \
|
--disable-decimal-float \
|
||||||
--enable-languages=c,c++
|
--enable-languages=c,c++
|
||||||
|
|
||||||
# Reebuild everything now that we have bootstrapped an initial gcc and glibc
|
# Reebuild everything now that we have bootstrapped an initial gcc and glibc
|
||||||
|
|
@ -469,8 +472,9 @@ if [ ! -f "$STEPS_DIR/m4" ]; then
|
||||||
|
|
||||||
echo "rootsbindir=/usr/sbin" > configparms
|
echo "rootsbindir=/usr/sbin" > configparms
|
||||||
|
|
||||||
"../configure" \
|
"../configure" \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--host=$LFS_TGT
|
--host=$LFS_TGT
|
||||||
|
|
||||||
make -j 32
|
make -j 32
|
||||||
|
|
@ -544,15 +548,16 @@ if [ ! -f "$STEPS_DIR/ncurses" ]; then
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
# --build=${CLFS_HOST} \
|
# --build=${CLFS_HOST} \
|
||||||
"../configure" \
|
"../configure" \
|
||||||
--prefix=$LFS/usr \
|
--prefix=$LFS/usr \
|
||||||
--with-shared \
|
--with-shared \
|
||||||
--host=${LFS_TGT} \
|
--host=${LFS_TGT} \
|
||||||
--without-debug \
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--disable-stripping \
|
--without-debug \
|
||||||
--without-ada \
|
--disable-stripping \
|
||||||
--enable-overwrite \
|
--without-ada \
|
||||||
--with-build-cc=gcc \
|
--enable-overwrite \
|
||||||
|
--with-build-cc=gcc \
|
||||||
--libdir=$LFS/usr/lib
|
--libdir=$LFS/usr/lib
|
||||||
|
|
||||||
make -j 32
|
make -j 32
|
||||||
|
|
@ -575,14 +580,14 @@ if [ ! -f "$STEPS_DIR/bash" ]; then
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
# --build=${CLFS_HOST} \
|
# --build=${CLFS_HOST} \
|
||||||
"../configure" \
|
"../configure" \
|
||||||
--prefix=$LFS \
|
--prefix=$LFS \
|
||||||
--host=${LFS_TGT} \
|
--host=${LFS_TGT} \
|
||||||
--without-bash-malloc \
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--enable-threads \
|
--without-bash-malloc \
|
||||||
|
--enable-threads \
|
||||||
--with-curses
|
--with-curses
|
||||||
|
|
||||||
|
|
||||||
make -j 32
|
make -j 32
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
|
@ -625,9 +630,10 @@ if [ ! -f "$STEPS_DIR/check" ]; then
|
||||||
mkdir -vp build
|
mkdir -vp build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
"../configure" \
|
"../configure" \
|
||||||
--prefix=$LFS \
|
--prefix=$LFS \
|
||||||
--host=${LFS_TGT} \
|
--host=${LFS_TGT} \
|
||||||
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--libdir=$LFS/lib
|
--libdir=$LFS/lib
|
||||||
|
|
||||||
make -j 32
|
make -j 32
|
||||||
|
|
@ -652,6 +658,7 @@ if [ ! -f "$STEPS_DIR/coreutils" ]; then
|
||||||
"../configure" \
|
"../configure" \
|
||||||
--prefix=$LFS \
|
--prefix=$LFS \
|
||||||
--host=${LFS_TGT} \
|
--host=${LFS_TGT} \
|
||||||
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--enable-install-program=hostname \
|
--enable-install-program=hostname \
|
||||||
--cache-file=config.cache
|
--cache-file=config.cache
|
||||||
|
|
||||||
|
|
@ -677,6 +684,7 @@ if [ ! -f "$STEPS_DIR/diffutils" ]; then
|
||||||
"../configure" \
|
"../configure" \
|
||||||
--prefix=$LFS \
|
--prefix=$LFS \
|
||||||
--host=${LFS_TGT} \
|
--host=${LFS_TGT} \
|
||||||
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--enable-install-program=hostname \
|
--enable-install-program=hostname \
|
||||||
--cache-file=config.cache
|
--cache-file=config.cache
|
||||||
|
|
||||||
|
|
@ -688,6 +696,84 @@ if [ ! -f "$STEPS_DIR/diffutils" ]; then
|
||||||
touch "$STEPS_DIR/diffutils"
|
touch "$STEPS_DIR/diffutils"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# build file
|
||||||
|
if [ ! -f "$STEPS_DIR/file" ]; then
|
||||||
|
if [ ! -d "$LFS_BUILD/file" ]; then
|
||||||
|
tar -xf "$BASE_DIR/sources/file-5.46.tar.gz"
|
||||||
|
mv "file-5.46" "$LFS_BUILD/file"
|
||||||
|
fi
|
||||||
|
cd "$LFS_BUILD/file"
|
||||||
|
|
||||||
|
mkdir -vp build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
"../configure" \
|
||||||
|
--prefix=$LFS \
|
||||||
|
--host=${LFS_TGT} \
|
||||||
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
|
--libdir=$LFS/lib
|
||||||
|
|
||||||
|
make -j 32
|
||||||
|
make -j 32 install
|
||||||
|
|
||||||
|
cd "$BASE_DIR"
|
||||||
|
|
||||||
|
touch "$STEPS_DIR/file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# build findutils
|
||||||
|
if [ ! -f "$STEPS_DIR/findutils" ]; then
|
||||||
|
if [ ! -d "$LFS_BUILD/findutils" ]; then
|
||||||
|
tar -xf "$BASE_DIR/sources/findutils-4.10.0.tar.xz"
|
||||||
|
mv "findutils-4.10.0" "$LFS_BUILD/findutils"
|
||||||
|
fi
|
||||||
|
cd "$LFS_BUILD/findutils"
|
||||||
|
|
||||||
|
mkdir -vp build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
echo "gl_cv_func_wcwidth_works=yes" > config.cache
|
||||||
|
echo "ac_cv_func_fnmatch_gnu=yes" >> config.cache
|
||||||
|
|
||||||
|
"../configure" \
|
||||||
|
--prefix=$LFS \
|
||||||
|
--host=${LFS_TGT} \
|
||||||
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
|
--cache-file=config.cache
|
||||||
|
|
||||||
|
make -j 32
|
||||||
|
make -j 32 install
|
||||||
|
|
||||||
|
cd "$BASE_DIR"
|
||||||
|
|
||||||
|
touch "$STEPS_DIR/findutils"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# build gawk
|
||||||
|
if [ ! -f "$STEPS_DIR/gawk" ]; then
|
||||||
|
if [ ! -d "$LFS_BUILD/gawk" ]; then
|
||||||
|
tar -xf "$BASE_DIR/sources/gawk-5.3.1.tar.xz"
|
||||||
|
mv "gawk-5.3.1" "$LFS_BUILD/gawk"
|
||||||
|
fi
|
||||||
|
cd "$LFS_BUILD/gawk"
|
||||||
|
|
||||||
|
mkdir -vp build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
"../configure" \
|
||||||
|
--prefix=$LFS \
|
||||||
|
--host=${LFS_TGT} \
|
||||||
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
|
--cache-file=config.cache
|
||||||
|
|
||||||
|
make -j 32
|
||||||
|
make -j 32 install
|
||||||
|
|
||||||
|
cd "$BASE_DIR"
|
||||||
|
|
||||||
|
touch "$STEPS_DIR/gawk"
|
||||||
|
fi
|
||||||
|
|
||||||
#"$LFS_TGT-strip" --strip-unneeded $LFS/bin/*
|
#"$LFS_TGT-strip" --strip-unneeded $LFS/bin/*
|
||||||
|
|
||||||
# build libcap2
|
# build libcap2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue