# Shorthand expressions for the LINK below, these are substituted in the
# link expression.
SHLIB_INSTALL_NAME = @shlib_base_name@.$(SHLIB_SOVERSION)$(SHLIB_EXT)
SHLIB_MAP = @shlib_map_file@
SHLIB_DIR = @multilib_dir@
SHLIB_SONAME = @shlib_base_name@$(SHLIB_EXT)
# Darwin only searches in shlib_slibdir for shared libraries, not in
# subdirectories. The link builds one architecture slice in its designated
# subdir. The code under MULTIBUILDTOP combines these into a single FAT
# library, that is what we eventually install.
# When enable_darwin_at_rpath is true, use @rpath instead of $(slibdir) for
# this and dylibs that depend on this. So this def must come first and be
# overridden in a make fragment that depends on the rpath setting.
SHLIB_RPATH = $(slibdir)
# We are going to build a libgcc_s.1.dylib so that distributions can
# install it for compatibility with binaries linked against the old
# libgcc_ext.10.x.dylib stubs.
# For systems after macOS 10.7 we can forward the correct unwinder symbols
# from libSystem.
# For older systems we have to forward an entire library (since they cannot
# selectively forward symbols, which means that we cannot forward the unwinder
# in /usr/lib/libgcc_s.1.dylib). We also cannot forward the entire library
# since that creates a self-referencing loop when DYLD_LIBRARY_PATH is used.
# To provide the unwinder symbols in this case, we build the unwinder into a
# separate shared lib (libgcc_ehs) and forward that.
# These targets are local to this make fragment, which means that they do not
# get the substitutions seen in SHLIB_LINK.
install-darwin-libgcc-stubs :
$(mkinstalldirs) $(DESTDIR)$(slibdir)
if test x$(slibdir) = x; then \
for d in $(LGCC_FILES) ; do \
$(INSTALL_DATA) $$d $(DESTDIR)$(slibdir)/$$d || exit 1 ; \
done; \
else \
for d in $(INSTALL_FILES) ; do \
$(INSTALL_DATA) $$d $(DESTDIR)$(slibdir)/$$d || exit 1 ; \
done; \
fi
else
# Do not install shared libraries for multilibs. Unless we are putting them
# in the gcc directory during a build, for compatibility with the pre-top-
# level layout. In that case we provide symlinks to the FAT lib from the
# multilib sub-directories.