mirror of
https://github.com/arjuncr/Linux-from-scratch.git
synced 2026-01-15 00:37:17 +00:00
31 lines
735 B
Bash
31 lines
735 B
Bash
#!/bin/bash
|
|
|
|
. ./build_env_0.sh
|
|
|
|
echo "building glibc"
|
|
|
|
mkdir glibc-build
|
|
cd glibc-build/
|
|
|
|
echo "libc_cv_forced_unwind=yes" > config.cache
|
|
echo "libc_cv_c_cleanup=yes" >> config.cache
|
|
echo "libc_cv_ssp=no" >> config.cache
|
|
echo "libc_cv_ssp_strong=no" >> config.cache
|
|
|
|
|
|
|
|
BUILD_CC="gcc" CC="${LJOS_TARGET}-gcc" \
|
|
AR="${LJOS_TARGET}-ar" \
|
|
RANLIB="${LJOS_TARGET}-ranlib" CFLAGS="-O2" \
|
|
../work/glibc/configure --prefix=/usr \
|
|
--host=${LJOS_TARGET} --build=${LJOS_HOST} \
|
|
--disable-profile --enable-add-ons --with-tls \
|
|
--enable-kernel=2.6.32 --with-__thread \
|
|
--with-binutils=${LJOS}/cross-tools/bin \
|
|
--with-headers=${LJOS}/usr/include \
|
|
--cache-file=config.cache
|
|
make && make install_root=${LJOS}/ install
|
|
|
|
|
|
echo "glibc build completed"
|