aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/t-darwin
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2021-09-18 17:08:42 +0100
committerIain Sandoe <iain@sandoe.co.uk>2021-09-19 19:35:00 +0100
commit873854387865d18484bd0d39324773cd1e76df85 (patch)
tree8fb413f57539f26e0a152f175e8e0305313aeeae /libgcc/config/t-darwin
parentf75b237254f32d5be32c9d9610983b777abea633 (diff)
downloadgcc-873854387865d18484bd0d39324773cd1e76df85.zip
gcc-873854387865d18484bd0d39324773cd1e76df85.tar.gz
gcc-873854387865d18484bd0d39324773cd1e76df85.tar.bz2
Darwin, crts: Build Darwin10 unwinder shim as a library.
We have a small unwinder shim that is only used for Darwin10 (and only then in quite specific cases). To avoid linking this code for every executable or DSO, we can present the crt as a convenience library (rather than a .o file). Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/ChangeLog: * config/darwin.h (LINK_COMMAND_SPEC_A): Use Darwin10 unwinder shim as a convenience library. libgcc/ChangeLog: * config.host: Use convenience library for Darwin10 unwinder shim. * config/t-darwin: Build Darwin10 unwinder shim as a convenience library.
Diffstat (limited to 'libgcc/config/t-darwin')
-rw-r--r--libgcc/config/t-darwin6
1 files changed, 6 insertions, 0 deletions
diff --git a/libgcc/config/t-darwin b/libgcc/config/t-darwin
index 3b5e342..4b6317b 100644
--- a/libgcc/config/t-darwin
+++ b/libgcc/config/t-darwin
@@ -18,3 +18,9 @@ LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/config/unwind-dw2-fde-darwin.c \
# Patch to __Unwind_Find_Enclosing_Function for Darwin10.
d10-uwfef.o: $(srcdir)/config/darwin10-unwind-find-enc-func.c
$(crt_compile) -mmacosx-version-min=10.6 -c $<
+
+# Using this crt as a library means that it will not be added to an exe
+# (or module) unless needed.
+libd10-uwfef.a: d10-uwfef.o
+ $(AR_CREATE_FOR_TARGET) $@ d10-uwfef.o
+ $(RANLIB_FOR_TARGET) $@