summaryrefslogtreecommitdiff
path: root/libgcc/config/sh/t-linux
blob: 8fce1091547e34e7722aaac588c8c5e1f60045bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
HOST_LIBGCC2_CFLAGS = -fpic -mieee -DNO_FPSCR_VALUES

# Override t-slibgcc-elf-ver to export some libgcc symbols with
# the symbol versions that glibc used, and hide some lib1func
# routines which should not be called via PLT.  We have to create
# the list from scratch.
SHLIB_MAPFILES = \
	$(gcc_srcdir)/libgcc-std.ver \
	$(gcc_srcdir)/config/sh/libgcc-excl.ver \
	$(gcc_srcdir)/config/sh/libgcc-glibc.ver

# Override SHLIB_LINK and SHLIB_INSTALL to use linker script
# libgcc_s.so.
SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
	-Wl,--soname=@shlib_base_name@.so.1 \
	-Wl,--version-script=@shlib_map_file@ \
	-o @multilib_dir@/@shlib_base_name@.so.1.tmp @multilib_flags@ \
	@shlib_objs@ -lc && \
	rm -f @multilib_dir@/@shlib_base_name@.so && \
	if [ -f @multilib_dir@/@shlib_base_name@.so.1 ]; then \
	  mv -f @multilib_dir@/@shlib_base_name@.so.1 \
		@multilib_dir@/@shlib_base_name@.so.1.backup; \
	else true; fi && \
	mv @multilib_dir@/@shlib_base_name@.so.1.tmp \
	   @multilib_dir@/@shlib_base_name@.so.1 && \
	(echo "/* GNU ld script"; \
	 echo "   Use the shared library, but some functions are only in"; \
	 echo "   the static library.  */"; \
	 echo "GROUP ( @shlib_base_name@.so.1 libgcc.a )" \
	) > @multilib_dir@/@shlib_base_name@.so
SHLIB_INSTALL = \
	$(mkinstalldirs) $(DESTDIR)$(slibdir)@shlib_slibdir_qual@; \
	$(INSTALL_DATA) @multilib_dir@/@shlib_base_name@.so.1 \
	  $(DESTDIR)$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so.1; \
	rm -f $(DESTDIR)$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so; \
	$(INSTALL_DATA) @multilib_dir@/@shlib_base_name@.so \
	  $(DESTDIR)$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so