On 5/12/25 5:02 PM, NR wrote:
"STRIP" is currently hard-set to "strip", which fails for
cross-compiled binaries.

There's no builtin autoconf macro for strip. I suppose I could add one
using AC_CHECK_TOOL.

```
install-strip:
         $(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s
--strip-program=${MINE_CROSS_COMPILE}strip' \
                 prefix=${prefix} exec_prefix=${exec_prefix} \
                 DESTDIR=$(DESTDIR) install

$ install -s --strip-program=strip bash /tmp
install: illegal option -- -


```

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;

These just use the included `install-sh'.

```
During a build setting 'INSTALL_STRIP_PROGRAM="install -s
--strip-program=<other>-strip"', allows the install with strip to
succeed.

This is obviously not portable, but could work in some environments.

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

I'll see what I can do before bash-5.3 comes out.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to