gcc/libgcc/config/t-slibgcc-sld
Rainer Orth cceaf54a4a Don't build libgcc-unwind.map with --disable-shared (PR libgcc/61097)
PR libgcc/61097
	* config/t-slibgcc-sld: Only build and install libgcc-unwind.map
	if --enable-shared.

From-SVN: r210210
2014-05-08 12:11:14 +00:00

33 lines
886 B
Plaintext

# 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)
ifeq ($(enable_shared),yes)
# Linker mapfile to enforce direct binding to libgcc_s unwinder
# (PR target/59788).
libgcc-unwind.map: libgcc-std.ver
@(echo "{"; \
for f in `grep _Unwind_ $< | sort`; do \
echo " $$f = EXTERN DIRECT;"; \
done; \
echo "};" ) > $@
# 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