Commit | Line | Data |
---|---|---|
6dca1d21 JB |
1 | # Description: The C library used in the GNU system |
2 | # URL: http://www.gnu.org/software/libc/ | |
3 | # Maintainer: CRUX System Team, core-ports at crux dot nu | |
b751b192 | 4 | # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu |
6dca1d21 JB |
5 | # Depends on: |
6 | ||
7 | name=glibc | |
eba82382 VM |
8 | version=2.16.0 |
9 | release=1 | |
4551f658 | 10 | source=(http://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz \ |
eba82382 | 11 | ftp://ftp.gnu.org/gnu/$name/$name-ports-$version.tar.bz2 \ |
b3678621 | 12 | ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-3.5.4.tar.xz \ |
eba82382 VM |
13 | $name-resolv_assert.patch |
14 | $name-strtod_integer_overflow.patch | |
6dca1d21 JB |
15 | hosts resolv.conf nsswitch.conf host.conf ld.so.conf) |
16 | ||
17 | build() { | |
18 | # install build kernel headers | |
b3678621 | 19 | cd linux-3.5.4 |
6dca1d21 JB |
20 | make mrproper |
21 | make ARCH=arm headers_check | |
22 | make ARCH=arm INSTALL_HDR_PATH=$PKG/usr headers_install | |
6dca1d21 | 23 | |
534a14fc | 24 | cd $SRC |
eba82382 | 25 | mv $name-ports-$version $name-$version/ports |
6dca1d21 JB |
26 | |
27 | pushd $name-$version | |
eba82382 VM |
28 | patch -p1 -i $SRC/$name-resolv_assert.patch |
29 | patch -p1 -i $SRC/$name-strtod_integer_overflow.patch | |
6dca1d21 JB |
30 | popd |
31 | ||
32 | mkdir build | |
33 | cd build | |
534a14fc VM |
34 | |
35 | cat > config.cache << EOF | |
b3678621 | 36 | libc_cv_forced_unwind=yes |
eba82382 VM |
37 | libc_cv_ctors_header=yes |
38 | libc_cv_c_cleanup=yes | |
6dca1d21 JB |
39 | EOF |
40 | ||
41 | ../$name-$version/configure --build=$CHOST \ | |
42 | --host=$CTARGET \ | |
43 | --prefix=/usr \ | |
44 | --libexecdir=/usr/lib \ | |
45 | --with-headers=$PKG/usr/include \ | |
46 | --with-tls \ | |
b3678621 | 47 | --enable-kernel=2.6.25 \ |
6dca1d21 JB |
48 | --enable-add-ons \ |
49 | --disable-profile \ | |
50 | --without-gd \ | |
eba82382 VM |
51 | --with-__thread \ |
52 | --enable-obsolete-rpc | |
6dca1d21 JB |
53 | |
54 | make CC="$CC" CFLAGS="$CFLAGS" | |
55 | make install_root=$PKG install | |
534a14fc | 56 | |
6dca1d21 JB |
57 | cp $SRC/{hosts,resolv.conf,nsswitch.conf,host.conf,ld.so.conf} $PKG/etc |
58 | ln -sf ../usr/share/zoneinfo/UTC $PKG/etc/localtime | |
59 | mkdir -p $PKG/etc/ld.so.conf.d $PKG/usr/lib/locale | |
60 | ||
eba82382 VM |
61 | rm -rf $PKG/usr/share/{info,locale} \ |
62 | $PKG/usr/bin/tzselect \ | |
63 | $PKG/usr/sbin/z{dump,ic} | |
6dca1d21 | 64 | } |