Build tested again

This commit is contained in:
Denis Benato 2024-12-11 21:52:46 +01:00
parent 3c6f992e10
commit 07db72ac9d
3 changed files with 75 additions and 3 deletions

View file

@ -5,4 +5,14 @@ export TARGET_TRIPLET_VENDOR="lfs"
export TARGET_TRIPLET_OS="linux"
export TARGET_TRIPLET_GNUEABI="gnueabi"
# Pick one:
#linux-aarch64 linux-alpha-gcc linux-aout linux-arm64ilp32
#linux-arm64ilp32-clang linux-armv4 linux-c64xplus linux-elf linux-generic32
#linux-generic64 linux-ia64 linux-latomic linux-mips32 linux-mips64 linux-ppc
#linux-ppc64 linux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32 linux-x86
#linux-x86-clang linux-x86-latomic linux-x86_64 linux-x86_64-clang
#linux32-riscv32 linux32-s390x linux64-loongarch64 linux64-mips64
#linux64-riscv64 linux64-s390x linux64-sparcv9
export OPENSSL_ARCH="linux-latomic"
bash build.sh

View file

@ -7,4 +7,14 @@ export TARGET_TRIPLET_GNUEABI="gnu"
export TARGET_ADDITIONAL_CFLAGS="-fPIC"
# Pick one:
#linux-aarch64 linux-alpha-gcc linux-aout linux-arm64ilp32
#linux-arm64ilp32-clang linux-armv4 linux-c64xplus linux-elf linux-generic32
#linux-generic64 linux-ia64 linux-latomic linux-mips32 linux-mips64 linux-ppc
#linux-ppc64 linux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32 linux-x86
#linux-x86-clang linux-x86-latomic linux-x86_64 linux-x86_64-clang
#linux32-riscv32 linux32-s390x linux64-loongarch64 linux64-mips64
#linux64-riscv64 linux64-s390x linux64-sparcv9
export OPENSSL_ARCH="linux-x86_64"
bash build.sh

View file

@ -605,7 +605,6 @@ if [ ! -f "$STEPS_DIR/zlib" ]; then
"../configure" \
--prefix=/usr \
--enable-static=no \
--enable-shared
make -j 32
@ -618,6 +617,36 @@ if [ ! -f "$STEPS_DIR/zlib" ]; then
touch "$STEPS_DIR/zlib"
fi
# build openssl
if [ ! -f "$STEPS_DIR/openssl" ]; then
if [ ! -d "$LFS_BUILD/openssl" ]; then
tar -xf "$BASE_DIR/sources/openssl-3.4.0.tar.gz"
mv "openssl-3.4.0" "$LFS_BUILD/openssl"
cd "$LFS_BUILD/openssl"
cp $BASE_DIR/sources/openssl-ca-dir.patch .
patch -Np1 -i "./openssl-ca-dir.patch"
fi
cd "$LFS_BUILD/openssl"
mkdir -vp build-$LFS_TGT
cd build-$LFS_TGT
# TODO: # enable-ec_nistp_64_gcc_128
"../Configure" \
--prefix=/usr \
--openssldir=/etc/ssl \
--libdir=/usr/lib \
shared zlib enable-ktls "${OPENSSL_ARCH}"
make -j 32 depend apps/CA.pl
make -j 32 all
make -j 32 DESTDIR="$LFS" MANDIR=/usr/share/man MANSUFFIX=ssl install_sw install_ssldirs install_man_docs
cd "$BASE_DIR"
rm -rf "$LFS_BUILD/openssl"
touch "$STEPS_DIR/openssl"
fi
# build libxcrypt
if [ ! -f "$STEPS_DIR/libxcrypt" ]; then
if [ ! -d "$LFS_BUILD/libxcrypt" ]; then
@ -679,6 +708,7 @@ if [ ! -f "$STEPS_DIR/ncurses" ]; then
# --with-cxx-binding no c++?
# --with-cxx-shared no c++?
# --without-normal will make readline error
# --disable-stripping # this must go away
"../configure" \
--prefix=/usr \
@ -686,9 +716,10 @@ if [ ! -f "$STEPS_DIR/ncurses" ]; then
--localstatedir=/var \
--libdir=/usr/lib \
--sbindir=/usr/bin \
--mandir=/usr/share/man \
--with-manpage-format=normal \
--disable-stripping \
--with-shared \
--without-normal \
--host=${LFS_TGT} \
--build=${BUILD_MACHINE_TRIPLET} \
--without-debug \
@ -697,6 +728,7 @@ if [ ! -f "$STEPS_DIR/ncurses" ]; then
--disable-setuid-environ \
--disable-root-environ \
--disable-root-access \
--with-versioned-syms \
--without-ada \
--enable-overwrite \
--with-build-cc=gcc \
@ -705,6 +737,26 @@ if [ ! -f "$STEPS_DIR/ncurses" ]; then
make -j 32
make -j 32 DESTDIR="$LFS" install
# fool packages looking to link to non-wide-character ncurses libraries
for lib in ncurses ncurses++ form panel menu; do
if [ -f "$LFS/usr/lib/lib${lib}.so" ]; then
printf "INPUT(-l%sw)\n" "${lib}" > "$LFS/usr/lib/lib${lib}.so"
ln -sv ${lib}w.pc "$LFS/usr/lib/pkgconfig/${lib}.pc"
fi
done
# some packages look for -lcurses during build
printf 'INPUT(-lncursesw)\n' > "$LFS/usr/lib/libcursesw.so"
ln -sv libncurses.so "$LFS/usr/lib/libcurses.so"
# tic and ticinfo functionality is built in by default
# make sure that anything linking against it links against libncursesw.so instead
for lib in tic tinfo; do
#printf "INPUT(libncursesw.so.%s)\n" "${_pkgver:0:1}" > "$LFS/usr/lib/lib${lib}.so"
#ln -sv libncursesw.so.${pkgver:0:1} "$pkgdir/usr/lib/lib${lib}.so.${_pkgver:0:1}"
ln -sv ncursesw.pc "$LFS/usr/lib/pkgconfig/${lib}.pc"
done
cd "$BASE_DIR"
rm -rf "$LFS_BUILD/ncurses"
touch "$STEPS_DIR/ncurses"
@ -721,12 +773,12 @@ if [ ! -f "$STEPS_DIR/readline" ]; then
mkdir -vp build-$LFS_TGT
cd build-$LFS_TGT
# --with-curses \
"../configure" \
--with-sysroot=${LFS} \
--host=${LFS_TGT} \
--build=${BUILD_MACHINE_TRIPLET} \
--prefix=/usr \
--with-curses \
--enable-static=no \
--cache-file=config.cache