Retro68/gcc/libgcc/config/t-slibgcc-sld

44 lines
1.2 KiB
Plaintext
Raw Normal View History

2012-03-27 23:13:14 +00:00
# Build a shared libgcc library for ELF with symbol versioning
# with the Solaris linker.
SHLIB_LDFLAGS = -Wl,-h,$(SHLIB_SONAME) -Wl,-z,text -Wl,-z,defs \
-Wl,-M,$(SHLIB_MAP)
2014-09-21 17:33:12 +00:00
ifeq ($(enable_shared),yes)
# Linker mapfile to enforce direct binding to libgcc_s unwinder
# (PR target/59788).
2019-06-02 15:48:37 +00:00
# Emit v2 mapfile syntax if possible, otherwise ld -z guidance complains
# every time the mapfile is used.
2014-09-21 17:33:12 +00:00
libgcc-unwind.map: libgcc-std.ver
2019-06-02 15:48:37 +00:00
ifeq ($(solaris_ld_v2_maps),yes)
@(echo '$$mapfile_version 2'; \
echo "SYMBOL_SCOPE {"; \
for f in `grep _Unwind_ $< | sort`; do \
echo " $$f { FLAGS = EXTERN DIRECT };"; \
done; \
echo "};" ) > $@
else
2014-09-21 17:33:12 +00:00
@(echo "{"; \
for f in `grep _Unwind_ $< | sort`; do \
echo " $$f = EXTERN DIRECT;"; \
done; \
echo "};" ) > $@
2019-06-02 15:48:37 +00:00
endif
2014-09-21 17:33:12 +00:00
# Copy libgcc-unwind.map to the place where gcc will look for it at build-time.
install-libgcc-unwind-map-forbuild: libgcc-unwind.map
dest=$(gcc_objdir)/tmp$$$$-$<; \
cp $< $$dest; \
chmod a+r $$dest; \
sh $(srcdir)/../move-if-change $$dest $(gcc_objdir)/$<
all: install-libgcc-unwind-map-forbuild
install-libgcc-unwind-map: libgcc-unwind.map
$(INSTALL_DATA) $< $(DESTDIR)$(slibdir)
install: install-libgcc-unwind-map
endif