1 # Build libunwind for ELF with the GNU linker.
3 # Use unwind-dw2-fde-glibc
4 LIBUNWIND = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c
5 LIBUNWINDDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
7 SHLIBUNWIND_SOVERSION = 7
8 SHLIBUNWIND_SONAME = @shlib_so_name@.so.$(SHLIBUNWIND_SOVERSION)
9 SHLIBUNWIND_NAME = @shlib_dir@@shlib_so_name@.so.$(SHLIBUNWIND_SOVERSION)
11 SHLIBUNWIND_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared \
12 -nodefaultlibs -Wl,-h,$(SHLIBUNWIND_SONAME) \
13 -Wl,-z,text -Wl,-z,defs -o $(SHLIBUNWIND_NAME).tmp \
14 @multilib_flags@ $(SHLIB_OBJS) -lc && \
15 rm -f $(SHLIB_SOLINK) && \
16 if [ -f $(SHLIBUNWIND_NAME) ]; then \
17 mv -f $(SHLIBUNWIND_NAME) \
18 $(SHLIBUNWIND_NAME).`basename $(STAGE_PREFIX)`; \
20 mv $(SHLIBUNWIND_NAME).tmp $(SHLIBUNWIND_NAME) && \
21 $(LN_S) $(SHLIBUNWIND_NAME) $(SHLIB_SOLINK)
23 # $(slibdir) double quoted to protect it from expansion while building
24 # libgcc.mk. We want this delayed until actual install time.
25 SHLIBUNWIND_INSTALL = \
26 $$(SHELL) $$(srcdir)/mkinstalldirs $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
27 $(INSTALL_DATA) $(SHLIBUNWIND_NAME) \
28 $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIBUNWIND_SONAME); \
29 rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
30 $(LN_S) $(SHLIBUNWIND_SONAME) \
31 $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)