cross build more software
This commit is contained in:
parent
ca870daf8d
commit
589c219e38
1 changed files with 174 additions and 88 deletions
102
build.sh
102
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/"
|
||||||
|
|
@ -161,8 +164,8 @@ if [ ! -f "$STEPS_DIR/gcc-step1" ]; then
|
||||||
|
|
||||||
"../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 \
|
||||||
|
|
@ -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 \
|
||||||
|
|
@ -315,8 +318,8 @@ if [ ! -f "$STEPS_DIR/gcc-step2" ]; then
|
||||||
# ../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 \
|
||||||
|
|
@ -401,8 +404,8 @@ if [ ! -f "$STEPS_DIR/gcc-step3" ]; then
|
||||||
|
|
||||||
"../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 \
|
||||||
|
|
@ -471,6 +474,7 @@ if [ ! -f "$STEPS_DIR/m4" ]; then
|
||||||
|
|
||||||
"../configure" \
|
"../configure" \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--host=$LFS_TGT
|
--host=$LFS_TGT
|
||||||
|
|
||||||
make -j 32
|
make -j 32
|
||||||
|
|
@ -548,6 +552,7 @@ if [ ! -f "$STEPS_DIR/ncurses" ]; then
|
||||||
--prefix=$LFS/usr \
|
--prefix=$LFS/usr \
|
||||||
--with-shared \
|
--with-shared \
|
||||||
--host=${LFS_TGT} \
|
--host=${LFS_TGT} \
|
||||||
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--without-debug \
|
--without-debug \
|
||||||
--disable-stripping \
|
--disable-stripping \
|
||||||
--without-ada \
|
--without-ada \
|
||||||
|
|
@ -578,11 +583,11 @@ if [ ! -f "$STEPS_DIR/bash" ]; then
|
||||||
"../configure" \
|
"../configure" \
|
||||||
--prefix=$LFS \
|
--prefix=$LFS \
|
||||||
--host=${LFS_TGT} \
|
--host=${LFS_TGT} \
|
||||||
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--without-bash-malloc \
|
--without-bash-malloc \
|
||||||
--enable-threads \
|
--enable-threads \
|
||||||
--with-curses
|
--with-curses
|
||||||
|
|
||||||
|
|
||||||
make -j 32
|
make -j 32
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
|
@ -628,6 +633,7 @@ if [ ! -f "$STEPS_DIR/check" ]; then
|
||||||
"../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