summaryrefslogtreecommitdiffhomepage
path: root/006.musl.build
blob: d34f5b00aef8b57af9bf7eb95b8d2188a385daa8 (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
46
export lz_arch=${ARCH} lz_cflags_debug=-O2 lz_target=${TARGET};

if is_build_script_done finished; then
        exit 212;
elif [ "x${3}" = "xno-complex" ]; then
	# Musl: build (no-complex)
	_install=install_no_complex;
	set_build_dir musl-${PKG_MUSL_VERSION}-${3} cross;
	fetch http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz	\
		${PKG_MUSL_SHA256SUM};
	if ! is_build_script_done extracted; then
		rm_if_exists musl-${PKG_MUSL_VERSION};
		tar -xf musl-${PKG_MUSL_VERSION}.tar.gz;
		cp -R mmglue/* musl-${PKG_MUSL_VERSION}/;
		set_build_script_done extracted -configured;
	fi;
elif [ "x${3}" = "xnative" ]; then
	# Musl: build (full)
	_install=install;
	set_build_dir musl-${PKG_MUSL_VERSION} ${3};
else
	# Musl: build (full)
	_install=install;
	set_build_dir musl-${PKG_MUSL_VERSION} cross;
fi;
if ! is_build_script_done configured; then
	rm_if_exists -m -c ${BUILD_DIR};
	../lazy/lazy				\
		-a ${ARCH}			\
		-c gcc				\
		-f ${PREFIX_LVL}		\
		-n musl				\
		-p ../musl-${PKG_MUSL_VERSION}	\
		-t ${lz_target}			\
		-x config;
	set_build_script_done configured -built;
else
	cd ${BUILD_DIR};
fi;
if ! is_build_script_done built; then
	./lazy	-e ${_install}			\
		-x build;
	set_build_script_done built finished;
fi;

# vim:filetype=sh