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 \
7 ifeq ($(enable_shared),yes)
9 # Linker mapfile to enforce direct binding to libgcc_s unwinder
11 # Emit v2 mapfile syntax if possible, otherwise ld -z guidance complains
12 # every time the mapfile is used.
13 libgcc-unwind.map: libgcc-std.ver
14 ifeq ($(solaris_ld_v2_maps),yes)
15 @(echo '$$mapfile_version 2'; \
16 echo "SYMBOL_SCOPE {"; \
17 for f in `grep _Unwind_ $< | sort`; do \
18 echo " $$f { FLAGS = EXTERN DIRECT };"; \
23 for f in `grep _Unwind_ $< | sort`; do \
24 echo " $$f = EXTERN DIRECT;"; \
29 # Copy libgcc-unwind.map to the place where gcc will look for it at build-time.
30 install-libgcc-unwind-map-forbuild: libgcc-unwind.map
31 dest=$(gcc_objdir)/tmp$$$$-$<; \
34 sh $(srcdir)/../move-if-change $$dest $(gcc_objdir)/$<
36 all: install-libgcc-unwind-map-forbuild
38 install-libgcc-unwind-map: libgcc-unwind.map
39 $(INSTALL_DATA) $< $(DESTDIR)$(slibdir)
41 install: install-libgcc-unwind-map