Skip to content

Honor $(STRIP) in install-strip for cross-compilation#1024

Open
alessandrodn wants to merge 1 commit into
RsyncProject:masterfrom
alessandrodn:fix-install-strip-cross-strip-program
Open

Honor $(STRIP) in install-strip for cross-compilation#1024
alessandrodn wants to merge 1 commit into
RsyncProject:masterfrom
alessandrodn:fix-install-strip-cross-strip-program

Conversation

@alessandrodn

Copy link
Copy Markdown

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, and rsync's configure.ac has no AC_CHECK_TOOL([STRIP], …) to detect a cross strip.
When cross-compiling, make install-strip therefore runs the host strip against a target-architecture binary and fails.

This changes install-strip to pass --strip-program=$(or $(STRIP),strip), so the target strip is used when STRIP is set (as cross toolchains and build systems like Conan/Buildroot/Yocto provide), while falling back to plain strip for native builds. A plain make install is unaffected.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant