1 # Build a shared libgcc library for ELF with symbol versioning
5 SHLIB_SOLINK = @shlib_base_name@.so
7 SHLIB_SONAME = @shlib_base_name@.so.$(SHLIB_SOVERSION)
8 SHLIB_MAP = @shlib_map_file@
9 SHLIB_OBJS = @shlib_objs@
10 SHLIB_DIR = @multilib_dir@
11 SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
14 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
15 -Wl,--soname=$(SHLIB_SONAME) \
16 -Wl,--version-script=$(SHLIB_MAP) \
17 -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
18 $(SHLIB_OBJS) $(SHLIB_LC) && \
19 rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
20 if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
21 mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
22 $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
24 mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
25 $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
26 # $(slibdir) double quoted to protect it from expansion while building
27 # libgcc.mk. We want this delayed until actual install time.
29 $$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
30 $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \
31 $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
32 rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
33 $(LN_S) $(SHLIB_SONAME) \
34 $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
35 SHLIB_MKMAP = $(srcdir)/mkmap-symver.awk
36 SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver