PR debug/57232
[official-gcc.git] / libgcc / config / t-slibgcc-sld
blobec6e5db0a3bc353175e86ebbdb52c71e7526fe66
1 # Build a shared libgcc library for ELF with symbol versioning
2 # with the Solaris linker.
4 SHLIB_LDFLAGS = -Wl,-h,$(SHLIB_SONAME) -Wl,-z,text -Wl,-z,defs \
5         -Wl,-M,$(SHLIB_MAP)
7 # Linker mapfile to enforce direct binding to libgcc_s unwinder
8 # (PR target/59788).
9 libgcc-unwind.map: libgcc-std.ver
10         @(echo "{";                             \
11         for f in `grep _Unwind_ $< | sort`; do  \
12           echo "        $$f = EXTERN DIRECT;";  \
13         done;                                   \
14         echo "};" ) > $@
16 # Copy libgcc-unwind.map to the place where gcc will look for it at build-time.
17 install-libgcc-unwind-map-forbuild: libgcc-unwind.map
18         dest=$(gcc_objdir)/tmp$$$$-$<; \
19         cp $< $$dest; \
20         chmod a+r $$dest; \
21         sh $(srcdir)/../move-if-change $$dest $(gcc_objdir)/$<
23 all: install-libgcc-unwind-map-forbuild
25 install-libgcc-unwind-map: libgcc-unwind.map
26         $(INSTALL_DATA) $< $(DESTDIR)$(slibdir)
28 install: install-libgcc-unwind-map