diff --git a/.build.yml b/.build.yml index 12ba123..05458a9 100644 --- a/.build.yml +++ b/.build.yml @@ -3,7 +3,6 @@ packages: - clang - pkg-config - libtss2-dev - - patchelf - ronn tasks: - get-zfs: | diff --git a/Makefile b/Makefile index fcea0d0..e98eb68 100644 --- a/Makefile +++ b/Makefile @@ -63,9 +63,8 @@ $(subst $(MANDIR),$(OUTDIR)man/,$(MANPAGE_SOURCES)) : $(MANDIR)index.txt $(MANPA $(OUTDIR)%$(EXE) : $(subst $(SRCDIR),$(OBJDIR),$(subst .cpp,$(OBJ),$(SRCDIR)bin/%.cpp $(COMMON_SOURCES))) @mkdir -p $(dir $@) - $(CXX) $(CXXAR) -o$@ $^ $(PIC) $(LDAR) + $(CXX) $(CXXAR) -o$@ $^ $(PIC) -Wl,--as-needed $(LDAR) $(STRIP) $(STRIPAR) $@ - $(LDD) --unused $@ | $(AWK) -F/ 'BEGIN {args = ""} /^\t/ {args = args " --remove-needed " $$NF} END { if(!args) exit; print "$(PATCHELF)" args " $@"}' | sh -x $(OBJDIR)%$(OBJ) : $(SRCDIR)%.cpp @mkdir -p $(dir $@) diff --git a/README.md b/README.md index 738822f..bfb4bf4 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Plus it's a pretty good annoyed sigh onomatopoeia. ### Building -You'll need `pkg-config`, `patchelf` (or to set `$PATCHELF=true`), `libzfslinux-dev`, `libtss2-dev`, and `make` should hopefully Just Work™ if you have a C++17-capable compiler. +You'll need `pkg-config`, `libzfslinux-dev`, `libtss2-dev`, and `make` should hopefully Just Work™ if you have a C++17-capable compiler. The output binaries are trimmed of extraneous dependencies, so they're all just libc + libzfs and friends + TPM back-end. ### Installation diff --git a/configMakefile b/configMakefile index 0bc8498..7d1abe1 100644 --- a/configMakefile +++ b/configMakefile @@ -55,7 +55,6 @@ LNCMAKEAR := LDFLAGS="$(LNCXXAR)" LDD ?= ldd AWK ?= awk RONN ?= ronn -PATCHELF ?= patchelf OBJ := .o CXXAR := -g -O3 -std=c++17 -fno-exceptions -Wall -Wextra $(CXXSPECIFIC) -pipe $(INCCXXAR) $(PIC) STRIP ?= @echo strip