* c-common.c (catenate_strings): New.
[official-gcc.git] / gcc / config / t-slibgcc-darwin
blobfbbf1c01afaba7d3410d6b9f09282091b2f3b78b
1 # Build a shared libgcc library with the darwin linker.
2 SHLIB_MINOR = 1
3 SHLIB_REVISION = 0
4 SHLIB_VERSTRING = -compatibility_version $(SHLIB_MINOR) -current_version $(SHLIB_MINOR).$(SHLIB_REVISION)
5 SHLIB_EXT = .dylib
6 SHLIB_SOLINK = @shlib_base_name@.dylib
7 SHLIB_SONAME = @shlib_so_name@.$(SHLIB_MINOR).$(SHLIB_REVISION).dylib
8 SHLIB_NAME = @shlib_dir@@shlib_so_name@.$(SHLIB_MINOR).$(SHLIB_REVISION).dylib
9 SHLIB_MAP = @shlib_map_file@
10 SHLIB_OBJS = @shlib_objs@
11 SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
13 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \
14         -Wl,-install_name,$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME) \
15         -Wl,-flat_namespace -o $(SHLIB_NAME).tmp \
16         $(SHLIB_VERSTRING) \
17         @multilib_flags@ $(SHLIB_OBJS) -lc && \
18         rm -f $(SHLIB_SOLINK) && \
19         if [ -f $(SHLIB_NAME) ]; then \
20           mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
21         else true; fi && \
22         mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
23         $(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
24 # $(slibdir) double quoted to protect it from expansion while building
25 # libgcc.mk.  We want this delayed until actual install time.
26 SHLIB_INSTALL = \
27         $$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
28         $(INSTALL_DATA) $(SHLIB_NAME) \
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-symver.awk
34 SHLIB_MAPFILES = $(srcdir)/libgcc-darwin.ver