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
|
||||
echo ""
|
||||
|
||||
export BUILD_MACHINE_TRIPLET=$(gcc -dumpmachine)
|
||||
export TARGET_MACHINE_TRIPLET=$LFS_TGT
|
||||
|
||||
# Create the target directory
|
||||
mkdir -p "$LFS"
|
||||
export STEPS_DIR="$LFS/../steps/"
|
||||
|
|
@ -161,8 +164,8 @@ if [ ! -f "$STEPS_DIR/gcc-step1" ]; then
|
|||
|
||||
"../configure" \
|
||||
--target=$LFS_TGT \
|
||||
--host=$(../config.guess) \
|
||||
--build=$(../config.guess) \
|
||||
--host=${BUILD_MACHINE_TRIPLET} \
|
||||
--build=${BUILD_MACHINE_TRIPLET} \
|
||||
--prefix=$LFS_TOOLS \
|
||||
--with-glibc-version=2.40 \
|
||||
--with-sysroot=$LFS \
|
||||
|
|
@ -231,7 +234,7 @@ if [ ! -f "$STEPS_DIR/glibc" ]; then
|
|||
--prefix=/usr \
|
||||
--target=$LFS_TGT \
|
||||
--host=$LFS_TGT \
|
||||
--build=$(../scripts/config.guess) \
|
||||
--build=${BUILD_MACHINE_TRIPLET} \
|
||||
--with-headers=$LFS/usr/include \
|
||||
--with-binutils=$LFS_TOOLS/bin \
|
||||
--without-cvs \
|
||||
|
|
@ -315,8 +318,8 @@ if [ ! -f "$STEPS_DIR/gcc-step2" ]; then
|
|||
# ../configure is already done
|
||||
"../configure" \
|
||||
--target=$LFS_TGT \
|
||||
--host=$(../config.guess) \
|
||||
--build=$(../config.guess) \
|
||||
--host=${BUILD_MACHINE_TRIPLET} \
|
||||
--build=${BUILD_MACHINE_TRIPLET} \
|
||||
--prefix=$LFS_TOOLS \
|
||||
--with-glibc-version=2.40 \
|
||||
--with-sysroot=$LFS \
|
||||
|
|
@ -401,8 +404,8 @@ if [ ! -f "$STEPS_DIR/gcc-step3" ]; then
|
|||
|
||||
"../configure" \
|
||||
--target=$LFS_TGT \
|
||||
--host=$(../config.guess) \
|
||||
--build=$(../config.guess) \
|
||||
--host=${BUILD_MACHINE_TRIPLET} \
|
||||
--build=${BUILD_MACHINE_TRIPLET} \
|
||||
--prefix=$LFS_TOOLS \
|
||||
--with-glibc-version=2.40 \
|
||||
--with-sysroot=$LFS \
|
||||
|
|
@ -471,6 +474,7 @@ if [ ! -f "$STEPS_DIR/m4" ]; then
|
|||
|
||||
"../configure" \
|
||||
--prefix=/usr \
|
||||
--build=${BUILD_MACHINE_TRIPLET} \
|
||||
--host=$LFS_TGT
|
||||
|
||||
make -j 32
|
||||
|
|
@ -548,6 +552,7 @@ if [ ! -f "$STEPS_DIR/ncurses" ]; then
|
|||
--prefix=$LFS/usr \
|
||||
--with-shared \
|
||||
--host=${LFS_TGT} \
|
||||
--build=${BUILD_MACHINE_TRIPLET} \
|
||||
--without-debug \
|
||||
--disable-stripping \
|
||||
--without-ada \
|
||||
|
|
@ -578,11 +583,11 @@ if [ ! -f "$STEPS_DIR/bash" ]; then
|
|||
"../configure" \
|
||||
--prefix=$LFS \
|
||||
--host=${LFS_TGT} \
|
||||
--build=${BUILD_MACHINE_TRIPLET} \
|
||||
--without-bash-malloc \
|
||||
--enable-threads \
|
||||
--with-curses
|
||||
|
||||
|
||||
make -j 32
|
||||
make install
|
||||
|
||||
|
|
@ -628,6 +633,7 @@ if [ ! -f "$STEPS_DIR/check" ]; then
|
|||
"../configure" \
|
||||
--prefix=$LFS \
|
||||
--host=${LFS_TGT} \
|
||||
--build=${BUILD_MACHINE_TRIPLET} \
|
||||
--libdir=$LFS/lib
|
||||
|
||||
make -j 32
|
||||
|
|
@ -652,6 +658,7 @@ if [ ! -f "$STEPS_DIR/coreutils" ]; then
|
|||
"../configure" \
|
||||
--prefix=$LFS \
|
||||
--host=${LFS_TGT} \
|
||||
--build=${BUILD_MACHINE_TRIPLET} \
|
||||
--enable-install-program=hostname \
|
||||
--cache-file=config.cache
|
||||
|
||||
|
|
@ -677,6 +684,7 @@ if [ ! -f "$STEPS_DIR/diffutils" ]; then
|
|||
"../configure" \
|
||||
--prefix=$LFS \
|
||||
--host=${LFS_TGT} \
|
||||
--build=${BUILD_MACHINE_TRIPLET} \
|
||||
--enable-install-program=hostname \
|
||||
--cache-file=config.cache
|
||||
|
||||
|
|
@ -688,6 +696,84 @@ if [ ! -f "$STEPS_DIR/diffutils" ]; then
|
|||
touch "$STEPS_DIR/diffutils"
|
||||
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/*
|
||||
|
||||
# build libcap2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue