CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
glibc: initial import (verified compilation)
[crossrootfs.git] / glibc / Pkgfile
CommitLineData
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
7name=glibc
f27d3ffa
VM
8version=2.13
9release=1
4551f658 10source=(http://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz \
f27d3ffa
VM
11 ftp://ftp.gnu.org/gnu/$name/$name-ports-$version.tar.bz2 \
12 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.35.6.tar.gz \
4551f658
VM
13 glibc-ignore_origin.patch \
14 Optimize-__getpagesize-a-bit.patch \
6dca1d21 15 $name-$version-cross_hacks-2.patch \
f27d3ffa
VM
16 $name-$version-gnueabihf.patch \
17 $name-$version-prelink.patch \
6dca1d21
JB
18 hosts resolv.conf nsswitch.conf host.conf ld.so.conf)
19
20build() {
21 # install build kernel headers
f27d3ffa 22 cd linux-2.6.35.6
6dca1d21
JB
23 make mrproper
24 make ARCH=arm headers_check
25 make ARCH=arm INSTALL_HDR_PATH=$PKG/usr headers_install
6dca1d21 26
534a14fc 27 cd $SRC
f27d3ffa 28 mv $name-ports-$version $name-$version/ports
6dca1d21
JB
29
30 pushd $name-$version
f27d3ffa
VM
31 patch -p1 -i $SRC/$name-$version-gnueabihf.patch
32 patch -p1 -i $SRC/$name-$version-prelink.patch
6dca1d21 33 patch -p1 -i $SRC/$name-$version-cross_hacks-2.patch
4551f658
VM
34 patch -R -p1 -i $SRC/Optimize-__getpagesize-a-bit.patch
35 patch -p1 -i $SRC/$name-ignore_origin.patch
6dca1d21
JB
36 popd
37
38 mkdir build
39 cd build
534a14fc
VM
40
41 cat > config.cache << EOF
6dca1d21
JB
42libc_cv_gnu89_inline=yes
43ac_cv_sizeof_long_double=0
44EOF
45
46 ../$name-$version/configure --build=$CHOST \
47 --host=$CTARGET \
48 --prefix=/usr \
49 --libexecdir=/usr/lib \
50 --with-headers=$PKG/usr/include \
51 --with-tls \
52 --enable-kernel=2.6.0 \
53 --enable-add-ons \
54 --disable-profile \
55 --without-gd \
534a14fc 56 --with-__thread
6dca1d21
JB
57
58 make CC="$CC" CFLAGS="$CFLAGS"
59 make install_root=$PKG install
534a14fc 60
6dca1d21
JB
61 cp $SRC/{hosts,resolv.conf,nsswitch.conf,host.conf,ld.so.conf} $PKG/etc
62 ln -sf ../usr/share/zoneinfo/UTC $PKG/etc/localtime
63 mkdir -p $PKG/etc/ld.so.conf.d $PKG/usr/lib/locale
64
6dca1d21
JB
65 rm -rf $PKG/usr/share/{info,locale}
66}