diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-02-03 13:59:46 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-02-03 13:59:46 +0000 |
commit | a8f79b8d50115af4c36c07f83ec7dd9bc4475710 (patch) | |
tree | f30a0668ae41f06be86a037d6d4ef8e265ff4582 /sub/strace | |
parent | b0c2b7e56e62aeb2bca8b4d2ab396f3d83a48def (diff) | |
download | lh-bootstrap-a8f79b8d50115af4c36c07f83ec7dd9bc4475710.tar.xz |
Add strace and an optional mechanism
Diffstat (limited to 'sub/strace')
-rw-r--r-- | sub/strace/Makefile | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sub/strace/Makefile b/sub/strace/Makefile new file mode 100644 index 0000000..d99ca85 --- /dev/null +++ b/sub/strace/Makefile @@ -0,0 +1,32 @@ + +STRACE_VERSION ?= 5.4 +STRACE_MAKE_STATIC := $(if $(filter true,$(BUILD_HOST_STATIC)),LDFLAGS=-static,) + +clean-strace: + rm -f $(OUTPUT)/build-host/.lh_strace_* + + +$(OUTPUT)/sources/strace-$(STRACE_VERSION).tar.xz: | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget https://strace.io/files/$(STRACE_VERSION)/strace-$(STRACE_VERSION).tar.xz + +$(OUTPUT)/build-host/.lh_strace_dled: $(OUTPUT)/sources/strace-$(STRACE_VERSION).tar.xz | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_strace_copied: $(OUTPUT)/build-host/.lh_strace_dled | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-host/strace-$(STRACE_VERSION) + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host tar -Jxpvf $(OUTPUT)/sources/strace-$(STRACE_VERSION).tar.xz + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_strace_configured: $(OUTPUT)/build-host/.lh_strace_copied | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/strace-$(STRACE_VERSION) export CC "$(BUILD_HOST_CC)" ./configure --host=$(TRIPLE) --prefix=/opt/strace-$(STRACE_VERSION) --enable-mpers=no + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_strace_built: $(OUTPUT)/build-host/.lh_strace_configured | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/strace-$(STRACE_VERSION) $(MAKE) $(STRACE_MAKE_STATIC) + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_strace_installed: $(OUTPUT)/build-host/.lh_strace_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec cd $(OUTPUT)/build-host/strace-$(STRACE_VERSION) $(MAKE) install DESTDIR=$(OUTPUT)/rootfs + exec makenamelink $(OUTPUT)/rootfs/opt strace strace-$(STRACE_VERSION) $(OUTPUT)/tmp + exec makelinks $(OUTPUT)/rootfs /bin /opt/strace/bin + exec setuidgid $(NORMALUSER) s6-touch $@ |