91da048112
gcc: PR target/59788 * config/sol2.h (LINK_LIBGCC_MAPFILE_SPEC): Define. (LINK_SPEC): Use it for -shared, -shared-libgcc. libgcc: PR target/59788 * config/t-slibgcc-sld (libgcc-unwind.map): New target. (install-libgcc-unwind-map-forbuild): New target. (all): Depend on install-libgcc-unwind-map-forbuild. (install-libgcc-unwind-map): New target. (install): Depend on install-libgcc-unwind-map. gcc/testsuite: PR target/59788 * g++.dg/eh/unwind-direct.C: New test. toplevel: PR target/59788 * ltmain.sh (opt_duplicate_compiler_generated_deps): Enable on *solaris2*. From-SVN: r207454
29 lines
850 B
Plaintext
29 lines
850 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)
|
|
|
|
# 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
|