CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
pkgutils: fixed CFLAGS used
[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
eb94b6d4 8version=2.16.0
9ffcd4d3 9release=4
4551f658 10source=(http://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz \
f27d3ffa 11 ftp://ftp.gnu.org/gnu/$name/$name-ports-$version.tar.bz2 \
eb94b6d4
VM
12 ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-3.4.11.tar.xz \
13 $name-resolv_assert.patch
14 $name-strtod_integer_overflow.patch
9ffcd4d3 15 $name-regexp_buffer_overrun.patch
6dca1d21
JB
16 hosts resolv.conf nsswitch.conf host.conf ld.so.conf)
17
18build() {
19 # install build kernel headers
eb94b6d4 20 cd linux-3.4.11
6dca1d21
JB
21 make mrproper
22 make ARCH=arm headers_check
23 make ARCH=arm INSTALL_HDR_PATH=$PKG/usr headers_install
6dca1d21 24
534a14fc 25 cd $SRC
f27d3ffa 26 mv $name-ports-$version $name-$version/ports
6dca1d21
JB
27
28 pushd $name-$version
eb94b6d4
VM
29 patch -p1 -i $SRC/$name-resolv_assert.patch
30 patch -p1 -i $SRC/$name-strtod_integer_overflow.patch
9ffcd4d3 31 patch -p1 -i $SRC/$name-regexp_buffer_overrun.patch
6dca1d21
JB
32 popd
33
34 mkdir build
35 cd build
534a14fc
VM
36
37 cat > config.cache << EOF
eb94b6d4
VM
38libc_cv_forced_unwind=yes
39libc_cv_ctors_header=yes
40libc_cv_c_cleanup=yes
6dca1d21
JB
41EOF
42
43 ../$name-$version/configure --build=$CHOST \
44 --host=$CTARGET \
45 --prefix=/usr \
46 --libexecdir=/usr/lib \
47 --with-headers=$PKG/usr/include \
48 --with-tls \
eb94b6d4 49 --enable-kernel=2.6.25 \
6dca1d21
JB
50 --enable-add-ons \
51 --disable-profile \
52 --without-gd \
eb94b6d4
VM
53 --with-__thread \
54 --enable-obsolete-rpc
6dca1d21
JB
55
56 make CC="$CC" CFLAGS="$CFLAGS"
57 make install_root=$PKG install
534a14fc 58
6dca1d21
JB
59 cp $SRC/{hosts,resolv.conf,nsswitch.conf,host.conf,ld.so.conf} $PKG/etc
60 ln -sf ../usr/share/zoneinfo/UTC $PKG/etc/localtime
61 mkdir -p $PKG/etc/ld.so.conf.d $PKG/usr/lib/locale
62
eb94b6d4
VM
63 rm -rf $PKG/usr/share/{info,locale} \
64 $PKG/usr/bin/tzselect \
65 $PKG/usr/sbin/z{dump,ic}
6dca1d21 66}