attr built
This commit is contained in:
parent
779959bf5c
commit
1fc2e0af3e
1 changed files with 88 additions and 27 deletions
113
build.sh
113
build.sh
|
|
@ -202,6 +202,8 @@ export AS="$LFS_TGT-as"
|
||||||
export LD="$LFS_TGT-ld"
|
export LD="$LFS_TGT-ld"
|
||||||
export AR="$LFS_TGT-ar"
|
export AR="$LFS_TGT-ar"
|
||||||
export RANLIB="$LFS_TGT-ranlib"
|
export RANLIB="$LFS_TGT-ranlib"
|
||||||
|
export STRIP="$LFS_TGT-strip"
|
||||||
|
export OBJDUMP="$LFS_TGT-objdump"
|
||||||
# remove hardening options for building libraries
|
# remove hardening options for building libraries
|
||||||
export CFLAGS="-U_FORTIFY_SOURCE -O2"
|
export CFLAGS="-U_FORTIFY_SOURCE -O2"
|
||||||
export CPPFLAGS="-U_FORTIFY_SOURCE -O2"
|
export CPPFLAGS="-U_FORTIFY_SOURCE -O2"
|
||||||
|
|
@ -295,6 +297,7 @@ unset LD
|
||||||
unset AS
|
unset AS
|
||||||
unset AR
|
unset AR
|
||||||
unset RANLIB
|
unset RANLIB
|
||||||
|
unset STRIP
|
||||||
unset OBJDUMP
|
unset OBJDUMP
|
||||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH_old"
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH_old"
|
||||||
|
|
||||||
|
|
@ -396,7 +399,27 @@ if [ ! -f "$STEPS_DIR/gcc-step3" ]; then
|
||||||
fi
|
fi
|
||||||
cd "$LFS_BUILD/gcc/build"
|
cd "$LFS_BUILD/gcc/build"
|
||||||
|
|
||||||
make -j 32 all
|
"../configure" \
|
||||||
|
--target=$LFS_TGT \
|
||||||
|
--host=$(../config.guess) \
|
||||||
|
--build=$(../config.guess) \
|
||||||
|
--prefix=$LFS_TOOLS \
|
||||||
|
--with-glibc-version=2.40 \
|
||||||
|
--with-sysroot=$LFS \
|
||||||
|
--enable-c99 \
|
||||||
|
--enable-long-long \
|
||||||
|
--enable-default-pie \
|
||||||
|
--enable-default-ssp \
|
||||||
|
--disable-nls \
|
||||||
|
--disable-multilib \
|
||||||
|
--disable-libgomp \
|
||||||
|
--disable-libquadmath \
|
||||||
|
--disable-libquadmath-support \
|
||||||
|
--disable-decimal-float \
|
||||||
|
--enable-languages=c,c++
|
||||||
|
|
||||||
|
# Reebuild everything now that we have bootstrapped an initial gcc and glibc
|
||||||
|
make -j 32 # if build fails add --disable-libsanitizer
|
||||||
make -j 32 install
|
make -j 32 install
|
||||||
|
|
||||||
cd "$BASE_DIR"
|
cd "$BASE_DIR"
|
||||||
|
|
@ -406,34 +429,72 @@ fi
|
||||||
|
|
||||||
# test the cross toolchain
|
# test the cross toolchain
|
||||||
which -- $LFS_TGT-as || echo $LFS_TGT-as is not in the PATH
|
which -- $LFS_TGT-as || echo $LFS_TGT-as is not in the PATH
|
||||||
|
|
||||||
echo 'int main(){}' | "$LFS_TGT-gcc" -xc -
|
echo 'int main(){}' | "$LFS_TGT-gcc" -xc -
|
||||||
"$LFS_TGT-readelf" -l a.out > test_compiler
|
"$LFS_TGT-readelf" -l a.out > test_compiler
|
||||||
cat test_compiler | grep ld-linux
|
cat test_compiler | grep ld-linux
|
||||||
rm -v a.out test_compiler
|
rm -v a.out test_compiler
|
||||||
|
|
||||||
|
#cat test_compiler.cpp | "$LFS_TGT-g++" -xc -
|
||||||
|
#"$LFS_TGT-readelf" -l a.out > test_compiler
|
||||||
|
#cat test_compiler | grep ld-linux
|
||||||
|
#rm -v a.out test_compiler
|
||||||
|
|
||||||
# build m4
|
# build m4
|
||||||
#if [ ! -f "$STEPS_DIR/m4" ]; then
|
if [ ! -f "$STEPS_DIR/m4" ]; then
|
||||||
# if [ ! -d "$LFS_BUILD/m4" ]; then
|
if [ ! -d "$LFS_BUILD/m4" ]; then
|
||||||
# tar -xzf "$BASE_DIR/sources/m4-1.4.19.tar.gz"
|
tar -xzf "$BASE_DIR/sources/m4-1.4.19.tar.gz"
|
||||||
# mv "m4-1.4.19" "$LFS_BUILD/m4"
|
mv "m4-1.4.19" "$LFS_BUILD/m4"
|
||||||
# fi
|
fi
|
||||||
# cd "$LFS_BUILD/m4"
|
cd "$LFS_BUILD/m4"
|
||||||
#
|
|
||||||
# #mkdir -vp build
|
mkdir -vp build
|
||||||
# #cd build
|
cd build
|
||||||
#
|
|
||||||
# echo "rootsbindir=/usr/sbin" > configparms
|
echo "rootsbindir=/usr/sbin" > configparms
|
||||||
#
|
|
||||||
# "./configure" \
|
"../configure" \
|
||||||
# --prefix=/usr \
|
--prefix=/usr \
|
||||||
# --target=$LFS_TGT \
|
--target=$LFS_TGT \
|
||||||
# --host=$(build-aux/config.guess) \
|
--host=$(build-aux/config.guess) \
|
||||||
# --build=$(build-aux/config.guess) \
|
--build=$(build-aux/config.guess) \
|
||||||
#
|
|
||||||
# make -j 32
|
make -j 32
|
||||||
# make DESTDIR=$LFS install
|
make DESTDIR=$LFS install
|
||||||
#
|
|
||||||
# cd "$BASE_DIR"
|
"$LFS_TGT-strip" --strip-unneeded $LFS/bin/m4
|
||||||
# rm -rf "$LFS_BUILD/m4"
|
|
||||||
# touch "$STEPS_DIR/m4"
|
cd "$BASE_DIR"
|
||||||
#fi
|
rm -rf "$LFS_BUILD/m4"
|
||||||
|
touch "$STEPS_DIR/m4"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# build attr
|
||||||
|
if [ ! -f "$STEPS_DIR/attr" ]; then
|
||||||
|
if [ ! -d "$LFS_BUILD/attr" ]; then
|
||||||
|
tar -xzf "$BASE_DIR/sources/attr-2.5.2.tar.gz"
|
||||||
|
mv "attr-2.5.2" "$LFS_BUILD/attr"
|
||||||
|
fi
|
||||||
|
cd "$LFS_BUILD/attr"
|
||||||
|
|
||||||
|
mkdir -vp build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
echo "rootsbindir=/usr/sbin" > configparms
|
||||||
|
|
||||||
|
"../configure" \
|
||||||
|
--prefix=/usr \
|
||||||
|
--disable-static \
|
||||||
|
--target=$LFS_TGT \
|
||||||
|
--host=$(build-aux/config.guess) \
|
||||||
|
--build=$(build-aux/config.guess) \
|
||||||
|
|
||||||
|
make -j 32
|
||||||
|
make DESTDIR=$LFS install
|
||||||
|
|
||||||
|
cd "$BASE_DIR"
|
||||||
|
|
||||||
|
touch "$STEPS_DIR/attr"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Right now I have no idea if g++ will build crap.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue