shithub: openh264

Download patch

ref: a65e761385e798f35fdc9f33c93b470f6a490a0d
parent: c92caba2ff35b34c7256a8cb41f4f8bf2e06e038
author: Pedro Navarro <pedronavf@gmail.com>
date: Tue Nov 28 13:06:54 EST 2017

Allow the strip tool to be set by the caller

When cross compiling sometimes the strip utility which is being used by default, which comes from the path, doesn't understand the architecture of the library it needs to strip, resulting in a failed build. Allow STRIP to be same in the same fashion as CC and CXX.

--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,7 @@
 GMP_API_BRANCH=Firefox39
 CCASFLAGS=$(CFLAGS)
 STATIC_LDFLAGS=-lstdc++
+STRIP ?= strip
 
 SHAREDLIB_MAJORVERSION=4
 FULL_VERSION := 1.7.0
@@ -230,7 +231,7 @@
 	$(QUIET_AR)$(AR) $(AR_OPTS) $+
 ifeq (True, $(PROCESS_FILES))
 	cp $@ $(LIBPREFIX)$(PROJECT_NAME)$(DEBUGSYMBOLS_TAG).$(LIBSUFFIX)
-	strip $(STRIP_FLAGS) $@ -o $@
+	$(STRIP) $(STRIP_FLAGS) $@ -o $@
 endif
 
 $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXFULLVER): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
@@ -238,7 +239,7 @@
 	$(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(SHLDFLAGS)
 ifeq (True, $(PROCESS_FILES))
 	cp $@ $(LIBPREFIX)$(PROJECT_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIXFULLVER)
-	strip $(STRIP_FLAGS) $@ -o $@
+	$(STRIP) $(STRIP_FLAGS) $@ -o $@
 endif
 
 ifneq ($(SHAREDLIBSUFFIXFULLVER),$(SHAREDLIBSUFFIX))
@@ -268,7 +269,7 @@
 	$(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(SHLDFLAGS) $(MODULE_LDFLAGS)
 ifeq (True, $(PROCESS_FILES))
 	cp $@ $(LIBPREFIX)$(MODULE_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIXFULLVER)
-	strip $(STRIP_FLAGS) $@ -o $@
+	$(STRIP) $(STRIP_FLAGS) $@ -o $@
 endif
 
 ifneq ($(SHAREDLIBSUFFIXFULLVER),$(SHAREDLIBSUFFIX))