2.1. pass2-libstdc++-11.2.0
#!/bin/sh
# Copyright © 1999-2022 Gerard Beekmans
# Copyright © 2017-2022 Random Crew
# Distributed under the terms of MIT License.
MY_P="gcc-${PV}"
MY_PD="${MY_P}"
Configuration
Option -nostdinc++ is added to CXXFLAGS. That is due to bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017
Original bugreport describes the problem during the build of the whole gcc, but here it reproduced for standalone libstdc++.
src_config()
{
mkdir -v build
cd build
../libstdc++-v3/configure \
CXXFLAGS="-g -O2 -D_GNU_SOURCE -nostdinc++" \
--prefix=${PREFIX} \
--disable-multilib \
--disable-nls \
--host=$(uname -m)-lfs-linux-gnu \
--disable-libstdcxx-pch
}
Compilation
src_compile()
{
make ${MAKEOPTS}
}
Installation
src_install()
{
make install ${MAKEOPTS} DESTDIR=${D}
}
Links
- url.lfs:
- url.lfs.stage1: https://linuxfromscratch.org/lfs/view/11.1/chapter07/gcc-libstdc++-pass2.html