mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-11-21 11:52:52 +00:00
Add 5.6 - Build libstdc++
This commit is contained in:
parent
8ad02c4323
commit
46bdff5fce
2 changed files with 48 additions and 0 deletions
36
scripts/chapter5/5.6-libstdc++.sh
Normal file
36
scripts/chapter5/5.6-libstdc++.sh
Normal file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd $LFS/sources
|
||||
tar xf gcc-12.2.0.tar.xz
|
||||
cd gcc-12.2.0
|
||||
|
||||
mkdir -v build
|
||||
cd build
|
||||
|
||||
../libstdc++-v3/configure \
|
||||
--host=$LFS_TGT \
|
||||
--build=$(../config.guess) \
|
||||
--prefix=/usr \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-libstdcxx-pch \
|
||||
--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/12.2.0
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make -j5
|
||||
|
||||
if [$ -ne 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make DESTDIR=$LFS install
|
||||
|
||||
rm -v $LFS/usr/lib/lib{stdc++,stdc++fs,supc++}.la
|
||||
|
||||
cd $LFS
|
||||
rm -rf gcc-12.2.0
|
|
@ -177,3 +177,15 @@ then
|
|||
stop_script "chapter5/5.5-glibc.sh"
|
||||
fi
|
||||
|
||||
# Chapter 5.6
|
||||
# ===========
|
||||
echo "Building listdc++"
|
||||
su - lfs -c "$PWD/chapter5/5.6-libstdc++.sh"
|
||||
|
||||
# Exit on error
|
||||
check_exit_code
|
||||
if [ $exit_status -ne 0 ]
|
||||
then
|
||||
stop_script "chapter5/5.6-libstdc++.sh"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue