summaryrefslogtreecommitdiff
path: root/sub/musl/Makefile
blob: 01953f1392af8057197a6681ba84a94e323a4831 (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
MUSL_BASE ?= /opt/musl-git

# Latest version at 2018-03-23
MUSL_VERSION := 0cf50581ec5f04feeaa77f2eb8b734a4b69ca8ed


# Build-build

$(OUTPUT)/sources/.lh_musl_cloned: | $(OUTPUT)/tmp/.lh_prepared
	if ! test -d $(OUTPUT)/sources/musl ; then cd $(OUTPUT)/sources && git clone git://git.musl-libc.org/musl musl && cd musl && git checkout $(MUSL_VERSION) ; fi
	exec setuidgid $(NORMALUSER) touch $@

$(OUTPUT)/build-build/.lh_gcc: $(OUTPUT)/build-build/bin/gcc
	exec setuidgid $(NORMALUSER) touch $@

$(OUTPUT)/build-build/bin/gcc: | $(OUTPUT)/tmp/.lh_prepared
	exec setuidgid $(NORMALUSER) ln -sf $(BUILD_BUILD_CC) $(OUTPUT)/build-build/bin/gcc


# Build-host

$(OUTPUT)/build-host/bin/muslgcc: $(OUTPUT)/build-host/kernel/.lh_headers_installed | $(OUTPUT)/tmp/.lh_layout_installed $(OUTPUT)/build-build/.lh_skarnet_installed
	exec setuidgid $(NORMALUSER) sub/musl/muslgccmake-buildhost $(OUTPUT) $(TRIPLE) $(BUILD_HOST_CC)
	exec setuidgid $(NORMALUSER) s6-ln -sf $(TRIPLE)-muslgcc $@