1146895Skan# Build libunwind for ELF with the GNU linker. 2146895Skan 3146895Skan# Use unwind-dw2-fde-glibc 4146895SkanLIBUNWIND = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c 5146895SkanLIBUNWINDDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c 6146895Skan 7146895SkanSHLIBUNWIND_SOVERSION = 7 8169689SkanSHLIBUNWIND_SONAME = @shlib_base_name@.so.$(SHLIBUNWIND_SOVERSION) 9146895Skan 10146895SkanSHLIBUNWIND_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared \ 11146895Skan -nodefaultlibs -Wl,-h,$(SHLIBUNWIND_SONAME) \ 12169689Skan -Wl,-z,text -Wl,-z,defs -o $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME).tmp \ 13146895Skan @multilib_flags@ $(SHLIB_OBJS) -lc && \ 14169689Skan rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ 15169689Skan if [ -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) ]; then \ 16169689Skan mv -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) \ 17169689Skan $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME).backup; \ 18146895Skan else true; fi && \ 19169689Skan mv $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME).tmp \ 20169689Skan $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) && \ 21169689Skan $(LN_S) $(SHLIBUNWIND_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) 22146895Skan 23146895Skan# $(slibdir) double quoted to protect it from expansion while building 24146895Skan# libgcc.mk. We want this delayed until actual install time. 25146895SkanSHLIBUNWIND_INSTALL = \ 26146895Skan $$(SHELL) $$(srcdir)/mkinstalldirs $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \ 27169689Skan $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) \ 28146895Skan $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIBUNWIND_SONAME); \ 29146895Skan rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \ 30146895Skan $(LN_S) $(SHLIBUNWIND_SONAME) \ 31146895Skan $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) 32