The Darwin toolchains have a separate debug linker (dsymutil) so that the
link-time penalty for debug data is not usually seen. At present, it's not
clear how we would support split DWARF on Darwin (or if it would bring
any additional benefit over dsymutil).
This patch produces diagnostic output to note that it's not supported and
disables it. We also skip test cases that invoke -gsplit-dwarf.
NOTE that the tests failed because of PR81685 and this fix will need to
be back-ported after the fix for 81685.
OK for trunk?
affected branches (7,8)?
thanks
Iain
gcc/
config/darwin.c
config/darwin.h
gcc/testsuite/
g++.dg/debug/dwarf2/pr85302.C
gcc.dg/lto/pr83719_0.c
gcc.dg/pr86064.c
---
gcc/config/darwin.c | 8
gcc/config/darwin.h | 5 -
gcc/testsuite/g++.dg/debug/dwarf2/pr85302.C | 1 +
gcc/testsuite/gcc.dg/lto/pr83719_0.c| 1 +
gcc/testsuite/gcc.dg/pr86064.c | 1 +
5 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index db988850fd..41a1cef250 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -3190,6 +3190,14 @@ darwin_override_options (void)
if (!global_options_set.x_dwarf_version)
dwarf_version = 2;
+ if (global_options_set.x_dwarf_split_debug_info)
+{
+ inform (input_location,
+ "-gsplit-dwarf is not supported on this platform, ignored");
+ dwarf_split_debug_info = 0;
+ global_options_set.x_dwarf_split_debug_info = 0;
+}
+
/* Do not allow unwind tables to be generated by default for m32.
fnon-call-exceptions will override this, regardless of what we do. */
if (generating_for_darwin_version < 10
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index bec19b6488..f954ba3cab 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -122,7 +122,8 @@ extern GTY(()) int darwin_ms_struct;
"%{gfull:-g -fno-eliminate-unused-debug-symbols} %