aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sigtramp-ios.c
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-08-28 19:09:45 +0100
committerIain Sandoe <iain@sandoe.co.uk>2021-11-05 20:58:36 +0000
commitf8a1e0699328268e98e18eb100f5af37e92dab9f (patch)
treea448ab509c9af3a2194e9320ea9b1b541d4682be /gcc/ada/sigtramp-ios.c
parent834c8749ced550af3f17ebae4072fb7dfb90d271 (diff)
downloadgcc-f8a1e0699328268e98e18eb100f5af37e92dab9f.zip
gcc-f8a1e0699328268e98e18eb100f5af37e92dab9f.tar.gz
gcc-f8a1e0699328268e98e18eb100f5af37e92dab9f.tar.bz2
Darwin, aarch64 : Ada fixes for hosted tools.
This will allow someone (with an existing Ada compiler on the platform - which can be provided by the experimental aarch64-darwin branch) - to build the host tools (gnatmake and friends) for a non-native cross. The existing provisions for iOS are OK for cross-compilation from an x86-64-darwin platform, but we need some adjustments so that these host tools can be built to run on aarch64-darwin. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/ada/ * gcc-interface/Make-lang.in: Use iOS signal trampoline code for hosted Ada tools. * sigtramp-ios.c: Wrap the declarations in extern "C" when the code is built by a C++ compiler.
Diffstat (limited to 'gcc/ada/sigtramp-ios.c')
-rw-r--r--gcc/ada/sigtramp-ios.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/sigtramp-ios.c b/gcc/ada/sigtramp-ios.c
index 6e2913d..8403a18 100644
--- a/gcc/ada/sigtramp-ios.c
+++ b/gcc/ada/sigtramp-ios.c
@@ -71,6 +71,10 @@
/* sigtramp stub providing unwind info for common registers. */
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
extern void __gnat_sigtramp_common
(int signo, void *siginfo, void *sigcontext,
__sigtramphandler_t * handler);
@@ -87,6 +91,10 @@ void __gnat_sigtramp (int signo, void *si, void *ucontext,
__gnat_sigtramp_common (signo, si, mcontext, handler);
}
+#if defined(__cplusplus)
+}
+#endif
+
/* asm string construction helpers. */
#define STR(TEXT) #TEXT