Makefile: strip debugging informations only

--strip-unneeded causes SIGSEGV when accessing g_executable_path. So
test_libvpx crashes due to SIGSEGV in ::testing::InitGoogleTest().

OS/2, aout, strip v2.23.2

Change-Id: I2718d082447ee0d9ad0c021b9156c50e1ac085a6
This commit is contained in:
KO Myung-Hun 2014-07-22 20:19:52 +09:00 committed by James Zern
parent 374c885919
commit 11f2d4df95

View File

@ -196,13 +196,13 @@ $(BUILD_PFX)%.asm.s: %.asm
# the copy implementation
HAVE_GNU_STRIP := $(if $(CONFIG_DEBUG),,$(HAVE_GNU_STRIP))
ifeq ($(HAVE_GNU_STRIP),yes)
# Older binutils strip global sybols not needed for relocation processing
# when given --strip-unneeded. Use nm and awk to identify globals and
# keep them.
# Older binutils strip global symbols not needed for relocation processing
# when given --strip-unneeded. Using nm and awk to identify globals and
# keep them caused command line length issues under mingw and segfaults in
# test_libvpx were observed under OS/2: simply use --strip-debug.
%.a: %_g.a
$(if $(quiet),@echo " [STRIP] $@ < $<")
$(qexec)$(STRIP) --strip-unneeded \
`$(NM) $< | grep ' [A-TV-Z] ' | awk '{print "-K"$$3'}`\
$(qexec)$(STRIP) --strip-debug \
-o $@ $<
else
%.a: %_g.a