LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / libgcc / config / i386 / t-slibgcc-cygming
blob6236c78e4668ede59480732609e80ae5e3e84b43
1 # Build a shared libgcc library for PECOFF with a DEF file
2 # with the GNU linker.
4 # mkmap-flat.awk is used with the pe_dll option to produce a DEF instead
5 # of an ELF map file.
7 # Warning: If SHLIB_SOVERSION or SHLIB_SONAME are updated, LIBGCC_SONAME
8 # in mingw32.h and SHLIB_MKMAP_OPTS below must be updated also.
10 SHLIB_EXT = .dll
11 SHLIB_IMPLIB = @shlib_base_name@.a
12 SHLIB_SOVERSION = 1
13 SHLIB_SONAME = @shlib_base_name@_$(EH_MODEL)-$(SHLIB_SOVERSION)$(SHLIB_EXT)
14 SHLIB_MAP = @shlib_map_file@
15 SHLIB_OBJS = @shlib_objs@
16 SHLIB_DIR = @multilib_dir@/shlib
17 SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
18 # SHLIB_DLLDIR is defined by including one of either t-dlldir or t-dlldir-x
19 # (native/cross build respectively) in the tmake_file list in
20 # libgcc/config.host.
21 ifndef SHLIB_DLLDIR
22 $(error SHLIB_DLLDIR must be defined)
23 endif
24 ifndef SHLIB_PTHREAD_CFLAG
25 SHLIB_PTHREAD_CFLAG =
26 endif
27 ifndef SHLIB_PTHREAD_LDFLAG
28 SHLIB_PTHREAD_LDFLAG =
29 endif
31 SHLIB_LINK = $(LN_S) -f $(SHLIB_MAP) $(SHLIB_MAP).def && \
32         if [ ! -d $(SHLIB_DIR) ]; then \
33                 mkdir $(SHLIB_DIR); \
34         else true; fi && \
35         $(CC) $(LIBGCC2_CFLAGS) $(SHLIB_PTHREAD_CFLAG) \
36         -shared -nodefaultlibs \
37         $(SHLIB_MAP).def \
38         -Wl,--out-implib,$(SHLIB_DIR)/$(SHLIB_IMPLIB).tmp \
39         -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
40         $(SHLIB_OBJS) ${SHLIB_PTHREAD_LDFLAG} $(SHLIB_LC) && \
41         if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
42           mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
43                 $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
44         else true; fi && \
45         mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
46         mv $(SHLIB_DIR)/$(SHLIB_IMPLIB).tmp $(SHLIB_DIR)/$(SHLIB_IMPLIB)
47 SHLIB_INSTALL = \
48         $(mkinstalldirs) $(DESTDIR)$(SHLIB_DLLDIR) \
49           $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
50         $(INSTALL) $(SHLIB_DIR)/$(SHLIB_SONAME) \
51           $(DESTDIR)$(SHLIB_DLLDIR)/$(SHLIB_SONAME); \
52         $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_IMPLIB) \
53           $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_IMPLIB)
54 SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
55 # We'd like to use SHLIB_SONAME here too, but shlib_base_name
56 # does not get substituted before mkmap-flat.awk is run.
57 SHLIB_MKMAP_OPTS = -v pe_dll=libgcc_s_$(EH_MODEL)-$(SHLIB_SOVERSION)$(SHLIB_EXT)
58 SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-cygming.ver