1 # Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
3 # This file is part of GCC.
5 # GCC is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3, or (at your option)
10 # GCC is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with GCC; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
19 # Build a shared libgcc library with the Solaris linker.
22 SHLIB_SOLINK = @shlib_base_name@.so
23 SHLIB_SONAME = @shlib_base_name@.so.1
24 SHLIB_MAP = @shlib_map_file@
25 SHLIB_OBJS = @shlib_objs@
26 SHLIB_DIR = @multilib_dir@
27 SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
29 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
30 -Wl,-h,$(SHLIB_SONAME) -Wl,-z,text -Wl,-z,defs \
31 -Wl,-M,$(SHLIB_MAP) -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
32 @multilib_flags@ $(SHLIB_OBJS) -lc && \
33 rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
34 if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
35 mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
36 $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
38 mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
39 $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
40 # $(slibdir) double quoted to protect it from expansion while building
41 # libgcc.mk. We want this delayed until actual install time.
43 $$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
44 $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \
45 $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
46 rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
47 $(LN_S) $(SHLIB_SONAME) \
48 $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
49 SHLIB_MKMAP = $(srcdir)/mkmap-symver.awk
50 SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver