summaryrefslogtreecommitdiff
path: root/templates/glibc/template
blob: 9624ce290fffa3b13e68179d1f601bd937e9ca4a (plain) (blame)
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
pkgname=glibc
version=2.43
build_no=1
upstream="${MIRROR_GNU_FTP}/glibc/glibc-${version}.tar.gz"

function do_configure {
	mkdir build
	cd build
	
	## Taken from LFS book
	echo "rootsbindir=/usr/sbin" > configparms

	set BISON_PKGDATADIR="/usr/share/bison"
	set M4=m4

	conf_flags=(
		--prefix=/usr
		--host="${DISTRO_TC}"
		--enable-shared
		--enable-threads=posix
		--disable-nls
		--disable-nscd
		--disable-werror
		--enable-stack-protector=strong
		libc_cv_slibdir=/usr/lib 	
	)

	../configure "${conf_flags[@]}"
}

function do_build {
	cd build
	export PATH="/usr/bin:${PATH}"
	make -j$(nproc)
}

function do_install {
	cd build
	export PATH="/usr/bin:${PATH}"
	make DESTDIR=${DESTDIR} install
}