1 # Build a shared libgcc library.
3 SHLIB_NAME = @shlib_base_name@$(SHLIB_EXT)
5 SHLIB_SONAME = @shlib_base_name@.$(SHLIB_SOVERSION)
6 SHLIB_OBJS = @shlib_objs@
7 SHLIB_DIR = @multilib_dir@
8 SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
10 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
11 -o $(SHLIB_DIR)/$(SHLIB_NAME).tmp @multilib_flags@ \
12 $(SHLIB_OBJS) -lc && \
13 rm -f $(SHLIB_DIR)/$(SHLIB_SONAME) && \
14 if [ -f $(SHLIB_DIR)/$(SHLIB_NAME) ]; then \
15 mv -f $(SHLIB_DIR)/$(SHLIB_NAME) $(SHLIB_DIR)/$(SHLIB_NAME).backup; \
17 mv $(SHLIB_DIR)/$(SHLIB_NAME).tmp $(SHLIB_DIR)/$(SHLIB_NAME) && \
18 $(LN_S) $(SHLIB_NAME) $(SHLIB_DIR)/$(SHLIB_SONAME)
20 # $(slibdir) double quoted to protect it from expansion while building
21 # libgcc.mk. We want this delayed until actual install time.
23 $$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
24 $(INSTALL_DATA) -m 555 $(SHLIB_DIR)/$(SHLIB_NAME) \
25 $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
26 rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_NAME); \
27 $(LN_S) $(SHLIB_SONAME) \
28 $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_NAME)