From 57e02b662906f80ae43445a328c5476d1b92bd60 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 17 Jan 2018 14:14:10 +0100 Subject: [PATCH] Strip debug symbols from binaries on install --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d3ddbd870..e9627f8d9 100644 --- a/Makefile +++ b/Makefile @@ -64,6 +64,7 @@ PLUGIN_LDFLAGS := PKG_CONFIG ?= pkg-config SED ?= sed BISON ?= bison +STRIP ?= strip ifeq (Darwin,$(findstring Darwin,$(shell uname))) PLUGIN_LDFLAGS += -undefined dynamic_lookup @@ -499,11 +500,21 @@ clean-unit-test: install: $(TARGETS) $(EXTRA_TARGETS) $(INSTALL_SUDO) mkdir -p $(DESTDIR)$(BINDIR) - $(INSTALL_SUDO) install $(TARGETS) $(DESTDIR)$(BINDIR) + $(INSTALL_SUDO) cp $(TARGETS) $(DESTDIR)$(BINDIR) +ifneq ($(filter yosys,$(TARGETS)),) + $(INSTALL_SUDO) $(STRIP) -d $(DESTDIR)$(BINDIR)/yosys +endif +ifneq ($(filter yosys-abc,$(TARGETS)),) + $(INSTALL_SUDO) $(STRIP) $(DESTDIR)$(BINDIR)/yosys-abc +endif +ifneq ($(filter yosys-filterlib,$(TARGETS)),) + $(INSTALL_SUDO) $(STRIP) $(DESTDIR)$(BINDIR)/yosys-filterlib +endif $(INSTALL_SUDO) mkdir -p $(DESTDIR)$(DATDIR) $(INSTALL_SUDO) cp -r share/. $(DESTDIR)$(DATDIR)/. ifeq ($(ENABLE_LIBYOSYS),1) $(INSTALL_SUDO) cp libyosys.so $(DESTDIR)$(LIBDIR) + $(INSTALL_SUDO) $(STRIP) -d $(DESTDIR)$(LIBDIR)/libyosys.so $(INSTALL_SUDO) ldconfig endif -- 2.30.2