CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
glibc: initial import (verified compilation)
[crossrootfs.git] / glibc / Pkgfile
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
4 # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
5 # Depends on:
6
7 name=glibc
8 version=2.13
9 release=1
10 source=(http://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz \
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 \
13 glibc-ignore_origin.patch \
14 Optimize-__getpagesize-a-bit.patch \
15 $name-$version-cross_hacks-2.patch \
16 $name-$version-gnueabihf.patch \
17 $name-$version-prelink.patch \
18 hosts resolv.conf nsswitch.conf host.conf ld.so.conf)
19
20 build() {
21 # install build kernel headers
22 cd linux-2.6.35.6
23 make mrproper
24 make ARCH=arm headers_check
25 make ARCH=arm INSTALL_HDR_PATH=$PKG/usr headers_install
26
27 cd $SRC
28 mv $name-ports-$version $name-$version/ports
29
30 pushd $name-$version
31 patch -p1 -i $SRC/$name-$version-gnueabihf.patch
32 patch -p1 -i $SRC/$name-$version-prelink.patch
33 patch -p1 -i $SRC/$name-$version-cross_hacks-2.patch
34 patch -R -p1 -i $SRC/Optimize-__getpagesize-a-bit.patch
35 patch -p1 -i $SRC/$name-ignore_origin.patch
36 popd
37
38 mkdir build
39 cd build
40
41 cat > config.cache << EOF
42 libc_cv_gnu89_inline=yes
43 ac_cv_sizeof_long_double=0
44 EOF
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 \
56 --with-__thread
57
58 make CC="$CC" CFLAGS="$CFLAGS"
59 make install_root=$PKG install
60
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
65 rm -rf $PKG/usr/share/{info,locale}
66 }