From: Iain Sandoe Date: Sat, 18 Aug 2018 09:15:05 +0000 (+0000) Subject: Darwin does not support gsplit-dwarf. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7a52e72da5d893545496a2f6772374c7282ba9c;p=gcc.git Darwin does not support gsplit-dwarf. 2018-08-18 Iain Sandoe 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7babd0d494c..ccc76e48bb0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-08-18 Iain Sandoe + + * 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 * 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 a31cb08b605..233076a3b77 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 166c3c7718c..05c8cf71a1f 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} % + + * 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 PR testsuite/86996 diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr85302.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr85302.C index 97ac302a921..457508dd586 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 6d5c16da7da..cd4cab369a5 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 5be820c78f8..33974272569 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