diff options
author | Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk> | 2009-09-24 17:02:29 +0000 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2009-09-24 10:02:29 -0700 |
commit | 047a3193bd729475182a438d9929ec923f484481 (patch) | |
tree | 08082379e6d49ceefcba2533a02f3292e225e0da | |
parent | c33ac441b202e1c6a19ba085c8c23946ff3e7a2e (diff) | |
download | gcc-047a3193bd729475182a438d9929ec923f484481.zip gcc-047a3193bd729475182a438d9929ec923f484481.tar.gz gcc-047a3193bd729475182a438d9929ec923f484481.tar.bz2 |
re PR bootstrap/41405 (Bootstrap fails on *-apple-darwin* due to revision 151815)
PR bootstrap/41405
* common.opt: Initialize dwarf_strict to -1.
* toplev.c (process_options): Catch unset dwarf_strict
and set to 0 for all targets not overriding.
* config/darwin.c (darwin_override_options): Catch unset
dwarf_strict and override to 1.
From-SVN: r152127
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/common.opt | 2 | ||||
-rw-r--r-- | gcc/config/darwin.c | 5 | ||||
-rw-r--r-- | gcc/toplev.c | 5 |
4 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0e6cc762..51bf64a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2009-09-24 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk> + + PR bootstrap/41405 + * common.opt: Initialize dwarf_strict to -1. + * toplev.c (process_options): Catch unset dwarf_strict + and set to 0 for all targets not overriding. + * config/darwin.c (darwin_override_options): Catch unset + dwarf_strict and override to 1. + 2009-09-24 Jeff Law <law@redhat.com> * tree-into-ssa.c (rewrite_into_ssa): Free interesting_blocks. diff --git a/gcc/common.opt b/gcc/common.opt index 42da2d5..189f476 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1473,7 +1473,7 @@ Common JoinedOrMissing Negative(gvms) Generate debug information in extended STABS format gno-strict-dwarf -Common RejectNegative Var(dwarf_strict,0) +Common RejectNegative Var(dwarf_strict,0) Init(-1) Emit DWARF additions beyond selected version gstrict-dwarf diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index c8bb508..a8933e6 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -1692,6 +1692,11 @@ darwin_kextabi_p (void) { void darwin_override_options (void) { + /* Don't emit DWARF3/4 unless specifically selected. This is a + workaround for tool bugs. */ + if (dwarf_strict < 0) + dwarf_strict = 1; + if (flag_mkernel || flag_apple_kext) { /* -mkernel implies -fapple-kext for C++ */ diff --git a/gcc/toplev.c b/gcc/toplev.c index cf035d8..4dd17e4 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1910,6 +1910,11 @@ process_options (void) } } + /* Unless over-ridden for the target, assume that all DWARF levels + may be emitted, if DWARF2_DEBUG is selected. */ + if (dwarf_strict < 0) + dwarf_strict = 0; + /* A lot of code assumes write_symbols == NO_DEBUG if the debugging level is 0. */ if (debug_info_level == DINFO_LEVEL_NONE) |