summaryrefslogtreecommitdiff
path: root/recipes/uclibc/uclibc-initial_git.bb
blob: 00330e2439c4d7eace821623ca873535a09879c1 (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
SECTION = "base"
require uclibc_git.bb

DEPENDS = "linux-libc-headers ncurses-native virtual/${TARGET_PREFIX}gcc-initial"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
PACKAGES = ""

do_install() {
	# Install initial headers into the cross dir
	make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \
		install_headers
	#ln -sf include ${CROSS_DIR}/${TARGET_SYS}/sys-include

	# This conflicts with the c++ version of this header
	rm -f ${D}${includedir}/bits/atomicity.h
	install -d ${D}${libdir}/
	install -m 644 lib/crt[1in].o ${D}${libdir}/
	install -m 644 lib/libc.so ${D}${libdir}/
}

do_compile () {
	make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \
		lib/crt1.o lib/crti.o lib/crtn.o
	${CC} -nostdlib -nostartfiles -shared -x c /dev/null \
		-o lib/libc.so
}