improve build, but still broken at audit

This commit is contained in:
Denis Benato 2024-12-10 02:11:45 +01:00
parent c300ead610
commit a1cf134be2
2 changed files with 24 additions and 4 deletions

View file

@ -9,6 +9,7 @@ export CXX_native="$CXX"
export AS_native="$AS"
export LD_native="$LD"
export AR_native="$AR"
export NM_native="$NM"
export RANLIB_native="$RANLIB"
export STRIP_native="$STRIP"
export OBJDUMP_native="$OBJDUMP"
@ -88,6 +89,7 @@ setup_toolchain() {
export AS="$LFS_TGT-as"
export LD="$LFS_TGT-ld"
export AR="$LFS_TGT-ar"
export NM="$LFS_TGT-nm"
export RANLIB="$LFS_TGT-ranlib"
export STRIP="$LFS_TGT-strip"
export OBJDUMP="$LFS_TGT-objdump"
@ -109,6 +111,7 @@ host_toolchain() {
export AS="$AS_native"
export LD="$LD_native"
export AR="$AR_native"
export NM="$NM_native"
export RANLIB="$RANLIB_native"
export STRIP="$STRIP_native"
export OBJDUMP="$OBJDUMP_native"
@ -489,7 +492,7 @@ if [ ! -f "$STEPS_DIR/gcc-final" ]; then
--enable-libvtv \
--enable-libstdcxx \
--enable-decimal-float \
--enable-languages=c,c++
--enable-languages=c,c++,objc,go
make -j 32 # if build fails add --disable-libsanitizer
make -j 32 install
@ -509,7 +512,15 @@ setup_toolchain
# test the cross toolchain
which -- $LFS_TGT-as || echo $LFS_TGT-as is not in the PATH
echo 'int main(){}' | "$CC" $CPPFLAGS -xc -
echo '
#include <stdatomic.h>
atomic_uint test;
int main(){
return 0;
}
' | "$CC" $CFLAGS -std=c11 -xc -latomic -
"$READELF" -l a.out | grep ld-linux
rm -v a.out
@ -1280,6 +1291,7 @@ if [ ! -f "$STEPS_DIR/pcre2" ]; then
--build=${BUILD_MACHINE_TRIPLET} \
--prefix=${LFS}/usr \
--enable-shared \
--disable-shared \
--enable-jit \
--enable-pcre2-16 \
--enable-pcre2-32 \
@ -1362,7 +1374,7 @@ if [ ! -f "$STEPS_DIR/libcap-ng" ]; then
rm -rf "$LFS_BUILD/libcap-ng"
touch "$STEPS_DIR/libcap-ng"
fi
exit 0
# build audit
if [ ! -f "$STEPS_DIR/audit-userspace" ]; then
if [ ! -d "$LFS_BUILD/audit-userspace" ]; then
@ -1376,6 +1388,7 @@ if [ ! -f "$STEPS_DIR/audit-userspace" ]; then
mkdir -vp build-$LFS_TGT
cd build-$LFS_TGT
# --with-arm
# --enable-zos-remote requires libldap
"../configure" \
--with-sysroot=${LFS} \
@ -1389,7 +1402,7 @@ if [ ! -f "$STEPS_DIR/audit-userspace" ]; then
--runstatedir=/run \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--with-apparmor=yes \
--with-apparmor=no \
--with-io_uring=yes \
--with-libcap-ng=yes \
--with-python3=no \

7
testvec.c Normal file
View file

@ -0,0 +1,7 @@
#include <stdatomic.h>
atomic_uint test;
int main(){
return 0;
}