summaryrefslogtreecommitdiffstats
path: root/core/uclibc/APKBUILD
blob: 3e64a2a78219ddf046d2f94d05a0a213edc27604 (plain)
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
pkgname=uclibc
pkgver=0.9.30
pkgdesc="C library for developing embedded Linux systems"
url=http://uclibc.org
license="LGPL-2"
_mynamever=uClibc-0.9.30

subpackages="$pkgname-dev"

source="http://uclibc.org/downloads/$_mynamever.tar.bz2
	pthreads-fno-omit-frame-pointer.patch
	uclibcconfig
	"

_prepare() {
	local i gcc_major
	cd $srcdir/$_mynamever/
	
	# gcc-3.4.6 is buggy and need -fno-omit-framepointer for lipthreads.old
	gcc_major=$(gcc --version | head -n1 | awk '{print $3}'|cut -d . -f1)
	if [ "$gcc_major" = "3" ]; then
		msg "Applying patch for buggy gcc-3"
		patch -p1 < ../pthreads-fno-omit-frame-pointer.patch
	fi
}

_compile() {
	cd $srcdir/$_mynamever/
	cp ../uclibcconfig .config
	make silentoldconfig
	make || return 1
}

_install() {
	cd $srcdir/$_mynamever/
	make install DESTDIR=$pkgdir
}

build() {
	_prepare && _compile && _install
}

md5sums="e5766e2566e0297adebebbcc0aba1f2d  uClibc-0.9.30.tar.bz2
e427a6c39296d26f01ee275b2e503770  pthreads-fno-omit-frame-pointer.patch
7e22bc978e25fcbeb1cbdc0f67d38e55  uclibcconfig"