bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cross-Compile - Makefile - Install-strip


From: NR
Subject: Cross-Compile - Makefile - Install-strip
Date: Mon, 12 May 2025 16:02:59 -0500

"STRIP" is currently hard-set to "strip", which fails for
cross-compiled binaries.
```
install-strip:
        $(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s
--strip-program=${MINE_CROSS_COMPILE}strip' \
                prefix=${prefix} exec_prefix=${exec_prefix} \
                DESTDIR=$(DESTDIR) install
```

Examples of implementations that allow a custom "strip" program to be
used can be found in coreutils and make:
```
install-strip:
        if test -z '$(STRIP)'; then \
          $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
            install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)"
INSTALL_STRIP_FLAG=-s \
              install;
```
During a build setting 'INSTALL_STRIP_PROGRAM="install -s
--strip-program=<other>-strip"', allows the install with strip to
succeed.

It'd be nice if this implementation could be standardized under the
GNU umbrella.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]