From c60c58f877c7eda09baf81e1794883561181af07 Mon Sep 17 00:00:00 2001 From: Alessandro Di Nepi Date: Fri, 10 Jul 2026 11:06:23 +0200 Subject: [PATCH 1/2] Honor $(STRIP) in install-strip for cross-compilation The install-strip target hard-coded `install -s`, which strips via the install program using the build host's strip and ignores the STRIP variable. When cross-compiling this runs the host strip against a target binary and fails. Pass --strip-program=$(or $(STRIP),strip) so the target strip is used when STRIP is set (as cross toolchains and build systems provide), falling back to plain `strip` for native builds. A plain `make install` is unaffected. --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 5216fb2f7..d8c0928d4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -109,7 +109,7 @@ install-ssl-daemon: stunnel-rsyncd.conf install-all: install install-ssl-daemon install-strip: - $(MAKE) INSTALL_STRIP='-s' install + $(MAKE) INSTALL_STRIP='-s --strip-program=$(or $(STRIP),strip)' install .PHONY: uninstall uninstall: From 882b59a951f9322391e2d238621d48ba8c501601 Mon Sep 17 00:00:00 2001 From: Alessandro Di Nepi Date: Mon, 13 Jul 2026 11:26:50 +0300 Subject: [PATCH 2/2] Make install-strip portable (address review) - Detect the target strip via AC_CHECK_TOOL([STRIP],[strip],[strip]) in configure.ac (picks up the cross-prefixed strip when cross-compiling, defaults to plain strip otherwise) and substitute @STRIP@ in Makefile.in. - Rewrite install-strip to run a normal install then $(STRIP) on the installed rsync binary, dropping the GNU Make $(or ...) and the GNU install --strip-program extension that broke with install-sh/BSD install. Co-Authored-By: Claude Opus 4.8 (1M context) --- Makefile.in | 4 +++- configure.ac | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index d8c0928d4..7896f5dae 100644 --- a/Makefile.in +++ b/Makefile.in @@ -21,6 +21,7 @@ LIBOBJDIR=lib/ INSTALLCMD=@INSTALL@ INSTALLMAN=@INSTALL@ +STRIP=@STRIP@ srcdir=@srcdir@ MKDIR_P=@MKDIR_P@ @@ -109,7 +110,8 @@ install-ssl-daemon: stunnel-rsyncd.conf install-all: install install-ssl-daemon install-strip: - $(MAKE) INSTALL_STRIP='-s --strip-program=$(or $(STRIP),strip)' install + $(MAKE) install + $(STRIP) $(DESTDIR)$(bindir)/rsync$(EXEEXT) .PHONY: uninstall uninstall: diff --git a/configure.ac b/configure.ac index cda60405b..b16734a72 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,7 @@ AC_PROG_CXX AC_PROG_AWK AC_PROG_EGREP AC_PROG_INSTALL +AC_CHECK_TOOL([STRIP], [strip], [strip]) AC_PROG_MKDIR_P AC_SUBST(SHELL) AC_PATH_PROG([PERL], [perl])