Builds up to audit
This commit is contained in:
parent
2097a50b76
commit
c300ead610
2 changed files with 58 additions and 4 deletions
10
build-virtio.sh
Executable file
10
build-virtio.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
export KERNEL_ARCH="x86_64"
|
||||||
|
export TARGET_TRIPLET_ARCH="x86_64"
|
||||||
|
export TARGET_TRIPLET_VENDOR="lfs"
|
||||||
|
export TARGET_TRIPLET_OS="linux"
|
||||||
|
export TARGET_TRIPLET_GNUEABI="gnu"
|
||||||
|
|
||||||
|
export TARGET_ADDITIONAL_CFLAGS="-fPIC"
|
||||||
|
|
||||||
|
bash build.sh
|
||||||
52
build.sh
52
build.sh
|
|
@ -92,8 +92,8 @@ setup_toolchain() {
|
||||||
export STRIP="$LFS_TGT-strip"
|
export STRIP="$LFS_TGT-strip"
|
||||||
export OBJDUMP="$LFS_TGT-objdump"
|
export OBJDUMP="$LFS_TGT-objdump"
|
||||||
export READELF="$LFS_TGT-readelf"
|
export READELF="$LFS_TGT-readelf"
|
||||||
export CFLAGS=" -U_FORTIFY_SOURCE -O2 -L$LFS_TOOLS/lib -L$LFS/usr/lib -I$LFS_TOOLS/include -I$LFS_TOOLS/$LFS_TGT/include"
|
export CFLAGS=" $TARGET_ADDITIONAL_CFLAGS -U_FORTIFY_SOURCE -O2 -L$LFS_TOOLS/lib -L$LFS/usr/lib -I$LFS_TOOLS/include -I$LFS_TOOLS/$LFS_TGT/include"
|
||||||
export CPPFLAGS=" -U_FORTIFY_SOURCE -O2 -L$LFS_TOOLS/lib -L$LFS/usr/lib -I$LFS_TOOLS/include -I$LFS_TOOLS/$LFS_TGT/include -I$LFS_TOOLS/$LFS_TGT/include/c++/14.2.0/ -I$LFS_TOOLS/$LFS_TGT/include/c++/14.2.0/$LFS_TGT"
|
export CPPFLAGS=" $TARGET_ADDITIONAL_CFLAGS -U_FORTIFY_SOURCE -O2 -L$LFS_TOOLS/lib -L$LFS/usr/lib -I$LFS_TOOLS/include -I$LFS_TOOLS/$LFS_TGT/include -I$LFS_TOOLS/$LFS_TGT/include/c++/14.2.0/ -I$LFS_TOOLS/$LFS_TGT/include/c++/14.2.0/$LFS_TGT"
|
||||||
export LDFLAGS=" -L$LFS/usr/lib -L$LFS_TOOLS/lib"
|
export LDFLAGS=" -L$LFS/usr/lib -L$LFS_TOOLS/lib"
|
||||||
export LD_LIBRARY_PATH_old="$LD_LIBRARY_PATH"
|
export LD_LIBRARY_PATH_old="$LD_LIBRARY_PATH"
|
||||||
export LD_LIBRARY_PATH="$LFS_TOOLS/lib $LFS/usr/lib"
|
export LD_LIBRARY_PATH="$LFS_TOOLS/lib $LFS/usr/lib"
|
||||||
|
|
@ -459,6 +459,46 @@ if [ ! -f "$STEPS_DIR/gcc-step3" ]; then
|
||||||
touch "$STEPS_DIR/gcc-step3"
|
touch "$STEPS_DIR/gcc-step3"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$STEPS_DIR/gcc-final" ]; then
|
||||||
|
bash unpack-gcc.sh "$LFS_BUILD/"
|
||||||
|
cd "$LFS_BUILD/gcc"
|
||||||
|
|
||||||
|
mkdir -vp build-final
|
||||||
|
cd build-final
|
||||||
|
|
||||||
|
# ../configure is already done
|
||||||
|
"../configure" \
|
||||||
|
--target=$LFS_TGT \
|
||||||
|
--host=${BUILD_MACHINE_TRIPLET} \
|
||||||
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
|
--prefix=$LFS_TOOLS \
|
||||||
|
--with-glibc-version=2.40 \
|
||||||
|
--with-sysroot=$LFS \
|
||||||
|
--enable-c99 \
|
||||||
|
--enable-long-long \
|
||||||
|
--enable-default-pie \
|
||||||
|
--enable-default-ssp \
|
||||||
|
--enable-nls \
|
||||||
|
--disable-multilib \
|
||||||
|
--enable-libatomic \
|
||||||
|
--enable-libmudflap \
|
||||||
|
--enable-libgomp \
|
||||||
|
--enable-libquadmath \
|
||||||
|
--enable-libquadmath-support \
|
||||||
|
--enable-libssp \
|
||||||
|
--enable-libvtv \
|
||||||
|
--enable-libstdcxx \
|
||||||
|
--enable-decimal-float \
|
||||||
|
--enable-languages=c,c++
|
||||||
|
|
||||||
|
make -j 32 # if build fails add --disable-libsanitizer
|
||||||
|
make -j 32 install
|
||||||
|
|
||||||
|
cd "$BASE_DIR"
|
||||||
|
#rm -rf "$LFS_BUILD/gcc/build"
|
||||||
|
touch "$STEPS_DIR/gcc-final"
|
||||||
|
fi
|
||||||
|
|
||||||
## finish the host toolchain
|
## finish the host toolchain
|
||||||
#host_toolchain
|
#host_toolchain
|
||||||
#bash "build-host-tools.sh"
|
#bash "build-host-tools.sh"
|
||||||
|
|
@ -1258,7 +1298,7 @@ if [ ! -f "$STEPS_DIR/pcre2" ]; then
|
||||||
rm -rf "$LFS_BUILD/pcre2"
|
rm -rf "$LFS_BUILD/pcre2"
|
||||||
touch "$STEPS_DIR/pcre2"
|
touch "$STEPS_DIR/pcre2"
|
||||||
fi
|
fi
|
||||||
exit 0
|
|
||||||
# build swig
|
# build swig
|
||||||
if [ ! -f "$STEPS_DIR/swig" ]; then
|
if [ ! -f "$STEPS_DIR/swig" ]; then
|
||||||
if [ ! -d "$LFS_BUILD/swig" ]; then
|
if [ ! -d "$LFS_BUILD/swig" ]; then
|
||||||
|
|
@ -1295,6 +1335,10 @@ if [ ! -f "$STEPS_DIR/libcap-ng" ]; then
|
||||||
fi
|
fi
|
||||||
cd "$LFS_BUILD/libcap-ng"
|
cd "$LFS_BUILD/libcap-ng"
|
||||||
|
|
||||||
|
# this workaround comes straight from archlinux
|
||||||
|
# make stupid autotools happy -_-
|
||||||
|
touch NEWS
|
||||||
|
|
||||||
autoreconf -fiv
|
autoreconf -fiv
|
||||||
|
|
||||||
mkdir -vp build-$LFS_TGT
|
mkdir -vp build-$LFS_TGT
|
||||||
|
|
@ -1305,7 +1349,7 @@ if [ ! -f "$STEPS_DIR/libcap-ng" ]; then
|
||||||
--with-sysroot=${LFS} \
|
--with-sysroot=${LFS} \
|
||||||
--host=${LFS_TGT} \
|
--host=${LFS_TGT} \
|
||||||
--build=${BUILD_MACHINE_TRIPLET} \
|
--build=${BUILD_MACHINE_TRIPLET} \
|
||||||
--prefix="/usr" \
|
--prefix=/usr \
|
||||||
--without-python \
|
--without-python \
|
||||||
--without-python3 \
|
--without-python3 \
|
||||||
--enable-static=no \
|
--enable-static=no \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue