aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2018-08-18 09:15:05 +0000
committerIain Sandoe <iains@gcc.gnu.org>2018-08-18 09:15:05 +0000
commitc7a52e72da5d893545496a2f6772374c7282ba9c (patch)
treedf123e91f7060b140c0ac489544c88ca883e2ca7 /gcc
parent2ed3a817c841071731219272de54c2aaefa741be (diff)
downloadgcc-c7a52e72da5d893545496a2f6772374c7282ba9c.zip
gcc-c7a52e72da5d893545496a2f6772374c7282ba9c.tar.gz
gcc-c7a52e72da5d893545496a2f6772374c7282ba9c.tar.bz2
Darwin does not support gsplit-dwarf.
2018-08-18 Iain Sandoe <iain@sandoe.co.uk> gcc/ * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set, emit a diagnostic that it is not supported and reset the option. * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not supported and consume the option. (ASM_FINAL_SPEC): New. gcc/testsuite * g++.dg/debug/dwarf2/pr85302.C: Skip unsupported split DWARF test on Darwin. * g++.dg/debug/dwarf2/pr85302.C: Likewise. * gcc.dg/lto/pr83719_0.c: Likewise. From-SVN: r263645
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/darwin.c8
-rw-r--r--gcc/config/darwin.h6
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pr85302.C1
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr83719_0.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr86064.c1
7 files changed, 30 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7babd0d..ccc76e4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
+ emit a diagnostic that it is not supported and reset the option.
+ * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
+ supported and consume the option. (ASM_FINAL_SPEC): New.
+
2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
* doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index a31cb08..233076a 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -3176,6 +3176,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 166c3c7..05c8cf7 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -122,7 +122,9 @@ extern GTY(()) int darwin_ms_struct;
"%{gfull:-g -fno-eliminate-unused-debug-symbols} %<gfull", \
"%{gused:-g -feliminate-unused-debug-symbols} %<gused", \
"%{fapple-kext|mkernel:-static}", \
- "%{shared:-Zdynamiclib} %<shared"
+ "%{shared:-Zdynamiclib} %<shared", \
+ "%{gsplit-dwarf:%ngsplit-dwarf is not supported on this platform } \
+ %<gsplit-dwarf"
#define DARWIN_CC1_SPEC \
"%{findirect-virtual-calls: -fapple-kext} %<findirect-virtual-calls " \
@@ -421,6 +423,8 @@ extern GTY(()) int darwin_ms_struct;
debugging data. */
#define ASM_DEBUG_SPEC "%{g*:%{%:debug-level-gt(0):%{!gdwarf*:--gstabs}}}"
+#define ASM_FINAL_SPEC \
+ "%{gsplit-dwarf:%ngsplit-dwarf is not supported on this platform } %<gsplit-dwarf"
/* We still allow output of STABS if the assembler supports it. */
#ifdef HAVE_AS_STABS_DIRECTIVE
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3478f11..5a1aedf 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
+
+ * g++.dg/debug/dwarf2/pr85302.C: Skip unsupported split DWARF
+ test on Darwin.
+ * g++.dg/debug/dwarf2/pr85302.C: Likewise.
+ * gcc.dg/lto/pr83719_0.c: Likewise.
+
2018-08-17 Martin Sebor <msebor@redhat.com>
PR testsuite/86996
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr85302.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr85302.C
index 97ac302..457508d 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/pr85302.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr85302.C
@@ -1,5 +1,6 @@
// PR debug/85302
// { dg-do compile }
+// { dg-skip-if "split DWARF unsupported" { *-*-darwin* } }
// { dg-options "-std=c++11 -gsplit-dwarf -O1" }
// { dg-additional-options "-fPIE" { target pie } }
diff --git a/gcc/testsuite/gcc.dg/lto/pr83719_0.c b/gcc/testsuite/gcc.dg/lto/pr83719_0.c
index 6d5c16d..cd4cab3 100644
--- a/gcc/testsuite/gcc.dg/lto/pr83719_0.c
+++ b/gcc/testsuite/gcc.dg/lto/pr83719_0.c
@@ -1,4 +1,5 @@
/* { dg-lto-do assemble } */
+/* { dg-skip-if "split DWARF unsupported" { *-*-darwin* } } */
/* { dg-lto-options { { -flto -g -gsplit-dwarf } } } */
/* Empty. */
diff --git a/gcc/testsuite/gcc.dg/pr86064.c b/gcc/testsuite/gcc.dg/pr86064.c
index 5be820c..3397427 100644
--- a/gcc/testsuite/gcc.dg/pr86064.c
+++ b/gcc/testsuite/gcc.dg/pr86064.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "split DWARF unsupported" { *-*-darwin* } } */
/* { dg-options "-g -O2 -fno-var-tracking-assignments -gsplit-dwarf" } */
/* This used to fail with location views (implicitly) enabled, because