]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9327 - Fix stripping when cross-compiling
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Tue, 28 Jul 2020 21:06:08 +0000 (23:06 +0200)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 25 Aug 2020 19:54:59 +0000 (19:54 +0000)
Probably-Signed-off-by: Dave Bender <bender@benegon.com>
[yann.morin.1998@free.fr: patch was made by Dave, but he
 forgot his SoB line, so I added it]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/openldap/0001-fix_cross_strip.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
build/shtool
build/top.mk
clients/tools/Makefile.in
configure.in
servers/slapd/Makefile.in

index 8a4ffcfc7342ff7b835da7eb159bd253c955e5eb..539784c42afdd063f22b2ede4244821475357f5b 100755 (executable)
@@ -993,7 +993,7 @@ install )
             if [ ".$opt_t" = .yes ]; then
                 echo "strip $dsttmp" 1>&2
             fi
-            strip $dsttmp || shtool_exit $?
+            $STRIP $dsttmp || shtool_exit $?
         fi
         if [ ".$opt_o" != . ]; then
             if [ ".$opt_t" = .yes ]; then
index 264b4bab2eb1f95286645650054efc9a91e1b62b..86fafca025aaeea863f98a2c6d6003b447a972f2 100644 (file)
@@ -59,7 +59,7 @@ INSTALL_PROGRAM = $(INSTALL)
 INSTALL_DATA = $(INSTALL) -m 644
 INSTALL_SCRIPT = $(INSTALL)
 
-STRIP = -s
+STRIP_OPTS = -s
 
 LINT = lint
 5LINT = 5lint
index ce7d377e12742a12ced32f9c4e03a2f48fe2827d..b4e5037b433179ccc6a4f8ae394bd0061843af8d 100644 (file)
@@ -129,7 +129,7 @@ install-local:      FORCE
        -$(MKDIR) $(DESTDIR)$(bindir)
        @(                                                              \
            for prg in $(PROGRAMS); do                                  \
-               $(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 $$prg$(EXEEXT)     \
+               $(LTINSTALL) $(INSTALLFLAGS) $(STRIP_OPTS) -m 755 $$prg$(EXEEXT)        \
                    $(DESTDIR)$(bindir);                                \
            done                                                        \
        )
index 204912307d975dd96fc94006f128dbcfbf63167b..5d15f7d48ff2c7365c4064b71e1ee4cda3c40559 100644 (file)
@@ -657,6 +657,15 @@ if test -z "${AR}"; then
        fi
 fi
 
+if test -z "${STRIP}"; then
+       AC_CHECK_PROGS(STRIP,strip,missing)
+
+       if test "${STRIP}" = "missing" ; then
+               AC_MSG_ERROR([Unable to locate strip(1) or suitable replacement.  Check PATH or set STRIP.])
+       fi
+fi
+
+
 AC_LIBTOOL_WIN32_DLL
 AC_LIBTOOL_DLOPEN
 AC_PROG_MAKE_SET
index a56a91241300f7cab5fe5ac7e39ecbfa8de59b98..59248350f5e3ff86a5034c7534f8e2077e41f733 100644 (file)
@@ -372,7 +372,7 @@ install-local-srv: install-slapd install-tools \
 install-slapd: FORCE
        -$(MKDIR) $(DESTDIR)$(libexecdir)
        -$(MKDIR) $(DESTDIR)$(localstatedir)/run
-       $(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 \
+       $(LTINSTALL) $(INSTALLFLAGS) $(STRIP_OPTS) -m 755 \
                slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
        @for i in $(SUBDIRS); do \
            if test -d $$i && test -f $$i/Makefile ; then \