]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgcc/config/i386/t-slibgcc-cygming
Update copyright years.
[thirdparty/gcc.git] / libgcc / config / i386 / t-slibgcc-cygming
CommitLineData
b040f2be
RO
1# Build a shared libgcc library for PECOFF with a DEF file
2# with the GNU linker.
3#
4# mkmap-flat.awk is used with the pe_dll option to produce a DEF instead
5# of an ELF map file.
6#
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.
9
10SHLIB_EXT = .dll
11SHLIB_IMPLIB = @shlib_base_name@.a
12SHLIB_SOVERSION = 1
13SHLIB_SONAME = @shlib_base_name@_$(EH_MODEL)-$(SHLIB_SOVERSION)$(SHLIB_EXT)
14SHLIB_MAP = @shlib_map_file@
15SHLIB_OBJS = @shlib_objs@
16SHLIB_DIR = @multilib_dir@/shlib
17SHLIB_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.
21ifndef SHLIB_DLLDIR
22$(error SHLIB_DLLDIR must be defined)
23endif
24ifndef SHLIB_PTHREAD_CFLAG
25SHLIB_PTHREAD_CFLAG =
26endif
27ifndef SHLIB_PTHREAD_LDFLAG
28SHLIB_PTHREAD_LDFLAG =
29endif
f036d759
LH
30ifndef SHLIB_MCFGTHREAD_LIBS
31SHLIB_MCFGTHREAD_LIBS =
32endif
b040f2be
RO
33
34SHLIB_LINK = $(LN_S) -f $(SHLIB_MAP) $(SHLIB_MAP).def && \
35 if [ ! -d $(SHLIB_DIR) ]; then \
36 mkdir $(SHLIB_DIR); \
37 else true; fi && \
38 $(CC) $(LIBGCC2_CFLAGS) $(SHLIB_PTHREAD_CFLAG) \
39 -shared -nodefaultlibs \
40 $(SHLIB_MAP).def \
41 -Wl,--out-implib,$(SHLIB_DIR)/$(SHLIB_IMPLIB).tmp \
42 -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
f036d759
LH
43 $(SHLIB_OBJS) ${SHLIB_PTHREAD_LDFLAG} $(SHLIB_LC) \
44 $(SHLIB_MCFGTHREAD_LIBS) && \
b040f2be
RO
45 if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
46 mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
47 $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
48 else true; fi && \
49 mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
50 mv $(SHLIB_DIR)/$(SHLIB_IMPLIB).tmp $(SHLIB_DIR)/$(SHLIB_IMPLIB)
51SHLIB_INSTALL = \
52 $(mkinstalldirs) $(DESTDIR)$(SHLIB_DLLDIR) \
53 $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
54 $(INSTALL) $(SHLIB_DIR)/$(SHLIB_SONAME) \
55 $(DESTDIR)$(SHLIB_DLLDIR)/$(SHLIB_SONAME); \
56 $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_IMPLIB) \
57 $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_IMPLIB)
58SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
59# We'd like to use SHLIB_SONAME here too, but shlib_base_name
60# does not get substituted before mkmap-flat.awk is run.
61SHLIB_MKMAP_OPTS = -v pe_dll=libgcc_s_$(EH_MODEL)-$(SHLIB_SOVERSION)$(SHLIB_EXT)
bf1431e3 62SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-cygming.ver