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