-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path1-glibc.sh
executable file
·56 lines (42 loc) · 1.01 KB
/
1-glibc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
export STAGE=1
. ./environment.sh
. ./package-versions.sh
export FORCE_UNSAFE_CONFIGURE=1
if [ -f $PROGRESS_DIR/1-glibc ] ; then
exit 0
fi
echo "building glibc..."
set -e
cd $MINL/sources
rm -rf glibc-${glibc_v}
tar xf glibc-${glibc_v}.tar.xz
cd glibc-${glibc_v}
rm -rf build
case $(uname -m) in
i?86)
ln -sf ld-linux.so.2 $MINL/lib/ld-lsb.so.3
;;
x86_64)
ln -sf ../lib/ld-linux-x86-64.so.2 $MINL/lib64
ln -sf ../lib/ld-linux-x86-64.so.2 $MINL/lib64/ld-lsb-x86-64.so.3
;;
esac
patch -Np1 -i ../glibc-${glibc_v}-fhs-1.patch
mkdir build
cd build
echo "rootsbindir=/usr/sbin" > configparms
../configure \
--prefix=/usr \
--host=$MINL_TGT \
--build=$(../scripts/config.guess) \
--enable-kernel=${linux_mm_v} \
--with-headers=$MINL/usr/include \
--disable-nscd \
libc_cv_slibdir=/usr/lib
make
make DESTDIR=$MINL install
sed 'RTLDLIST=/s@/usr@@g' -i $MINL/usr/bin/ldd
cd $MINL/sources
rm -rf glibc-${glibc_v}
touch $PROGRESS_DIR/1-glibc